commit eab1629790a6818bf88f0c85e10361c0e63e9c5b Author: CentOS Sources Date: Sat Sep 5 18:31:45 2020 +0000 import gnome-settings-daemon-3.32.0-11.el8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a994c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gnome-settings-daemon-3.32.0.tar.xz diff --git a/.gnome-settings-daemon.metadata b/.gnome-settings-daemon.metadata new file mode 100644 index 0000000..26ae539 --- /dev/null +++ b/.gnome-settings-daemon.metadata @@ -0,0 +1 @@ +92145a7a5714ebf3aeb90baaacb7e6955335731b SOURCES/gnome-settings-daemon-3.32.0.tar.xz diff --git a/SOURCES/0001-account-first-cut-at-account-plugin.patch b/SOURCES/0001-account-first-cut-at-account-plugin.patch new file mode 100644 index 0000000..ddbdf14 --- /dev/null +++ b/SOURCES/0001-account-first-cut-at-account-plugin.patch @@ -0,0 +1,12157 @@ +From d02ca09af14bdaed74fb3e3251aeed485ab419b8 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Mon, 6 Nov 2017 14:43:46 -0500 +Subject: [PATCH 1/4] account: first cut at account plugin + +It just notifies when the user's account is about to expire. + +Future commits will make it redisplay the notification after +screen unlock and provide some configurability for regular +nags. +--- + plugins/account/Makefile.am | 68 + + plugins/account/gsd-account-manager.c | 422 ++ + plugins/account/gsd-account-manager.h | 54 + + plugins/account/main.c | 7 + + plugins/account/meson.build | 39 + + .../account/org.freedesktop.Accounts.User.c | 6176 +++++++++++++++++ + .../account/org.freedesktop.Accounts.User.h | 725 ++ + .../account/org.freedesktop.Accounts.User.xml | 825 +++ + plugins/account/org.freedesktop.Accounts.c | 3016 ++++++++ + plugins/account/org.freedesktop.Accounts.h | 400 ++ + plugins/account/org.freedesktop.Accounts.xml | 248 + + .../org.gnome.SettingsDaemon.Account.desktop | 9 + + ...rg.gnome.SettingsDaemon.Account.desktop.in | 9 + + plugins/meson.build | 1 + + 14 files changed, 11999 insertions(+) + create mode 100644 plugins/account/Makefile.am + create mode 100644 plugins/account/gsd-account-manager.c + create mode 100644 plugins/account/gsd-account-manager.h + create mode 100644 plugins/account/main.c + create mode 100644 plugins/account/meson.build + create mode 100644 plugins/account/org.freedesktop.Accounts.User.c + create mode 100644 plugins/account/org.freedesktop.Accounts.User.h + create mode 100644 plugins/account/org.freedesktop.Accounts.User.xml + create mode 100644 plugins/account/org.freedesktop.Accounts.c + create mode 100644 plugins/account/org.freedesktop.Accounts.h + create mode 100644 plugins/account/org.freedesktop.Accounts.xml + create mode 100644 plugins/account/org.gnome.SettingsDaemon.Account.desktop + create mode 100644 plugins/account/org.gnome.SettingsDaemon.Account.desktop.in + +diff --git a/plugins/account/Makefile.am b/plugins/account/Makefile.am +new file mode 100644 +index 00000000..e06abcf5 +--- /dev/null ++++ b/plugins/account/Makefile.am +@@ -0,0 +1,68 @@ ++plugin_name = account ++ ++dbus_accounts_built_sources = org.freedesktop.Accounts.c org.freedesktop.Accounts.h ++dbus_accounts_user_built_sources = org.freedesktop.Accounts.User.c org.freedesktop.Accounts.User.h ++ ++BUILT_SOURCES = $(dbus_accounts_built_sources) \ ++ $(dbus_accounts_user_built_sources) ++ ++libexec_PROGRAMS = gsd-account ++ ++$(dbus_accounts_built_sources) : Makefile.am org.freedesktop.Accounts.xml ++ $(AM_V_GEN) gdbus-codegen \ ++ --interface-prefix org.freedesktop. \ ++ --c-namespace Gsd \ ++ --generate-c-code org.freedesktop.Accounts \ ++ --annotate "org.freedesktop.Accounts" \ ++ "org.gtk.GDBus.C.Name" Accounts \ ++ $(srcdir)/org.freedesktop.Accounts.xml ++ ++$(dbus_accounts_user_built_sources) : Makefile.am org.freedesktop.Accounts.User.xml ++ $(AM_V_GEN) gdbus-codegen \ ++ --interface-prefix org.freedesktop. \ ++ --c-namespace Gsd \ ++ --generate-c-code org.freedesktop.Accounts.User \ ++ --annotate "org.freedesktop.Accounts.User" \ ++ "org.gtk.GDBus.C.Name" AccountsUser \ ++ $(srcdir)/org.freedesktop.Accounts.User.xml ++ ++gsd_account_SOURCES = \ ++ main.c \ ++ gsd-account-manager.c \ ++ gsd-account-manager.h \ ++ $(COMMON_FILES) ++ ++nodist_gsd_account_SOURCES = \ ++ $(dbus_accounts_built_sources) \ ++ $(dbus_accounts_user_built_sources) ++ ++gsd_account_CPPFLAGS = \ ++ -I$(top_srcdir)/data/ \ ++ -I$(top_srcdir)/gnome-settings-daemon \ ++ -I$(top_builddir)/gnome-settings-daemon \ ++ -I$(top_srcdir)/plugins/common \ ++ -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \ ++ -DLIBEXECDIR=\""$(libexecdir)"\" \ ++ $(AM_CPPFLAGS) ++ ++gsd_account_CFLAGS = \ ++ $(PLUGIN_CFLAGS) \ ++ $(ACCOUNT_CFLAGS) ++ ++gsd_account_LDADD = \ ++ $(top_builddir)/gnome-settings-daemon/libgsd.la \ ++ $(top_builddir)/plugins/common/libcommon.la \ ++ $(ACCOUNT_LIBS) ++ ++desktopdir = $(sysconfdir)/xdg/autostart ++desktop_in_files = org.gnome.SettingsDaemon.Account.desktop.in ++desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) ++ ++org.gnome.SettingsDaemon.Account.desktop: $(desktop_in_files) Makefile ++ $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ ++ ++EXTRA_DIST = $(desktop_in_files) ++ ++CLEANFILES = $(desktop_DATA) ++ ++DISTCLEANFILES = $(desktop_DATA) +diff --git a/plugins/account/gsd-account-manager.c b/plugins/account/gsd-account-manager.c +new file mode 100644 +index 00000000..40b91cb6 +--- /dev/null ++++ b/plugins/account/gsd-account-manager.c +@@ -0,0 +1,422 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2017 Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, see . ++ * ++ */ ++ ++#include "config.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "gnome-settings-profile.h" ++#include "gsd-account-manager.h" ++#include "org.freedesktop.Accounts.h" ++#include "org.freedesktop.Accounts.User.h" ++ ++#define GSD_ACCOUNT_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_ACCOUNT_MANAGER, GsdAccountManagerPrivate)) ++ ++struct GsdAccountManagerPrivate ++{ ++ GsdAccounts *accounts_proxy; ++ GsdAccountsUser *accounts_user_proxy; ++ GCancellable *cancellable; ++ ++ gint64 expiration_time; ++ gint64 last_change_time; ++ gint64 min_days_between_changes; ++ gint64 max_days_between_changes; ++ gint64 days_to_warn; ++ gint64 days_after_expiration_until_lock; ++ ++ NotifyNotification *notification; ++}; ++ ++static void gsd_account_manager_class_init (GsdAccountManagerClass *klass); ++static void gsd_account_manager_init (GsdAccountManager *account_manager); ++static void gsd_account_manager_finalize (GObject *object); ++ ++G_DEFINE_TYPE (GsdAccountManager, gsd_account_manager, G_TYPE_OBJECT) ++ ++static gpointer manager_object = NULL; ++ ++static void ++on_notification_closed (NotifyNotification *notification, ++ gpointer user_data) ++{ ++ GsdAccountManager *manager = user_data; ++ ++ g_clear_object (&manager->priv->notification); ++} ++ ++static void ++hide_notification (GsdAccountManager *manager) ++{ ++ if (manager->priv->notification == NULL) ++ return; ++ ++ notify_notification_close (manager->priv->notification, NULL); ++ g_clear_object (&manager->priv->notification); ++} ++ ++static void ++show_notification (GsdAccountManager *manager, ++ const char *primary_text, ++ const char *secondary_text) ++{ ++ g_assert (manager->priv->notification == NULL); ++ ++ manager->priv->notification = notify_notification_new (primary_text, ++ secondary_text, ++ "avatar-default-symbolic"); ++ notify_notification_set_app_name (manager->priv->notification, _("User Account")); ++ notify_notification_set_hint (manager->priv->notification, ++ "resident", ++ g_variant_new_boolean (TRUE)); ++ notify_notification_set_timeout (manager->priv->notification, ++ NOTIFY_EXPIRES_NEVER); ++ ++ g_signal_connect (manager->priv->notification, ++ "closed", ++ G_CALLBACK (on_notification_closed), ++ manager); ++ ++ notify_notification_show (manager->priv->notification, NULL); ++} ++ ++static void ++update_password_notification (GsdAccountManager *manager) ++{ ++ gint64 days_since_epoch; ++ gint64 days_until_expiration = -1; ++ gint64 days_since_last_change = -1; ++ gint64 days_left = -1; ++ g_autofree char *primary_text = NULL; ++ g_autofree char *secondary_text = NULL; ++ gboolean password_already_expired = FALSE; ++ ++ hide_notification (manager); ++ ++ days_since_epoch = g_get_real_time () / G_USEC_PER_SEC / 60 / 60 / 24; ++ ++ if (manager->priv->expiration_time > 0) { ++ days_until_expiration = manager->priv->expiration_time - days_since_epoch; ++ ++ if (days_until_expiration <= 0) { ++ password_already_expired = TRUE; ++ goto out; ++ } ++ } ++ ++ if (manager->priv->last_change_time == 0) { ++ password_already_expired = TRUE; ++ goto out; ++ } ++ ++ days_since_last_change = days_since_epoch - manager->priv->last_change_time; ++ ++ if (days_since_last_change < 0) { ++ /* time skew, password was changed in the future! */ ++ goto out; ++ } ++ ++ if (manager->priv->max_days_between_changes > -1) { ++ if (manager->priv->days_after_expiration_until_lock > -1) { ++ if ((days_since_last_change > manager->priv->max_days_between_changes) && ++ (days_since_last_change > manager->priv->days_after_expiration_until_lock)) { ++ password_already_expired = TRUE; ++ goto out; ++ } ++ } ++ ++ if (days_since_last_change > manager->priv->max_days_between_changes) { ++ password_already_expired = TRUE; ++ goto out; ++ } ++ ++ if (manager->priv->days_to_warn > -1) { ++ if (days_since_last_change > manager->priv->max_days_between_changes - manager->priv->days_to_warn) { ++ days_left = manager->priv->last_change_time + manager->priv->max_days_between_changes - days_since_epoch; ++ ++ if (days_until_expiration >= 0) ++ days_left = MIN (days_left, days_until_expiration); ++ goto out; ++ } ++ } ++ } ++ ++out: ++ if (password_already_expired) { ++ primary_text = g_strdup_printf (_("Password Expired")); ++ secondary_text = g_strdup_printf (_("Your password is expired. Please update it.")); ++ } else if (days_left >= 0) { ++ primary_text = g_strdup_printf (_("Password Expiring Soon")); ++ if (days_left == 0) ++ secondary_text = g_strdup_printf (_("Your password is expiring today.")); ++ else if (days_left == 1) ++ secondary_text = g_strdup_printf (_("Your password is expiring in a day.")); ++ else ++ secondary_text = g_strdup_printf (_("Your password is expiring in %ld days."), ++ days_left); ++ } ++ ++ if (primary_text != NULL && secondary_text != NULL) ++ show_notification (manager, ++ primary_text, ++ secondary_text); ++} ++ ++static gboolean ++set_policy_number (gint64 *destination, ++ gint64 source) ++{ ++ if (*destination == source) ++ return FALSE; ++ ++ *destination = source; ++ return TRUE; ++} ++ ++static void ++on_got_password_expiration_policy (GsdAccountsUser *accounts_user_proxy, ++ GAsyncResult *res, ++ gpointer user_data) ++{ ++ GsdAccountManager *manager = user_data; ++ g_autoptr(GError) error = NULL; ++ gboolean succeeded; ++ gint64 expiration_time; ++ gint64 last_change_time; ++ gint64 min_days_between_changes; ++ gint64 max_days_between_changes; ++ gint64 days_to_warn; ++ gint64 days_after_expiration_until_lock; ++ ++ gnome_settings_profile_start (NULL); ++ succeeded = gsd_accounts_user_call_get_password_expiration_policy_finish (accounts_user_proxy, ++ &expiration_time, ++ &last_change_time, ++ &min_days_between_changes, ++ &max_days_between_changes, ++ &days_to_warn, ++ &days_after_expiration_until_lock, ++ res, ++ &error); ++ ++ if (!succeeded) { ++ g_warning ("Failed to get password expiration policy for user: %s", error->message); ++ goto out; ++ } ++ ++ set_policy_number (&manager->priv->expiration_time, expiration_time); ++ set_policy_number (&manager->priv->last_change_time, last_change_time); ++ set_policy_number (&manager->priv->min_days_between_changes, min_days_between_changes); ++ set_policy_number (&manager->priv->max_days_between_changes, max_days_between_changes); ++ set_policy_number (&manager->priv->days_to_warn, days_to_warn); ++ set_policy_number (&manager->priv->days_after_expiration_until_lock, days_after_expiration_until_lock); ++ ++ update_password_notification (manager); ++out: ++ gnome_settings_profile_end (NULL); ++} ++ ++static void ++on_got_accounts_user_proxy (GObject *source_object, ++ GAsyncResult *res, ++ gpointer user_data) ++{ ++ GsdAccountManager *manager = user_data; ++ g_autoptr(GError) error = NULL; ++ ++ gnome_settings_profile_start (NULL); ++ manager->priv->accounts_user_proxy = gsd_accounts_user_proxy_new_finish (res, &error); ++ ++ if (manager->priv->accounts_user_proxy != NULL) { ++ gsd_accounts_user_call_get_password_expiration_policy (manager->priv->accounts_user_proxy, ++ manager->priv->cancellable, ++ (GAsyncReadyCallback) ++ on_got_password_expiration_policy, ++ manager); ++ } else { ++ g_warning ("Failed to get user proxy to accounts service: %s", error->message); ++ goto out; ++ } ++ ++out: ++ gnome_settings_profile_end (NULL); ++} ++ ++static void ++on_got_user_object_path (GsdAccounts *accounts_proxy, ++ GAsyncResult *res, ++ gpointer user_data) ++{ ++ GsdAccountManager *manager = user_data; ++ g_autoptr(GError) error = NULL; ++ gboolean succeeded; ++ gchar *object_path; ++ GDBusConnection *connection; ++ ++ gnome_settings_profile_start (NULL); ++ ++ succeeded = gsd_accounts_call_find_user_by_id_finish (accounts_proxy, ++ &object_path, ++ res, ++ &error); ++ ++ if (!succeeded) { ++ g_warning ("Unable to find current user in accounts service: %s", ++ error->message); ++ goto out; ++ } ++ ++ connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (accounts_proxy)); ++ gsd_accounts_user_proxy_new (connection, ++ G_DBUS_PROXY_FLAGS_NONE, ++ "org.freedesktop.Accounts", ++ object_path, ++ manager->priv->cancellable, ++ (GAsyncReadyCallback) ++ on_got_accounts_user_proxy, ++ manager); ++ ++out: ++ gnome_settings_profile_end (NULL); ++} ++ ++static void ++on_got_accounts_proxy (GObject *source_object, ++ GAsyncResult *res, ++ gpointer user_data) ++{ ++ GsdAccountManager *manager = user_data; ++ g_autoptr(GError) error = NULL; ++ ++ gnome_settings_profile_start (NULL); ++ manager->priv->accounts_proxy = gsd_accounts_proxy_new_for_bus_finish (res, &error); ++ ++ if (manager->priv->accounts_proxy != NULL) { ++ gsd_accounts_call_find_user_by_id (manager->priv->accounts_proxy, ++ getuid (), ++ manager->priv->cancellable, ++ (GAsyncReadyCallback) ++ on_got_user_object_path, ++ manager); ++ } else { ++ g_warning ("Failed to get proxy to accounts service: %s", error->message); ++ } ++ gnome_settings_profile_end (NULL); ++} ++ ++gboolean ++gsd_account_manager_start (GsdAccountManager *manager, ++ GError **error) ++{ ++ g_debug ("Starting accounts manager"); ++ ++ gnome_settings_profile_start (NULL); ++ manager->priv->cancellable = g_cancellable_new (); ++ gsd_accounts_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, ++ G_DBUS_PROXY_FLAGS_NONE, ++ "org.freedesktop.Accounts", ++ "/org/freedesktop/Accounts", ++ manager->priv->cancellable, ++ (GAsyncReadyCallback) ++ on_got_accounts_proxy, ++ manager); ++ gnome_settings_profile_end (NULL); ++ ++ return TRUE; ++} ++ ++void ++gsd_account_manager_stop (GsdAccountManager *manager) ++{ ++ g_debug ("Stopping accounts manager"); ++ ++ if (manager->priv->cancellable != NULL) { ++ g_cancellable_cancel (manager->priv->cancellable); ++ g_clear_object (&manager->priv->cancellable); ++ } ++ ++ g_clear_object (&manager->priv->accounts_proxy); ++ g_clear_object (&manager->priv->accounts_user_proxy); ++ g_clear_object (&manager->priv->notification); ++} ++ ++static void ++gsd_account_manager_class_init (GsdAccountManagerClass *klass) ++{ ++ GObjectClass *object_class = G_OBJECT_CLASS (klass); ++ ++ object_class->finalize = gsd_account_manager_finalize; ++ ++ notify_init ("gnome-settings-daemon"); ++ ++ g_type_class_add_private (klass, sizeof (GsdAccountManagerPrivate)); ++} ++ ++static void ++gsd_account_manager_init (GsdAccountManager *manager) ++{ ++ manager->priv = GSD_ACCOUNT_MANAGER_GET_PRIVATE (manager); ++} ++ ++static void ++gsd_account_manager_finalize (GObject *object) ++{ ++ GsdAccountManager *manager; ++ ++ g_return_if_fail (object != NULL); ++ g_return_if_fail (GSD_IS_ACCOUNT_MANAGER (object)); ++ ++ manager = GSD_ACCOUNT_MANAGER (object); ++ ++ g_return_if_fail (manager->priv != NULL); ++ ++ gsd_account_manager_stop (manager); ++ ++ G_OBJECT_CLASS (gsd_account_manager_parent_class)->finalize (object); ++} ++ ++GsdAccountManager * ++gsd_account_manager_new (void) ++{ ++ if (manager_object != NULL) { ++ g_object_ref (manager_object); ++ } else { ++ manager_object = g_object_new (GSD_TYPE_ACCOUNT_MANAGER, NULL); ++ g_object_add_weak_pointer (manager_object, ++ (gpointer *) &manager_object); ++ } ++ ++ return GSD_ACCOUNT_MANAGER (manager_object); ++} +diff --git a/plugins/account/gsd-account-manager.h b/plugins/account/gsd-account-manager.h +new file mode 100644 +index 00000000..faefcc18 +--- /dev/null ++++ b/plugins/account/gsd-account-manager.h +@@ -0,0 +1,54 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2017 Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, see . ++ * ++ */ ++ ++#ifndef __GSD_ACCOUNT_MANAGER_H ++#define __GSD_ACCOUNT_MANAGER_H ++ ++#include ++ ++G_BEGIN_DECLS ++ ++#define GSD_TYPE_ACCOUNT_MANAGER (gsd_account_manager_get_type ()) ++#define GSD_ACCOUNT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_ACCOUNT_MANAGER, GsdAccountManager)) ++#define GSD_ACCOUNT_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_ACCOUNT_MANAGER, GsdAccountManagerClass)) ++#define GSD_IS_ACCOUNT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_ACCOUNT_MANAGER)) ++#define GSD_IS_ACCOUNT_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_ACCOUNT_MANAGER)) ++#define GSD_ACCOUNT_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_ACCOUNT_MANAGER, GsdAccountManagerClass)) ++ ++typedef struct GsdAccountManagerPrivate GsdAccountManagerPrivate; ++ ++typedef struct { ++ GObject parent; ++ GsdAccountManagerPrivate *priv; ++} GsdAccountManager; ++ ++typedef struct { ++ GObjectClass parent_class; ++} GsdAccountManagerClass; ++ ++GType gsd_account_manager_get_type (void); ++ ++GsdAccountManager * gsd_account_manager_new (void); ++gboolean gsd_account_manager_start (GsdAccountManager *manager, ++ GError **error); ++void gsd_account_manager_stop (GsdAccountManager *manager); ++ ++G_END_DECLS ++ ++#endif /* __GSD_ACCOUNT_MANAGER_H */ +diff --git a/plugins/account/main.c b/plugins/account/main.c +new file mode 100644 +index 00000000..9b854f65 +--- /dev/null ++++ b/plugins/account/main.c +@@ -0,0 +1,7 @@ ++#define NEW gsd_account_manager_new ++#define START gsd_account_manager_start ++#define STOP gsd_account_manager_stop ++#define MANAGER GsdAccountManager ++#include "gsd-account-manager.h" ++ ++#include "daemon-skeleton.h" +diff --git a/plugins/account/meson.build b/plugins/account/meson.build +new file mode 100644 +index 00000000..c70ac36e +--- /dev/null ++++ b/plugins/account/meson.build +@@ -0,0 +1,39 @@ ++sources = files( ++ 'gsd-account-manager.c', ++ 'main.c' ++) ++ ++sources += gnome.gdbus_codegen( ++ 'org.freedesktop.Accounts', ++ 'org.freedesktop.Accounts.xml', ++ interface_prefix: 'org.freedesktop.', ++ namespace: 'Gsd', ++ object_manager: false, ++ annotations: ['org.freedesktop.Accounts', 'org.gtk.GDBus.C.Name', 'Accounts'] ++) ++ ++sources += gnome.gdbus_codegen( ++ 'org.freedesktop.Accounts.User', ++ 'org.freedesktop.Accounts.User.xml', ++ interface_prefix: 'org.freedesktop.', ++ namespace: 'Gsd', ++ object_manager: false, ++ annotations: ['org.freedesktop.Accounts.User', 'org.gtk.GDBus.C.Name', 'AccountsUser'] ++) ++ ++deps = plugins_deps + [ ++ gio_unix_dep, ++ libnotify_dep, ++ nss_dep ++] ++ ++executable( ++ 'gsd-' + plugin_name, ++ sources, ++ include_directories: [top_inc, common_inc], ++ dependencies: deps, ++ c_args: cflags, ++ install: true, ++ install_rpath: gsd_pkglibdir, ++ install_dir: gsd_libexecdir ++) +diff --git a/plugins/account/org.freedesktop.Accounts.User.c b/plugins/account/org.freedesktop.Accounts.User.c +new file mode 100644 +index 00000000..3b18d185 +--- /dev/null ++++ b/plugins/account/org.freedesktop.Accounts.User.c +@@ -0,0 +1,6176 @@ ++/* ++ * Generated by gdbus-codegen 2.54.1. 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 "org.freedesktop.Accounts.User.h" ++ ++#include ++#ifdef G_OS_UNIX ++# include ++#endif ++ ++typedef struct ++{ ++ GDBusArgInfo parent_struct; ++ gboolean use_gvariant; ++} _ExtendedGDBusArgInfo; ++ ++typedef struct ++{ ++ GDBusMethodInfo parent_struct; ++ const gchar *signal_name; ++ gboolean pass_fdlist; ++} _ExtendedGDBusMethodInfo; ++ ++typedef struct ++{ ++ GDBusSignalInfo parent_struct; ++ const gchar *signal_name; ++} _ExtendedGDBusSignalInfo; ++ ++typedef struct ++{ ++ GDBusPropertyInfo parent_struct; ++ const gchar *hyphen_name; ++ gboolean use_gvariant; ++} _ExtendedGDBusPropertyInfo; ++ ++typedef struct ++{ ++ GDBusInterfaceInfo parent_struct; ++ const gchar *hyphen_name; ++} _ExtendedGDBusInterfaceInfo; ++ ++typedef struct ++{ ++ const _ExtendedGDBusPropertyInfo *info; ++ guint prop_id; ++ GValue orig_value; /* the value before the change */ ++} ChangedProperty; ++ ++static void ++_changed_property_free (ChangedProperty *data) ++{ ++ g_value_unset (&data->orig_value); ++ g_free (data); ++} ++ ++static gboolean ++_g_strv_equal0 (gchar **a, gchar **b) ++{ ++ gboolean ret = FALSE; ++ guint n; ++ if (a == NULL && b == NULL) ++ { ++ ret = TRUE; ++ goto out; ++ } ++ if (a == NULL || b == NULL) ++ goto out; ++ if (g_strv_length (a) != g_strv_length (b)) ++ goto out; ++ for (n = 0; a[n] != NULL; n++) ++ if (g_strcmp0 (a[n], b[n]) != 0) ++ goto out; ++ ret = TRUE; ++out: ++ return ret; ++} ++ ++static gboolean ++_g_variant_equal0 (GVariant *a, GVariant *b) ++{ ++ gboolean ret = FALSE; ++ if (a == NULL && b == NULL) ++ { ++ ret = TRUE; ++ goto out; ++ } ++ if (a == NULL || b == NULL) ++ goto out; ++ ret = g_variant_equal (a, b); ++out: ++ return ret; ++} ++ ++G_GNUC_UNUSED static gboolean ++_g_value_equal (const GValue *a, const GValue *b) ++{ ++ gboolean ret = FALSE; ++ g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); ++ switch (G_VALUE_TYPE (a)) ++ { ++ case G_TYPE_BOOLEAN: ++ ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); ++ break; ++ case G_TYPE_UCHAR: ++ ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); ++ break; ++ case G_TYPE_INT: ++ ret = (g_value_get_int (a) == g_value_get_int (b)); ++ break; ++ case G_TYPE_UINT: ++ ret = (g_value_get_uint (a) == g_value_get_uint (b)); ++ break; ++ case G_TYPE_INT64: ++ ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); ++ break; ++ case G_TYPE_UINT64: ++ ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); ++ break; ++ case G_TYPE_DOUBLE: ++ { ++ /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ ++ gdouble da = g_value_get_double (a); ++ gdouble db = g_value_get_double (b); ++ ret = memcmp (&da, &db, sizeof (gdouble)) == 0; ++ } ++ break; ++ case G_TYPE_STRING: ++ ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); ++ break; ++ case G_TYPE_VARIANT: ++ ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); ++ break; ++ default: ++ if (G_VALUE_TYPE (a) == G_TYPE_STRV) ++ ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); ++ else ++ g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); ++ break; ++ } ++ return ret; ++} ++ ++/* ------------------------------------------------------------------------ ++ * Code for interface org.freedesktop.Accounts.User ++ * ------------------------------------------------------------------------ ++ */ ++ ++/** ++ * SECTION:GsdAccountsUser ++ * @title: GsdAccountsUser ++ * @short_description: Generated C code for the org.freedesktop.Accounts.User D-Bus interface ++ * ++ * This section contains code for working with the org.freedesktop.Accounts.User D-Bus interface in C. ++ */ ++ ++/* ---- Introspection data for org.freedesktop.Accounts.User ---- */ ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_user_name_IN_ARG_name = ++{ ++ { ++ -1, ++ (gchar *) "name", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_user_name_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_user_name_IN_ARG_name, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_user_name_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_user_name_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_user_name_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_user_name = ++{ ++ { ++ -1, ++ (gchar *) "SetUserName", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_user_name_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_user_name_annotation_info_pointers ++ }, ++ "handle-set-user-name", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_real_name_IN_ARG_name = ++{ ++ { ++ -1, ++ (gchar *) "name", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_real_name_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_real_name_IN_ARG_name, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_real_name_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_real_name_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_real_name_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_real_name = ++{ ++ { ++ -1, ++ (gchar *) "SetRealName", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_real_name_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_real_name_annotation_info_pointers ++ }, ++ "handle-set-real-name", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_email_IN_ARG_email = ++{ ++ { ++ -1, ++ (gchar *) "email", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_email_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_email_IN_ARG_email, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_email_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_email_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_email_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_email = ++{ ++ { ++ -1, ++ (gchar *) "SetEmail", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_email_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_email_annotation_info_pointers ++ }, ++ "handle-set-email", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_language_IN_ARG_language = ++{ ++ { ++ -1, ++ (gchar *) "language", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_language_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_language_IN_ARG_language, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_language_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_language_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_language_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_language = ++{ ++ { ++ -1, ++ (gchar *) "SetLanguage", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_language_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_language_annotation_info_pointers ++ }, ++ "handle-set-language", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_xsession_IN_ARG_x_session = ++{ ++ { ++ -1, ++ (gchar *) "x_session", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_xsession_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_xsession_IN_ARG_x_session, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_xsession_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_xsession_annotation_info_1 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.CSymbol", ++ (gchar *) "user_set_x_session", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_xsession_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_xsession_annotation_info_0, ++ &_gsd_accounts_user_method_set_xsession_annotation_info_1, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_xsession = ++{ ++ { ++ -1, ++ (gchar *) "SetXSession", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_xsession_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_xsession_annotation_info_pointers ++ }, ++ "handle-set-xsession", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_location_IN_ARG_location = ++{ ++ { ++ -1, ++ (gchar *) "location", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_location_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_location_IN_ARG_location, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_location_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_location_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_location_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_location = ++{ ++ { ++ -1, ++ (gchar *) "SetLocation", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_location_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_location_annotation_info_pointers ++ }, ++ "handle-set-location", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_home_directory_IN_ARG_homedir = ++{ ++ { ++ -1, ++ (gchar *) "homedir", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_home_directory_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_home_directory_IN_ARG_homedir, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_home_directory_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_home_directory_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_home_directory_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_home_directory = ++{ ++ { ++ -1, ++ (gchar *) "SetHomeDirectory", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_home_directory_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_home_directory_annotation_info_pointers ++ }, ++ "handle-set-home-directory", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_shell_IN_ARG_shell = ++{ ++ { ++ -1, ++ (gchar *) "shell", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_shell_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_shell_IN_ARG_shell, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_shell_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_shell_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_shell_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_shell = ++{ ++ { ++ -1, ++ (gchar *) "SetShell", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_shell_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_shell_annotation_info_pointers ++ }, ++ "handle-set-shell", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_icon_file_IN_ARG_filename = ++{ ++ { ++ -1, ++ (gchar *) "filename", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_icon_file_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_icon_file_IN_ARG_filename, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_icon_file_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_icon_file_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_icon_file_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_icon_file = ++{ ++ { ++ -1, ++ (gchar *) "SetIconFile", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_icon_file_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_icon_file_annotation_info_pointers ++ }, ++ "handle-set-icon-file", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_locked_IN_ARG_locked = ++{ ++ { ++ -1, ++ (gchar *) "locked", ++ (gchar *) "b", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_locked_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_locked_IN_ARG_locked, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_locked_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_locked_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_locked_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_locked = ++{ ++ { ++ -1, ++ (gchar *) "SetLocked", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_locked_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_locked_annotation_info_pointers ++ }, ++ "handle-set-locked", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_account_type_IN_ARG_accountType = ++{ ++ { ++ -1, ++ (gchar *) "accountType", ++ (gchar *) "i", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_account_type_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_account_type_IN_ARG_accountType, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_account_type_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_account_type_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_account_type_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_account_type = ++{ ++ { ++ -1, ++ (gchar *) "SetAccountType", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_account_type_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_account_type_annotation_info_pointers ++ }, ++ "handle-set-account-type", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_password_mode_IN_ARG_mode = ++{ ++ { ++ -1, ++ (gchar *) "mode", ++ (gchar *) "i", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_password_mode_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_password_mode_IN_ARG_mode, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_password_mode_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_password_mode_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_password_mode_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_password_mode = ++{ ++ { ++ -1, ++ (gchar *) "SetPasswordMode", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_password_mode_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_password_mode_annotation_info_pointers ++ }, ++ "handle-set-password-mode", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_password_IN_ARG_password = ++{ ++ { ++ -1, ++ (gchar *) "password", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_password_IN_ARG_hint = ++{ ++ { ++ -1, ++ (gchar *) "hint", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_password_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_password_IN_ARG_password, ++ &_gsd_accounts_user_method_info_set_password_IN_ARG_hint, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_password_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_password_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_password_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_password = ++{ ++ { ++ -1, ++ (gchar *) "SetPassword", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_password_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_password_annotation_info_pointers ++ }, ++ "handle-set-password", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_password_hint_IN_ARG_hint = ++{ ++ { ++ -1, ++ (gchar *) "hint", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_password_hint_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_password_hint_IN_ARG_hint, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_password_hint_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_password_hint_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_password_hint_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_password_hint = ++{ ++ { ++ -1, ++ (gchar *) "SetPasswordHint", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_password_hint_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_password_hint_annotation_info_pointers ++ }, ++ "handle-set-password-hint", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_set_automatic_login_IN_ARG_enabled = ++{ ++ { ++ -1, ++ (gchar *) "enabled", ++ (gchar *) "b", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_set_automatic_login_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_automatic_login_IN_ARG_enabled, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_set_automatic_login_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_set_automatic_login_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_set_automatic_login_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_set_automatic_login = ++{ ++ { ++ -1, ++ (gchar *) "SetAutomaticLogin", ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_set_automatic_login_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_set_automatic_login_annotation_info_pointers ++ }, ++ "handle-set-automatic-login", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_expiration_time = ++{ ++ { ++ -1, ++ (gchar *) "expiration_time", ++ (gchar *) "x", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_last_change_time = ++{ ++ { ++ -1, ++ (gchar *) "last_change_time", ++ (gchar *) "x", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_min_days_between_changes = ++{ ++ { ++ -1, ++ (gchar *) "min_days_between_changes", ++ (gchar *) "x", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_max_days_between_changes = ++{ ++ { ++ -1, ++ (gchar *) "max_days_between_changes", ++ (gchar *) "x", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_days_to_warn = ++{ ++ { ++ -1, ++ (gchar *) "days_to_warn", ++ (gchar *) "x", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_days_after_expiration_until_lock = ++{ ++ { ++ -1, ++ (gchar *) "days_after_expiration_until_lock", ++ (gchar *) "x", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_expiration_time, ++ &_gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_last_change_time, ++ &_gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_min_days_between_changes, ++ &_gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_max_days_between_changes, ++ &_gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_days_to_warn, ++ &_gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_days_after_expiration_until_lock, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_user_method_get_password_expiration_policy_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_user_method_get_password_expiration_policy_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_get_password_expiration_policy_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_user_method_info_get_password_expiration_policy = ++{ ++ { ++ -1, ++ (gchar *) "GetPasswordExpirationPolicy", ++ NULL, ++ (GDBusArgInfo **) &_gsd_accounts_user_method_info_get_password_expiration_policy_OUT_ARG_pointers, ++ (GDBusAnnotationInfo **) &_gsd_accounts_user_method_get_password_expiration_policy_annotation_info_pointers ++ }, ++ "handle-get-password-expiration-policy", ++ FALSE ++}; ++ ++static const _ExtendedGDBusMethodInfo * const _gsd_accounts_user_method_info_pointers[] = ++{ ++ &_gsd_accounts_user_method_info_set_user_name, ++ &_gsd_accounts_user_method_info_set_real_name, ++ &_gsd_accounts_user_method_info_set_email, ++ &_gsd_accounts_user_method_info_set_language, ++ &_gsd_accounts_user_method_info_set_xsession, ++ &_gsd_accounts_user_method_info_set_location, ++ &_gsd_accounts_user_method_info_set_home_directory, ++ &_gsd_accounts_user_method_info_set_shell, ++ &_gsd_accounts_user_method_info_set_icon_file, ++ &_gsd_accounts_user_method_info_set_locked, ++ &_gsd_accounts_user_method_info_set_account_type, ++ &_gsd_accounts_user_method_info_set_password_mode, ++ &_gsd_accounts_user_method_info_set_password, ++ &_gsd_accounts_user_method_info_set_password_hint, ++ &_gsd_accounts_user_method_info_set_automatic_login, ++ &_gsd_accounts_user_method_info_get_password_expiration_policy, ++ NULL ++}; ++ ++static const _ExtendedGDBusSignalInfo _gsd_accounts_user_signal_info_changed = ++{ ++ { ++ -1, ++ (gchar *) "Changed", ++ NULL, ++ NULL ++ }, ++ "changed" ++}; ++ ++static const _ExtendedGDBusSignalInfo * const _gsd_accounts_user_signal_info_pointers[] = ++{ ++ &_gsd_accounts_user_signal_info_changed, ++ NULL ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_uid = ++{ ++ { ++ -1, ++ (gchar *) "Uid", ++ (gchar *) "t", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "uid", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_user_name = ++{ ++ { ++ -1, ++ (gchar *) "UserName", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "user-name", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_real_name = ++{ ++ { ++ -1, ++ (gchar *) "RealName", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "real-name", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_account_type = ++{ ++ { ++ -1, ++ (gchar *) "AccountType", ++ (gchar *) "i", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "account-type", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_home_directory = ++{ ++ { ++ -1, ++ (gchar *) "HomeDirectory", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "home-directory", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_shell = ++{ ++ { ++ -1, ++ (gchar *) "Shell", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "shell", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_email = ++{ ++ { ++ -1, ++ (gchar *) "Email", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "email", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_language = ++{ ++ { ++ -1, ++ (gchar *) "Language", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "language", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_xsession = ++{ ++ { ++ -1, ++ (gchar *) "XSession", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "xsession", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_location = ++{ ++ { ++ -1, ++ (gchar *) "Location", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "location", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_login_frequency = ++{ ++ { ++ -1, ++ (gchar *) "LoginFrequency", ++ (gchar *) "t", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "login-frequency", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_login_time = ++{ ++ { ++ -1, ++ (gchar *) "LoginTime", ++ (gchar *) "x", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "login-time", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_login_history = ++{ ++ { ++ -1, ++ (gchar *) "LoginHistory", ++ (gchar *) "a(xxa{sv})", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "login-history", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_icon_file = ++{ ++ { ++ -1, ++ (gchar *) "IconFile", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "icon-file", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_locked = ++{ ++ { ++ -1, ++ (gchar *) "Locked", ++ (gchar *) "b", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "locked", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_password_mode = ++{ ++ { ++ -1, ++ (gchar *) "PasswordMode", ++ (gchar *) "i", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "password-mode", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_password_hint = ++{ ++ { ++ -1, ++ (gchar *) "PasswordHint", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "password-hint", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_automatic_login = ++{ ++ { ++ -1, ++ (gchar *) "AutomaticLogin", ++ (gchar *) "b", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "automatic-login", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_system_account = ++{ ++ { ++ -1, ++ (gchar *) "SystemAccount", ++ (gchar *) "b", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "system-account", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_user_property_info_local_account = ++{ ++ { ++ -1, ++ (gchar *) "LocalAccount", ++ (gchar *) "b", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "local-account", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo * const _gsd_accounts_user_property_info_pointers[] = ++{ ++ &_gsd_accounts_user_property_info_uid, ++ &_gsd_accounts_user_property_info_user_name, ++ &_gsd_accounts_user_property_info_real_name, ++ &_gsd_accounts_user_property_info_account_type, ++ &_gsd_accounts_user_property_info_home_directory, ++ &_gsd_accounts_user_property_info_shell, ++ &_gsd_accounts_user_property_info_email, ++ &_gsd_accounts_user_property_info_language, ++ &_gsd_accounts_user_property_info_xsession, ++ &_gsd_accounts_user_property_info_location, ++ &_gsd_accounts_user_property_info_login_frequency, ++ &_gsd_accounts_user_property_info_login_time, ++ &_gsd_accounts_user_property_info_login_history, ++ &_gsd_accounts_user_property_info_icon_file, ++ &_gsd_accounts_user_property_info_locked, ++ &_gsd_accounts_user_property_info_password_mode, ++ &_gsd_accounts_user_property_info_password_hint, ++ &_gsd_accounts_user_property_info_automatic_login, ++ &_gsd_accounts_user_property_info_system_account, ++ &_gsd_accounts_user_property_info_local_account, ++ NULL ++}; ++ ++static const _ExtendedGDBusInterfaceInfo _gsd_accounts_user_interface_info = ++{ ++ { ++ -1, ++ (gchar *) "org.freedesktop.Accounts.User", ++ (GDBusMethodInfo **) &_gsd_accounts_user_method_info_pointers, ++ (GDBusSignalInfo **) &_gsd_accounts_user_signal_info_pointers, ++ (GDBusPropertyInfo **) &_gsd_accounts_user_property_info_pointers, ++ NULL ++ }, ++ "accounts-user", ++}; ++ ++ ++/** ++ * gsd_accounts_user_interface_info: ++ * ++ * Gets a machine-readable description of the org.freedesktop.Accounts.User D-Bus interface. ++ * ++ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. ++ */ ++GDBusInterfaceInfo * ++gsd_accounts_user_interface_info (void) ++{ ++ return (GDBusInterfaceInfo *) &_gsd_accounts_user_interface_info.parent_struct; ++} ++ ++/** ++ * gsd_accounts_user_override_properties: ++ * @klass: The class structure for a #GObject-derived class. ++ * @property_id_begin: The property id to assign to the first overridden property. ++ * ++ * Overrides all #GObject properties in the #GsdAccountsUser interface for a concrete class. ++ * The properties are overridden in the order they are defined. ++ * ++ * Returns: The last property id. ++ */ ++guint ++gsd_accounts_user_override_properties (GObjectClass *klass, guint property_id_begin) ++{ ++ g_object_class_override_property (klass, property_id_begin++, "uid"); ++ g_object_class_override_property (klass, property_id_begin++, "user-name"); ++ g_object_class_override_property (klass, property_id_begin++, "real-name"); ++ g_object_class_override_property (klass, property_id_begin++, "account-type"); ++ g_object_class_override_property (klass, property_id_begin++, "home-directory"); ++ g_object_class_override_property (klass, property_id_begin++, "shell"); ++ g_object_class_override_property (klass, property_id_begin++, "email"); ++ g_object_class_override_property (klass, property_id_begin++, "language"); ++ g_object_class_override_property (klass, property_id_begin++, "xsession"); ++ g_object_class_override_property (klass, property_id_begin++, "location"); ++ g_object_class_override_property (klass, property_id_begin++, "login-frequency"); ++ g_object_class_override_property (klass, property_id_begin++, "login-time"); ++ g_object_class_override_property (klass, property_id_begin++, "login-history"); ++ g_object_class_override_property (klass, property_id_begin++, "icon-file"); ++ g_object_class_override_property (klass, property_id_begin++, "locked"); ++ g_object_class_override_property (klass, property_id_begin++, "password-mode"); ++ g_object_class_override_property (klass, property_id_begin++, "password-hint"); ++ g_object_class_override_property (klass, property_id_begin++, "automatic-login"); ++ g_object_class_override_property (klass, property_id_begin++, "system-account"); ++ g_object_class_override_property (klass, property_id_begin++, "local-account"); ++ return property_id_begin - 1; ++} ++ ++ ++ ++/** ++ * GsdAccountsUser: ++ * ++ * Abstract interface type for the D-Bus interface org.freedesktop.Accounts.User. ++ */ ++ ++/** ++ * GsdAccountsUserIface: ++ * @parent_iface: The parent interface. ++ * @handle_get_password_expiration_policy: Handler for the #GsdAccountsUser::handle-get-password-expiration-policy signal. ++ * @handle_set_account_type: Handler for the #GsdAccountsUser::handle-set-account-type signal. ++ * @handle_set_automatic_login: Handler for the #GsdAccountsUser::handle-set-automatic-login signal. ++ * @handle_set_email: Handler for the #GsdAccountsUser::handle-set-email signal. ++ * @handle_set_home_directory: Handler for the #GsdAccountsUser::handle-set-home-directory signal. ++ * @handle_set_icon_file: Handler for the #GsdAccountsUser::handle-set-icon-file signal. ++ * @handle_set_language: Handler for the #GsdAccountsUser::handle-set-language signal. ++ * @handle_set_location: Handler for the #GsdAccountsUser::handle-set-location signal. ++ * @handle_set_locked: Handler for the #GsdAccountsUser::handle-set-locked signal. ++ * @handle_set_password: Handler for the #GsdAccountsUser::handle-set-password signal. ++ * @handle_set_password_hint: Handler for the #GsdAccountsUser::handle-set-password-hint signal. ++ * @handle_set_password_mode: Handler for the #GsdAccountsUser::handle-set-password-mode signal. ++ * @handle_set_real_name: Handler for the #GsdAccountsUser::handle-set-real-name signal. ++ * @handle_set_shell: Handler for the #GsdAccountsUser::handle-set-shell signal. ++ * @handle_set_user_name: Handler for the #GsdAccountsUser::handle-set-user-name signal. ++ * @handle_set_xsession: Handler for the #GsdAccountsUser::handle-set-xsession signal. ++ * @get_account_type: Getter for the #GsdAccountsUser:account-type property. ++ * @get_automatic_login: Getter for the #GsdAccountsUser:automatic-login property. ++ * @get_email: Getter for the #GsdAccountsUser:email property. ++ * @get_home_directory: Getter for the #GsdAccountsUser:home-directory property. ++ * @get_icon_file: Getter for the #GsdAccountsUser:icon-file property. ++ * @get_language: Getter for the #GsdAccountsUser:language property. ++ * @get_local_account: Getter for the #GsdAccountsUser:local-account property. ++ * @get_location: Getter for the #GsdAccountsUser:location property. ++ * @get_locked: Getter for the #GsdAccountsUser:locked property. ++ * @get_login_frequency: Getter for the #GsdAccountsUser:login-frequency property. ++ * @get_login_history: Getter for the #GsdAccountsUser:login-history property. ++ * @get_login_time: Getter for the #GsdAccountsUser:login-time property. ++ * @get_password_hint: Getter for the #GsdAccountsUser:password-hint property. ++ * @get_password_mode: Getter for the #GsdAccountsUser:password-mode property. ++ * @get_real_name: Getter for the #GsdAccountsUser:real-name property. ++ * @get_shell: Getter for the #GsdAccountsUser:shell property. ++ * @get_system_account: Getter for the #GsdAccountsUser:system-account property. ++ * @get_uid: Getter for the #GsdAccountsUser:uid property. ++ * @get_user_name: Getter for the #GsdAccountsUser:user-name property. ++ * @get_xsession: Getter for the #GsdAccountsUser:xsession property. ++ * @changed: Handler for the #GsdAccountsUser::changed signal. ++ * ++ * Virtual table for the D-Bus interface org.freedesktop.Accounts.User. ++ */ ++ ++typedef GsdAccountsUserIface GsdAccountsUserInterface; ++G_DEFINE_INTERFACE (GsdAccountsUser, gsd_accounts_user, G_TYPE_OBJECT) ++ ++static void ++gsd_accounts_user_default_init (GsdAccountsUserIface *iface) ++{ ++ /* GObject signals for incoming D-Bus method calls: */ ++ /** ++ * GsdAccountsUser::handle-set-user-name: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_name: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetUserName() 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 gsd_accounts_user_complete_set_user_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-user-name", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_user_name), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-real-name: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_name: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetRealName() 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 gsd_accounts_user_complete_set_real_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-real-name", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_real_name), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-email: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_email: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetEmail() 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 gsd_accounts_user_complete_set_email() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-email", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_email), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-language: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_language: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetLanguage() 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 gsd_accounts_user_complete_set_language() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-language", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_language), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-xsession: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_x_session: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetXSession() 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 gsd_accounts_user_complete_set_xsession() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-xsession", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_xsession), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-location: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_location: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetLocation() 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 gsd_accounts_user_complete_set_location() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-location", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_location), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-home-directory: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_homedir: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetHomeDirectory() 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 gsd_accounts_user_complete_set_home_directory() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-home-directory", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_home_directory), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-shell: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_shell: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetShell() 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 gsd_accounts_user_complete_set_shell() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-shell", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_shell), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-icon-file: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_filename: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetIconFile() 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 gsd_accounts_user_complete_set_icon_file() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-icon-file", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_icon_file), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-locked: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_locked: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetLocked() 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 gsd_accounts_user_complete_set_locked() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-locked", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_locked), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); ++ ++ /** ++ * GsdAccountsUser::handle-set-account-type: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_accountType: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetAccountType() 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 gsd_accounts_user_complete_set_account_type() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-account-type", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_account_type), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT); ++ ++ /** ++ * GsdAccountsUser::handle-set-password-mode: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_mode: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetPasswordMode() 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 gsd_accounts_user_complete_set_password_mode() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-password-mode", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_password_mode), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT); ++ ++ /** ++ * GsdAccountsUser::handle-set-password: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_password: Argument passed by remote caller. ++ * @arg_hint: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetPassword() 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 gsd_accounts_user_complete_set_password() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-password", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_password), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 3, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-password-hint: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_hint: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetPasswordHint() 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 gsd_accounts_user_complete_set_password_hint() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-password-hint", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_password_hint), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccountsUser::handle-set-automatic-login: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_enabled: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the SetAutomaticLogin() 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 gsd_accounts_user_complete_set_automatic_login() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-set-automatic-login", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_set_automatic_login), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); ++ ++ /** ++ * GsdAccountsUser::handle-get-password-expiration-policy: ++ * @object: A #GsdAccountsUser. ++ * @invocation: A #GDBusMethodInvocation. ++ * ++ * Signal emitted when a remote caller is invoking the GetPasswordExpirationPolicy() 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 gsd_accounts_user_complete_get_password_expiration_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-get-password-expiration-policy", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, handle_get_password_expiration_policy), ++ 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: */ ++ /** ++ * GsdAccountsUser::changed: ++ * @object: A #GsdAccountsUser. ++ * ++ * On the client-side, this signal is emitted whenever the D-Bus signal "Changed" is received. ++ * ++ * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. ++ */ ++ g_signal_new ("changed", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsUserIface, changed), ++ NULL, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_NONE, ++ 0); ++ ++ /* GObject properties for D-Bus properties: */ ++ /** ++ * GsdAccountsUser:uid: ++ * ++ * Represents the D-Bus property "Uid". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_uint64 ("uid", "Uid", "Uid", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:user-name: ++ * ++ * Represents the D-Bus property "UserName". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("user-name", "UserName", "UserName", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:real-name: ++ * ++ * Represents the D-Bus property "RealName". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("real-name", "RealName", "RealName", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:account-type: ++ * ++ * Represents the D-Bus property "AccountType". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_int ("account-type", "AccountType", "AccountType", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:home-directory: ++ * ++ * Represents the D-Bus property "HomeDirectory". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("home-directory", "HomeDirectory", "HomeDirectory", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:shell: ++ * ++ * Represents the D-Bus property "Shell". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("shell", "Shell", "Shell", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:email: ++ * ++ * Represents the D-Bus property "Email". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("email", "Email", "Email", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:language: ++ * ++ * Represents the D-Bus property "Language". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("language", "Language", "Language", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:xsession: ++ * ++ * Represents the D-Bus property "XSession". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("xsession", "XSession", "XSession", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:location: ++ * ++ * Represents the D-Bus property "Location". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("location", "Location", "Location", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:login-frequency: ++ * ++ * Represents the D-Bus property "LoginFrequency". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_uint64 ("login-frequency", "LoginFrequency", "LoginFrequency", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:login-time: ++ * ++ * Represents the D-Bus property "LoginTime". ++ * ++ * 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_int64 ("login-time", "LoginTime", "LoginTime", G_MININT64, G_MAXINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:login-history: ++ * ++ * Represents the D-Bus property "LoginHistory". ++ * ++ * 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 ("login-history", "LoginHistory", "LoginHistory", G_VARIANT_TYPE ("a(xxa{sv})"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:icon-file: ++ * ++ * Represents the D-Bus property "IconFile". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("icon-file", "IconFile", "IconFile", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:locked: ++ * ++ * Represents the D-Bus property "Locked". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_boolean ("locked", "Locked", "Locked", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:password-mode: ++ * ++ * Represents the D-Bus property "PasswordMode". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_int ("password-mode", "PasswordMode", "PasswordMode", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:password-hint: ++ * ++ * Represents the D-Bus property "PasswordHint". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("password-hint", "PasswordHint", "PasswordHint", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:automatic-login: ++ * ++ * Represents the D-Bus property "AutomaticLogin". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_boolean ("automatic-login", "AutomaticLogin", "AutomaticLogin", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:system-account: ++ * ++ * Represents the D-Bus property "SystemAccount". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_boolean ("system-account", "SystemAccount", "SystemAccount", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccountsUser:local-account: ++ * ++ * Represents the D-Bus property "LocalAccount". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_boolean ("local-account", "LocalAccount", "LocalAccount", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++} ++ ++/** ++ * gsd_accounts_user_get_uid: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "Uid" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++guint64 ++gsd_accounts_user_get_uid (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_uid (object); ++} ++ ++/** ++ * gsd_accounts_user_set_uid: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "Uid" 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 ++gsd_accounts_user_set_uid (GsdAccountsUser *object, guint64 value) ++{ ++ g_object_set (G_OBJECT (object), "uid", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_user_name: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "UserName" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_user_name() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_user_name (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_user_name (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_user_name: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "UserName" 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 * ++gsd_accounts_user_dup_user_name (GsdAccountsUser *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "user-name", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_user_name: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "UserName" 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 ++gsd_accounts_user_set_user_name (GsdAccountsUser *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "user-name", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_real_name: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "RealName" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_real_name() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_real_name (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_real_name (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_real_name: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "RealName" 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 * ++gsd_accounts_user_dup_real_name (GsdAccountsUser *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "real-name", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_real_name: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "RealName" 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 ++gsd_accounts_user_set_real_name (GsdAccountsUser *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "real-name", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_account_type: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "AccountType" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++gint ++gsd_accounts_user_get_account_type (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_account_type (object); ++} ++ ++/** ++ * gsd_accounts_user_set_account_type: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "AccountType" 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 ++gsd_accounts_user_set_account_type (GsdAccountsUser *object, gint value) ++{ ++ g_object_set (G_OBJECT (object), "account-type", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_home_directory: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "HomeDirectory" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_home_directory() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_home_directory (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_home_directory (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_home_directory: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "HomeDirectory" 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 * ++gsd_accounts_user_dup_home_directory (GsdAccountsUser *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "home-directory", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_home_directory: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "HomeDirectory" 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 ++gsd_accounts_user_set_home_directory (GsdAccountsUser *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "home-directory", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_shell: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "Shell" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_shell() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_shell (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_shell (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_shell: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "Shell" 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 * ++gsd_accounts_user_dup_shell (GsdAccountsUser *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "shell", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_shell: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "Shell" 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 ++gsd_accounts_user_set_shell (GsdAccountsUser *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "shell", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_email: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "Email" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_email() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_email (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_email (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_email: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "Email" 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 * ++gsd_accounts_user_dup_email (GsdAccountsUser *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "email", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_email: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "Email" 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 ++gsd_accounts_user_set_email (GsdAccountsUser *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "email", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_language: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "Language" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_language() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_language (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_language (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_language: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "Language" 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 * ++gsd_accounts_user_dup_language (GsdAccountsUser *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "language", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_language: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "Language" 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 ++gsd_accounts_user_set_language (GsdAccountsUser *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "language", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_xsession: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "XSession" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_xsession() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_xsession (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_xsession (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_xsession: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "XSession" 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 * ++gsd_accounts_user_dup_xsession (GsdAccountsUser *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "xsession", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_xsession: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "XSession" 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 ++gsd_accounts_user_set_xsession (GsdAccountsUser *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "xsession", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_location: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "Location" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_location() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_location (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_location (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_location: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "Location" 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 * ++gsd_accounts_user_dup_location (GsdAccountsUser *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "location", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_location: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "Location" 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 ++gsd_accounts_user_set_location (GsdAccountsUser *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "location", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_login_frequency: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "LoginFrequency" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++guint64 ++gsd_accounts_user_get_login_frequency (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_login_frequency (object); ++} ++ ++/** ++ * gsd_accounts_user_set_login_frequency: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "LoginFrequency" 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 ++gsd_accounts_user_set_login_frequency (GsdAccountsUser *object, guint64 value) ++{ ++ g_object_set (G_OBJECT (object), "login-frequency", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_login_time: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "LoginTime" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++gint64 ++gsd_accounts_user_get_login_time (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_login_time (object); ++} ++ ++/** ++ * gsd_accounts_user_set_login_time: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "LoginTime" 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 ++gsd_accounts_user_set_login_time (GsdAccountsUser *object, gint64 value) ++{ ++ g_object_set (G_OBJECT (object), "login-time", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_login_history: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "LoginHistory" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_login_history() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_login_history (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_login_history (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_login_history: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "LoginHistory" 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 * ++gsd_accounts_user_dup_login_history (GsdAccountsUser *object) ++{ ++ GVariant *value; ++ g_object_get (G_OBJECT (object), "login-history", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_login_history: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "LoginHistory" 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 ++gsd_accounts_user_set_login_history (GsdAccountsUser *object, GVariant *value) ++{ ++ g_object_set (G_OBJECT (object), "login-history", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_icon_file: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "IconFile" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_icon_file() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_icon_file (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_icon_file (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_icon_file: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "IconFile" 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 * ++gsd_accounts_user_dup_icon_file (GsdAccountsUser *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "icon-file", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_icon_file: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "IconFile" 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 ++gsd_accounts_user_set_icon_file (GsdAccountsUser *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "icon-file", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_locked: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "Locked" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++gboolean ++gsd_accounts_user_get_locked (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_locked (object); ++} ++ ++/** ++ * gsd_accounts_user_set_locked: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "Locked" 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 ++gsd_accounts_user_set_locked (GsdAccountsUser *object, gboolean value) ++{ ++ g_object_set (G_OBJECT (object), "locked", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_password_mode: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "PasswordMode" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++gint ++gsd_accounts_user_get_password_mode (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_password_mode (object); ++} ++ ++/** ++ * gsd_accounts_user_set_password_mode: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "PasswordMode" 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 ++gsd_accounts_user_set_password_mode (GsdAccountsUser *object, gint value) ++{ ++ g_object_set (G_OBJECT (object), "password-mode", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_password_hint: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "PasswordHint" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_user_dup_password_hint() if on another thread. ++ * ++ * 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 * ++gsd_accounts_user_get_password_hint (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_password_hint (object); ++} ++ ++/** ++ * gsd_accounts_user_dup_password_hint: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets a copy of the "PasswordHint" 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 * ++gsd_accounts_user_dup_password_hint (GsdAccountsUser *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "password-hint", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_user_set_password_hint: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "PasswordHint" 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 ++gsd_accounts_user_set_password_hint (GsdAccountsUser *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "password-hint", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_automatic_login: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "AutomaticLogin" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++gboolean ++gsd_accounts_user_get_automatic_login (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_automatic_login (object); ++} ++ ++/** ++ * gsd_accounts_user_set_automatic_login: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "AutomaticLogin" 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 ++gsd_accounts_user_set_automatic_login (GsdAccountsUser *object, gboolean value) ++{ ++ g_object_set (G_OBJECT (object), "automatic-login", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_system_account: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "SystemAccount" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++gboolean ++gsd_accounts_user_get_system_account (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_system_account (object); ++} ++ ++/** ++ * gsd_accounts_user_set_system_account: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "SystemAccount" 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 ++gsd_accounts_user_set_system_account (GsdAccountsUser *object, gboolean value) ++{ ++ g_object_set (G_OBJECT (object), "system-account", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_get_local_account: (skip) ++ * @object: A #GsdAccountsUser. ++ * ++ * Gets the value of the "LocalAccount" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++gboolean ++gsd_accounts_user_get_local_account (GsdAccountsUser *object) ++{ ++ return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_local_account (object); ++} ++ ++/** ++ * gsd_accounts_user_set_local_account: (skip) ++ * @object: A #GsdAccountsUser. ++ * @value: The value to set. ++ * ++ * Sets the "LocalAccount" 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 ++gsd_accounts_user_set_local_account (GsdAccountsUser *object, gboolean value) ++{ ++ g_object_set (G_OBJECT (object), "local-account", value, NULL); ++} ++ ++/** ++ * gsd_accounts_user_emit_changed: ++ * @object: A #GsdAccountsUser. ++ * ++ * Emits the "Changed" D-Bus signal. ++ */ ++void ++gsd_accounts_user_emit_changed ( ++ GsdAccountsUser *object) ++{ ++ g_signal_emit_by_name (object, "changed"); ++} ++ ++/** ++ * gsd_accounts_user_call_set_user_name: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetUserName() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_user_name_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_user_name_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_user_name ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetUserName", ++ g_variant_new ("(s)", ++ arg_name), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_user_name_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_user_name(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_user_name(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_user_name_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_user_name_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetUserName() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_user_name() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_user_name_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetUserName", ++ g_variant_new ("(s)", ++ arg_name), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_real_name: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetRealName() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_real_name_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_real_name_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_real_name ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetRealName", ++ g_variant_new ("(s)", ++ arg_name), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_real_name_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_real_name(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_real_name(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_real_name_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_real_name_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetRealName() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_real_name() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_real_name_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetRealName", ++ g_variant_new ("(s)", ++ arg_name), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_email: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_email: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetEmail() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_email_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_email_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_email ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_email, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetEmail", ++ g_variant_new ("(s)", ++ arg_email), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_email_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_email(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_email(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_email_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_email_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_email: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetEmail() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_email() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_email_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_email, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetEmail", ++ g_variant_new ("(s)", ++ arg_email), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_language: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_language: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetLanguage() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_language_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_language_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_language ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_language, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetLanguage", ++ g_variant_new ("(s)", ++ arg_language), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_language_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_language(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_language(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_language_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_language_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_language: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetLanguage() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_language() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_language_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_language, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetLanguage", ++ g_variant_new ("(s)", ++ arg_language), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_xsession: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_x_session: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetXSession() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_xsession_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_xsession_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_xsession ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_x_session, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetXSession", ++ g_variant_new ("(s)", ++ arg_x_session), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_xsession_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_xsession(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_xsession(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_xsession_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_xsession_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_x_session: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetXSession() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_xsession() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_xsession_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_x_session, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetXSession", ++ g_variant_new ("(s)", ++ arg_x_session), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_location: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_location: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetLocation() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_location_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_location_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_location ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_location, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetLocation", ++ g_variant_new ("(s)", ++ arg_location), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_location_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_location(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_location(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_location_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_location_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_location: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetLocation() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_location() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_location_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_location, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetLocation", ++ g_variant_new ("(s)", ++ arg_location), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_home_directory: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_homedir: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetHomeDirectory() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_home_directory_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_home_directory_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_home_directory ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_homedir, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetHomeDirectory", ++ g_variant_new ("(s)", ++ arg_homedir), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_home_directory_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_home_directory(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_home_directory(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_home_directory_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_home_directory_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_homedir: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetHomeDirectory() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_home_directory() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_home_directory_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_homedir, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetHomeDirectory", ++ g_variant_new ("(s)", ++ arg_homedir), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_shell: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_shell: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetShell() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_shell_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_shell_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_shell ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_shell, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetShell", ++ g_variant_new ("(s)", ++ arg_shell), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_shell_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_shell(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_shell(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_shell_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_shell_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_shell: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetShell() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_shell() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_shell_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_shell, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetShell", ++ g_variant_new ("(s)", ++ arg_shell), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_icon_file: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_filename: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetIconFile() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_icon_file_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_icon_file_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_icon_file ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_filename, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetIconFile", ++ g_variant_new ("(s)", ++ arg_filename), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_icon_file_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_icon_file(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_icon_file(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_icon_file_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_icon_file_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_filename: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetIconFile() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_icon_file() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_icon_file_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_filename, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetIconFile", ++ g_variant_new ("(s)", ++ arg_filename), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_locked: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_locked: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetLocked() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_locked_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_locked_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_locked ( ++ GsdAccountsUser *proxy, ++ gboolean arg_locked, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetLocked", ++ g_variant_new ("(b)", ++ arg_locked), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_locked_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_locked(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_locked(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_locked_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_locked_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_locked: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetLocked() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_locked() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_locked_sync ( ++ GsdAccountsUser *proxy, ++ gboolean arg_locked, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetLocked", ++ g_variant_new ("(b)", ++ arg_locked), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_account_type: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_accountType: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetAccountType() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_account_type_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_account_type_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_account_type ( ++ GsdAccountsUser *proxy, ++ gint arg_accountType, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetAccountType", ++ g_variant_new ("(i)", ++ arg_accountType), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_account_type_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_account_type(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_account_type(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_account_type_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_account_type_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_accountType: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetAccountType() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_account_type() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_account_type_sync ( ++ GsdAccountsUser *proxy, ++ gint arg_accountType, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetAccountType", ++ g_variant_new ("(i)", ++ arg_accountType), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_password_mode: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_mode: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetPasswordMode() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_password_mode_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_password_mode_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_password_mode ( ++ GsdAccountsUser *proxy, ++ gint arg_mode, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetPasswordMode", ++ g_variant_new ("(i)", ++ arg_mode), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_password_mode_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_password_mode(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_password_mode(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_password_mode_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_password_mode_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_mode: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetPasswordMode() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_password_mode() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_password_mode_sync ( ++ GsdAccountsUser *proxy, ++ gint arg_mode, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetPasswordMode", ++ g_variant_new ("(i)", ++ arg_mode), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_password: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_password: Argument to pass with the method invocation. ++ * @arg_hint: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetPassword() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_password_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_password_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_password ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_password, ++ const gchar *arg_hint, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetPassword", ++ g_variant_new ("(ss)", ++ arg_password, ++ arg_hint), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_password_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_password(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_password(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_password_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_password_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_password: Argument to pass with the method invocation. ++ * @arg_hint: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetPassword() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_password() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_password_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_password, ++ const gchar *arg_hint, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetPassword", ++ g_variant_new ("(ss)", ++ arg_password, ++ arg_hint), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_password_hint: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_hint: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetPasswordHint() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_password_hint_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_password_hint_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_password_hint ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_hint, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetPasswordHint", ++ g_variant_new ("(s)", ++ arg_hint), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_password_hint_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_password_hint(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_password_hint(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_password_hint_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_password_hint_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_hint: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetPasswordHint() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_password_hint() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_password_hint_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_hint, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetPasswordHint", ++ g_variant_new ("(s)", ++ arg_hint), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_set_automatic_login: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_enabled: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the SetAutomaticLogin() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_set_automatic_login_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_set_automatic_login_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_set_automatic_login ( ++ GsdAccountsUser *proxy, ++ gboolean arg_enabled, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "SetAutomaticLogin", ++ g_variant_new ("(b)", ++ arg_enabled), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_set_automatic_login_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_set_automatic_login(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_set_automatic_login(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_automatic_login_finish ( ++ GsdAccountsUser *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; ++} ++ ++/** ++ * gsd_accounts_user_call_set_automatic_login_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @arg_enabled: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the SetAutomaticLogin() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_set_automatic_login() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_set_automatic_login_sync ( ++ GsdAccountsUser *proxy, ++ gboolean arg_enabled, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "SetAutomaticLogin", ++ g_variant_new ("(b)", ++ arg_enabled), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_get_password_expiration_policy: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @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 GetPasswordExpirationPolicy() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_call_get_password_expiration_policy_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_call_get_password_expiration_policy_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_user_call_get_password_expiration_policy ( ++ GsdAccountsUser *proxy, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "GetPasswordExpirationPolicy", ++ g_variant_new ("()"), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_user_call_get_password_expiration_policy_finish: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @out_expiration_time: (out): Return location for return parameter or %NULL to ignore. ++ * @out_last_change_time: (out): Return location for return parameter or %NULL to ignore. ++ * @out_min_days_between_changes: (out): Return location for return parameter or %NULL to ignore. ++ * @out_max_days_between_changes: (out): Return location for return parameter or %NULL to ignore. ++ * @out_days_to_warn: (out): Return location for return parameter or %NULL to ignore. ++ * @out_days_after_expiration_until_lock: (out): Return location for return parameter or %NULL to ignore. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_call_get_password_expiration_policy(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_user_call_get_password_expiration_policy(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_get_password_expiration_policy_finish ( ++ GsdAccountsUser *proxy, ++ gint64 *out_expiration_time, ++ gint64 *out_last_change_time, ++ gint64 *out_min_days_between_changes, ++ gint64 *out_max_days_between_changes, ++ gint64 *out_days_to_warn, ++ gint64 *out_days_after_expiration_until_lock, ++ 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, ++ "(xxxxxx)", ++ out_expiration_time, ++ out_last_change_time, ++ out_min_days_between_changes, ++ out_max_days_between_changes, ++ out_days_to_warn, ++ out_days_after_expiration_until_lock); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_call_get_password_expiration_policy_sync: ++ * @proxy: A #GsdAccountsUserProxy. ++ * @out_expiration_time: (out): Return location for return parameter or %NULL to ignore. ++ * @out_last_change_time: (out): Return location for return parameter or %NULL to ignore. ++ * @out_min_days_between_changes: (out): Return location for return parameter or %NULL to ignore. ++ * @out_max_days_between_changes: (out): Return location for return parameter or %NULL to ignore. ++ * @out_days_to_warn: (out): Return location for return parameter or %NULL to ignore. ++ * @out_days_after_expiration_until_lock: (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 GetPasswordExpirationPolicy() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_call_get_password_expiration_policy() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_user_call_get_password_expiration_policy_sync ( ++ GsdAccountsUser *proxy, ++ gint64 *out_expiration_time, ++ gint64 *out_last_change_time, ++ gint64 *out_min_days_between_changes, ++ gint64 *out_max_days_between_changes, ++ gint64 *out_days_to_warn, ++ gint64 *out_days_after_expiration_until_lock, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "GetPasswordExpirationPolicy", ++ g_variant_new ("()"), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(xxxxxx)", ++ out_expiration_time, ++ out_last_change_time, ++ out_min_days_between_changes, ++ out_max_days_between_changes, ++ out_days_to_warn, ++ out_days_after_expiration_until_lock); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_user_complete_set_user_name: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetUserName() 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 ++gsd_accounts_user_complete_set_user_name ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_real_name: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetRealName() 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 ++gsd_accounts_user_complete_set_real_name ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_email: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetEmail() 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 ++gsd_accounts_user_complete_set_email ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_language: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetLanguage() 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 ++gsd_accounts_user_complete_set_language ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_xsession: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetXSession() 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 ++gsd_accounts_user_complete_set_xsession ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_location: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetLocation() 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 ++gsd_accounts_user_complete_set_location ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_home_directory: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetHomeDirectory() 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 ++gsd_accounts_user_complete_set_home_directory ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_shell: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetShell() 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 ++gsd_accounts_user_complete_set_shell ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_icon_file: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetIconFile() 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 ++gsd_accounts_user_complete_set_icon_file ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_locked: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetLocked() 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 ++gsd_accounts_user_complete_set_locked ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_account_type: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetAccountType() 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 ++gsd_accounts_user_complete_set_account_type ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_password_mode: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetPasswordMode() 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 ++gsd_accounts_user_complete_set_password_mode ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_password: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetPassword() 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 ++gsd_accounts_user_complete_set_password ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_password_hint: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetPasswordHint() 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 ++gsd_accounts_user_complete_set_password_hint ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_set_automatic_login: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the SetAutomaticLogin() 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 ++gsd_accounts_user_complete_set_automatic_login ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_user_complete_get_password_expiration_policy: ++ * @object: A #GsdAccountsUser. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * @expiration_time: Parameter to return. ++ * @last_change_time: Parameter to return. ++ * @min_days_between_changes: Parameter to return. ++ * @max_days_between_changes: Parameter to return. ++ * @days_to_warn: Parameter to return. ++ * @days_after_expiration_until_lock: Parameter to return. ++ * ++ * Helper function used in service implementations to finish handling invocations of the GetPasswordExpirationPolicy() 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 ++gsd_accounts_user_complete_get_password_expiration_policy ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ gint64 expiration_time, ++ gint64 last_change_time, ++ gint64 min_days_between_changes, ++ gint64 max_days_between_changes, ++ gint64 days_to_warn, ++ gint64 days_after_expiration_until_lock) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("(xxxxxx)", ++ expiration_time, ++ last_change_time, ++ min_days_between_changes, ++ max_days_between_changes, ++ days_to_warn, ++ days_after_expiration_until_lock)); ++} ++ ++/* ------------------------------------------------------------------------ */ ++ ++/** ++ * GsdAccountsUserProxy: ++ * ++ * The #GsdAccountsUserProxy structure contains only private data and should only be accessed using the provided API. ++ */ ++ ++/** ++ * GsdAccountsUserProxyClass: ++ * @parent_class: The parent class. ++ * ++ * Class structure for #GsdAccountsUserProxy. ++ */ ++ ++struct _GsdAccountsUserProxyPrivate ++{ ++ GData *qdata; ++}; ++ ++static void gsd_accounts_user_proxy_iface_init (GsdAccountsUserIface *iface); ++ ++#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 ++G_DEFINE_TYPE_WITH_CODE (GsdAccountsUserProxy, gsd_accounts_user_proxy, G_TYPE_DBUS_PROXY, ++ G_ADD_PRIVATE (GsdAccountsUserProxy) ++ G_IMPLEMENT_INTERFACE (GSD_TYPE_ACCOUNTS_USER, gsd_accounts_user_proxy_iface_init)) ++ ++#else ++G_DEFINE_TYPE_WITH_CODE (GsdAccountsUserProxy, gsd_accounts_user_proxy, G_TYPE_DBUS_PROXY, ++ G_IMPLEMENT_INTERFACE (GSD_TYPE_ACCOUNTS_USER, gsd_accounts_user_proxy_iface_init)) ++ ++#endif ++static void ++gsd_accounts_user_proxy_finalize (GObject *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ g_datalist_clear (&proxy->priv->qdata); ++ G_OBJECT_CLASS (gsd_accounts_user_proxy_parent_class)->finalize (object); ++} ++ ++static void ++gsd_accounts_user_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 < 20); ++ info = _gsd_accounts_user_property_info_pointers[prop_id - 1]; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); ++ if (info->use_gvariant) ++ { ++ g_value_set_variant (value, variant); ++ } ++ else ++ { ++ if (variant != NULL) ++ g_dbus_gvariant_to_gvalue (variant, value); ++ } ++ if (variant != NULL) ++ g_variant_unref (variant); ++} ++ ++static void ++gsd_accounts_user_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.Accounts.User: %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 ++gsd_accounts_user_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 < 20); ++ info = _gsd_accounts_user_property_info_pointers[prop_id - 1]; ++ variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); ++ g_dbus_proxy_call (G_DBUS_PROXY (object), ++ "org.freedesktop.DBus.Properties.Set", ++ g_variant_new ("(ssv)", "org.freedesktop.Accounts.User", info->parent_struct.name, variant), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ NULL, (GAsyncReadyCallback) gsd_accounts_user_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); ++ g_variant_unref (variant); ++} ++ ++static void ++gsd_accounts_user_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 *) &_gsd_accounts_user_interface_info.parent_struct, signal_name); ++ if (info == NULL) ++ return; ++ num_params = g_variant_n_children (parameters); ++ paramv = g_new0 (GValue, num_params + 1); ++ g_value_init (¶mv[0], GSD_TYPE_ACCOUNTS_USER); ++ g_value_set_object (¶mv[0], proxy); ++ g_variant_iter_init (&iter, parameters); ++ n = 1; ++ while ((child = g_variant_iter_next_value (&iter)) != NULL) ++ { ++ _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; ++ if (arg_info->use_gvariant) ++ { ++ g_value_init (¶mv[n], G_TYPE_VARIANT); ++ g_value_set_variant (¶mv[n], child); ++ n++; ++ } ++ else ++ g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); ++ g_variant_unref (child); ++ } ++ signal_id = g_signal_lookup (info->signal_name, GSD_TYPE_ACCOUNTS_USER); ++ g_signal_emitv (paramv, signal_id, 0, NULL); ++ for (n = 0; n < num_params + 1; n++) ++ g_value_unset (¶mv[n]); ++ g_free (paramv); ++} ++ ++static void ++gsd_accounts_user_proxy_g_properties_changed (GDBusProxy *_proxy, ++ GVariant *changed_properties, ++ const gchar *const *invalidated_properties) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (_proxy); ++ guint n; ++ const gchar *key; ++ GVariantIter *iter; ++ _ExtendedGDBusPropertyInfo *info; ++ g_variant_get (changed_properties, "a{sv}", &iter); ++ while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) ++ { ++ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsd_accounts_user_interface_info.parent_struct, key); ++ g_datalist_remove_data (&proxy->priv->qdata, key); ++ if (info != NULL) ++ g_object_notify (G_OBJECT (proxy), info->hyphen_name); ++ } ++ g_variant_iter_free (iter); ++ for (n = 0; invalidated_properties[n] != NULL; n++) ++ { ++ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsd_accounts_user_interface_info.parent_struct, invalidated_properties[n]); ++ g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); ++ if (info != NULL) ++ g_object_notify (G_OBJECT (proxy), info->hyphen_name); ++ } ++} ++ ++static guint64 ++gsd_accounts_user_proxy_get_uid (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ guint64 value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Uid"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_uint64 (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_proxy_get_user_name (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "UserName"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_proxy_get_real_name (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "RealName"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static gint ++gsd_accounts_user_proxy_get_account_type (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ gint value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AccountType"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_int32 (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_proxy_get_home_directory (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "HomeDirectory"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_proxy_get_shell (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Shell"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_proxy_get_email (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Email"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_proxy_get_language (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Language"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_proxy_get_xsession (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "XSession"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_proxy_get_location (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Location"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static guint64 ++gsd_accounts_user_proxy_get_login_frequency (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ guint64 value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LoginFrequency"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_uint64 (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static gint64 ++gsd_accounts_user_proxy_get_login_time (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ gint64 value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LoginTime"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_int64 (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static GVariant * ++gsd_accounts_user_proxy_get_login_history (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ GVariant *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LoginHistory"); ++ value = variant; ++ if (variant != NULL) ++ g_variant_unref (variant); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_proxy_get_icon_file (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "IconFile"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static gboolean ++gsd_accounts_user_proxy_get_locked (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ gboolean value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Locked"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_boolean (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static gint ++gsd_accounts_user_proxy_get_password_mode (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ gint value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "PasswordMode"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_int32 (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_proxy_get_password_hint (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "PasswordHint"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static gboolean ++gsd_accounts_user_proxy_get_automatic_login (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ gboolean value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AutomaticLogin"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_boolean (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static gboolean ++gsd_accounts_user_proxy_get_system_account (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ gboolean value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "SystemAccount"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_boolean (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static gboolean ++gsd_accounts_user_proxy_get_local_account (GsdAccountsUser *object) ++{ ++ GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); ++ GVariant *variant; ++ gboolean value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LocalAccount"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_boolean (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static void ++gsd_accounts_user_proxy_init (GsdAccountsUserProxy *proxy) ++{ ++#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 ++ proxy->priv = gsd_accounts_user_proxy_get_instance_private (proxy); ++#else ++ proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GSD_TYPE_ACCOUNTS_USER_PROXY, GsdAccountsUserProxyPrivate); ++#endif ++ ++ g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gsd_accounts_user_interface_info ()); ++} ++ ++static void ++gsd_accounts_user_proxy_class_init (GsdAccountsUserProxyClass *klass) ++{ ++ GObjectClass *gobject_class; ++ GDBusProxyClass *proxy_class; ++ ++ gobject_class = G_OBJECT_CLASS (klass); ++ gobject_class->finalize = gsd_accounts_user_proxy_finalize; ++ gobject_class->get_property = gsd_accounts_user_proxy_get_property; ++ gobject_class->set_property = gsd_accounts_user_proxy_set_property; ++ ++ proxy_class = G_DBUS_PROXY_CLASS (klass); ++ proxy_class->g_signal = gsd_accounts_user_proxy_g_signal; ++ proxy_class->g_properties_changed = gsd_accounts_user_proxy_g_properties_changed; ++ ++ gsd_accounts_user_override_properties (gobject_class, 1); ++ ++#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 ++ g_type_class_add_private (klass, sizeof (GsdAccountsUserProxyPrivate)); ++#endif ++} ++ ++static void ++gsd_accounts_user_proxy_iface_init (GsdAccountsUserIface *iface) ++{ ++ iface->get_uid = gsd_accounts_user_proxy_get_uid; ++ iface->get_user_name = gsd_accounts_user_proxy_get_user_name; ++ iface->get_real_name = gsd_accounts_user_proxy_get_real_name; ++ iface->get_account_type = gsd_accounts_user_proxy_get_account_type; ++ iface->get_home_directory = gsd_accounts_user_proxy_get_home_directory; ++ iface->get_shell = gsd_accounts_user_proxy_get_shell; ++ iface->get_email = gsd_accounts_user_proxy_get_email; ++ iface->get_language = gsd_accounts_user_proxy_get_language; ++ iface->get_xsession = gsd_accounts_user_proxy_get_xsession; ++ iface->get_location = gsd_accounts_user_proxy_get_location; ++ iface->get_login_frequency = gsd_accounts_user_proxy_get_login_frequency; ++ iface->get_login_time = gsd_accounts_user_proxy_get_login_time; ++ iface->get_login_history = gsd_accounts_user_proxy_get_login_history; ++ iface->get_icon_file = gsd_accounts_user_proxy_get_icon_file; ++ iface->get_locked = gsd_accounts_user_proxy_get_locked; ++ iface->get_password_mode = gsd_accounts_user_proxy_get_password_mode; ++ iface->get_password_hint = gsd_accounts_user_proxy_get_password_hint; ++ iface->get_automatic_login = gsd_accounts_user_proxy_get_automatic_login; ++ iface->get_system_account = gsd_accounts_user_proxy_get_system_account; ++ iface->get_local_account = gsd_accounts_user_proxy_get_local_account; ++} ++ ++/** ++ * gsd_accounts_user_proxy_new: ++ * @connection: A #GDBusConnection. ++ * @flags: Flags from the #GDBusProxyFlags enumeration. ++ * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. ++ * @object_path: An object path. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.Accounts.User. See g_dbus_proxy_new() for more details. ++ * ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_proxy_new_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_proxy_new_sync() for the synchronous, blocking version of this constructor. ++ */ ++void ++gsd_accounts_user_proxy_new ( ++ GDBusConnection *connection, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_async_initable_new_async (GSD_TYPE_ACCOUNTS_USER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts.User", NULL); ++} ++ ++/** ++ * gsd_accounts_user_proxy_new_finish: ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_proxy_new(). ++ * @error: Return location for error or %NULL ++ * ++ * Finishes an operation started with gsd_accounts_user_proxy_new(). ++ * ++ * Returns: (transfer full) (type GsdAccountsUserProxy): The constructed proxy object or %NULL if @error is set. ++ */ ++GsdAccountsUser * ++gsd_accounts_user_proxy_new_finish ( ++ GAsyncResult *res, ++ GError **error) ++{ ++ GObject *ret; ++ GObject *source_object; ++ source_object = g_async_result_get_source_object (res); ++ ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); ++ g_object_unref (source_object); ++ if (ret != NULL) ++ return GSD_ACCOUNTS_USER (ret); ++ else ++ return NULL; ++} ++ ++/** ++ * gsd_accounts_user_proxy_new_sync: ++ * @connection: A #GDBusConnection. ++ * @flags: Flags from the #GDBusProxyFlags enumeration. ++ * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. ++ * @object_path: An object path. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL ++ * ++ * Synchronously creates a proxy for the D-Bus interface org.freedesktop.Accounts.User. See g_dbus_proxy_new_sync() for more details. ++ * ++ * The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_proxy_new() for the asynchronous version of this constructor. ++ * ++ * Returns: (transfer full) (type GsdAccountsUserProxy): The constructed proxy object or %NULL if @error is set. ++ */ ++GsdAccountsUser * ++gsd_accounts_user_proxy_new_sync ( ++ GDBusConnection *connection, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GInitable *ret; ++ ret = g_initable_new (GSD_TYPE_ACCOUNTS_USER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts.User", NULL); ++ if (ret != NULL) ++ return GSD_ACCOUNTS_USER (ret); ++ else ++ return NULL; ++} ++ ++ ++/** ++ * gsd_accounts_user_proxy_new_for_bus: ++ * @bus_type: A #GBusType. ++ * @flags: Flags from the #GDBusProxyFlags enumeration. ++ * @name: A bus name (well-known or unique). ++ * @object_path: An object path. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied. ++ * @user_data: User data to pass to @callback. ++ * ++ * Like gsd_accounts_user_proxy_new() but takes a #GBusType instead of a #GDBusConnection. ++ * ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_user_proxy_new_for_bus_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_user_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. ++ */ ++void ++gsd_accounts_user_proxy_new_for_bus ( ++ GBusType bus_type, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_async_initable_new_async (GSD_TYPE_ACCOUNTS_USER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts.User", NULL); ++} ++ ++/** ++ * gsd_accounts_user_proxy_new_for_bus_finish: ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_user_proxy_new_for_bus(). ++ * @error: Return location for error or %NULL ++ * ++ * Finishes an operation started with gsd_accounts_user_proxy_new_for_bus(). ++ * ++ * Returns: (transfer full) (type GsdAccountsUserProxy): The constructed proxy object or %NULL if @error is set. ++ */ ++GsdAccountsUser * ++gsd_accounts_user_proxy_new_for_bus_finish ( ++ GAsyncResult *res, ++ GError **error) ++{ ++ GObject *ret; ++ GObject *source_object; ++ source_object = g_async_result_get_source_object (res); ++ ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); ++ g_object_unref (source_object); ++ if (ret != NULL) ++ return GSD_ACCOUNTS_USER (ret); ++ else ++ return NULL; ++} ++ ++/** ++ * gsd_accounts_user_proxy_new_for_bus_sync: ++ * @bus_type: A #GBusType. ++ * @flags: Flags from the #GDBusProxyFlags enumeration. ++ * @name: A bus name (well-known or unique). ++ * @object_path: An object path. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL ++ * ++ * Like gsd_accounts_user_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. ++ * ++ * The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_user_proxy_new_for_bus() for the asynchronous version of this constructor. ++ * ++ * Returns: (transfer full) (type GsdAccountsUserProxy): The constructed proxy object or %NULL if @error is set. ++ */ ++GsdAccountsUser * ++gsd_accounts_user_proxy_new_for_bus_sync ( ++ GBusType bus_type, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GInitable *ret; ++ ret = g_initable_new (GSD_TYPE_ACCOUNTS_USER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts.User", NULL); ++ if (ret != NULL) ++ return GSD_ACCOUNTS_USER (ret); ++ else ++ return NULL; ++} ++ ++ ++/* ------------------------------------------------------------------------ */ ++ ++/** ++ * GsdAccountsUserSkeleton: ++ * ++ * The #GsdAccountsUserSkeleton structure contains only private data and should only be accessed using the provided API. ++ */ ++ ++/** ++ * GsdAccountsUserSkeletonClass: ++ * @parent_class: The parent class. ++ * ++ * Class structure for #GsdAccountsUserSkeleton. ++ */ ++ ++struct _GsdAccountsUserSkeletonPrivate ++{ ++ GValue *properties; ++ GList *changed_properties; ++ GSource *changed_properties_idle_source; ++ GMainContext *context; ++ GMutex lock; ++}; ++ ++static void ++_gsd_accounts_user_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) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_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], GSD_TYPE_ACCOUNTS_USER); ++ g_value_set_object (¶mv[n++], skeleton); ++ g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); ++ g_value_set_object (¶mv[n++], invocation); ++ if (info->pass_fdlist) ++ { ++#ifdef G_OS_UNIX ++ g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); ++ g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); ++#else ++ g_assert_not_reached (); ++#endif ++ } ++ g_variant_iter_init (&iter, parameters); ++ while ((child = g_variant_iter_next_value (&iter)) != NULL) ++ { ++ _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; ++ if (arg_info->use_gvariant) ++ { ++ g_value_init (¶mv[n], G_TYPE_VARIANT); ++ g_value_set_variant (¶mv[n], child); ++ n++; ++ } ++ else ++ g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); ++ g_variant_unref (child); ++ } ++ signal_id = g_signal_lookup (info->signal_name, GSD_TYPE_ACCOUNTS_USER); ++ g_value_init (&return_value, G_TYPE_BOOLEAN); ++ g_signal_emitv (paramv, signal_id, 0, &return_value); ++ if (!g_value_get_boolean (&return_value)) ++ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); ++ g_value_unset (&return_value); ++ for (n = 0; n < num_params + num_extra; n++) ++ g_value_unset (¶mv[n]); ++ g_free (paramv); ++} ++ ++static GVariant * ++_gsd_accounts_user_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) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (user_data); ++ GValue value = G_VALUE_INIT; ++ GParamSpec *pspec; ++ _ExtendedGDBusPropertyInfo *info; ++ GVariant *ret; ++ ret = NULL; ++ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsd_accounts_user_interface_info.parent_struct, property_name); ++ g_assert (info != NULL); ++ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); ++ if (pspec == NULL) ++ { ++ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); ++ } ++ else ++ { ++ g_value_init (&value, pspec->value_type); ++ g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); ++ ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); ++ g_value_unset (&value); ++ } ++ return ret; ++} ++ ++static gboolean ++_gsd_accounts_user_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) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (user_data); ++ GValue value = G_VALUE_INIT; ++ GParamSpec *pspec; ++ _ExtendedGDBusPropertyInfo *info; ++ gboolean ret; ++ ret = FALSE; ++ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsd_accounts_user_interface_info.parent_struct, property_name); ++ g_assert (info != NULL); ++ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); ++ if (pspec == NULL) ++ { ++ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); ++ } ++ else ++ { ++ if (info->use_gvariant) ++ g_value_set_variant (&value, variant); ++ else ++ g_dbus_gvariant_to_gvalue (variant, &value); ++ g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); ++ g_value_unset (&value); ++ ret = TRUE; ++ } ++ return ret; ++} ++ ++static const GDBusInterfaceVTable _gsd_accounts_user_skeleton_vtable = ++{ ++ _gsd_accounts_user_skeleton_handle_method_call, ++ _gsd_accounts_user_skeleton_handle_get_property, ++ _gsd_accounts_user_skeleton_handle_set_property, ++ {NULL} ++}; ++ ++static GDBusInterfaceInfo * ++gsd_accounts_user_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) ++{ ++ return gsd_accounts_user_interface_info (); ++} ++ ++static GDBusInterfaceVTable * ++gsd_accounts_user_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) ++{ ++ return (GDBusInterfaceVTable *) &_gsd_accounts_user_skeleton_vtable; ++} ++ ++static GVariant * ++gsd_accounts_user_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (_skeleton); ++ ++ GVariantBuilder builder; ++ guint n; ++ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); ++ if (_gsd_accounts_user_interface_info.parent_struct.properties == NULL) ++ goto out; ++ for (n = 0; _gsd_accounts_user_interface_info.parent_struct.properties[n] != NULL; n++) ++ { ++ GDBusPropertyInfo *info = _gsd_accounts_user_interface_info.parent_struct.properties[n]; ++ if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) ++ { ++ GVariant *value; ++ value = _gsd_accounts_user_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Accounts.User", info->name, NULL, skeleton); ++ if (value != NULL) ++ { ++ g_variant_take_ref (value); ++ g_variant_builder_add (&builder, "{sv}", info->name, value); ++ g_variant_unref (value); ++ } ++ } ++ } ++out: ++ return g_variant_builder_end (&builder); ++} ++ ++static gboolean _gsd_accounts_user_emit_changed (gpointer user_data); ++ ++static void ++gsd_accounts_user_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (_skeleton); ++ gboolean emit_changed = FALSE; ++ ++ g_mutex_lock (&skeleton->priv->lock); ++ if (skeleton->priv->changed_properties_idle_source != NULL) ++ { ++ g_source_destroy (skeleton->priv->changed_properties_idle_source); ++ skeleton->priv->changed_properties_idle_source = NULL; ++ emit_changed = TRUE; ++ } ++ g_mutex_unlock (&skeleton->priv->lock); ++ ++ if (emit_changed) ++ _gsd_accounts_user_emit_changed (skeleton); ++} ++ ++static void ++_gsd_accounts_user_on_signal_changed ( ++ GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ ++ GList *connections, *l; ++ GVariant *signal_variant; ++ connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); ++ ++ signal_variant = g_variant_ref_sink (g_variant_new ("()")); ++ for (l = connections; l != NULL; l = l->next) ++ { ++ GDBusConnection *connection = l->data; ++ g_dbus_connection_emit_signal (connection, ++ NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Accounts.User", "Changed", ++ signal_variant, NULL); ++ } ++ g_variant_unref (signal_variant); ++ g_list_free_full (connections, g_object_unref); ++} ++ ++static void gsd_accounts_user_skeleton_iface_init (GsdAccountsUserIface *iface); ++#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 ++G_DEFINE_TYPE_WITH_CODE (GsdAccountsUserSkeleton, gsd_accounts_user_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, ++ G_ADD_PRIVATE (GsdAccountsUserSkeleton) ++ G_IMPLEMENT_INTERFACE (GSD_TYPE_ACCOUNTS_USER, gsd_accounts_user_skeleton_iface_init)) ++ ++#else ++G_DEFINE_TYPE_WITH_CODE (GsdAccountsUserSkeleton, gsd_accounts_user_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, ++ G_IMPLEMENT_INTERFACE (GSD_TYPE_ACCOUNTS_USER, gsd_accounts_user_skeleton_iface_init)) ++ ++#endif ++static void ++gsd_accounts_user_skeleton_finalize (GObject *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ guint n; ++ for (n = 0; n < 20; 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 (gsd_accounts_user_skeleton_parent_class)->finalize (object); ++} ++ ++static void ++gsd_accounts_user_skeleton_get_property (GObject *object, ++ guint prop_id, ++ GValue *value, ++ GParamSpec *pspec G_GNUC_UNUSED) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ g_assert (prop_id != 0 && prop_id - 1 < 20); ++ g_mutex_lock (&skeleton->priv->lock); ++ g_value_copy (&skeleton->priv->properties[prop_id - 1], value); ++ g_mutex_unlock (&skeleton->priv->lock); ++} ++ ++static gboolean ++_gsd_accounts_user_emit_changed (gpointer user_data) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (user_data); ++ GList *l; ++ GVariantBuilder builder; ++ GVariantBuilder invalidated_builder; ++ guint num_changes; ++ ++ g_mutex_lock (&skeleton->priv->lock); ++ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); ++ g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); ++ for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) ++ { ++ ChangedProperty *cp = l->data; ++ GVariant *variant; ++ const GValue *cur_value; ++ ++ cur_value = &skeleton->priv->properties[cp->prop_id - 1]; ++ if (!_g_value_equal (cur_value, &cp->orig_value)) ++ { ++ variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); ++ g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); ++ g_variant_unref (variant); ++ num_changes++; ++ } ++ } ++ if (num_changes > 0) ++ { ++ GList *connections, *ll; ++ GVariant *signal_variant; ++ signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.Accounts.User", ++ &builder, &invalidated_builder)); ++ connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); ++ for (ll = connections; ll != NULL; ll = ll->next) ++ { ++ GDBusConnection *connection = ll->data; ++ ++ g_dbus_connection_emit_signal (connection, ++ NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), ++ "org.freedesktop.DBus.Properties", ++ "PropertiesChanged", ++ signal_variant, ++ NULL); ++ } ++ g_variant_unref (signal_variant); ++ g_list_free_full (connections, g_object_unref); ++ } ++ else ++ { ++ g_variant_builder_clear (&builder); ++ g_variant_builder_clear (&invalidated_builder); ++ } ++ g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); ++ skeleton->priv->changed_properties = NULL; ++ skeleton->priv->changed_properties_idle_source = NULL; ++ g_mutex_unlock (&skeleton->priv->lock); ++ return FALSE; ++} ++ ++static void ++_gsd_accounts_user_schedule_emit_changed (GsdAccountsUserSkeleton *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 ++gsd_accounts_user_skeleton_notify (GObject *object, ++ GParamSpec *pspec G_GNUC_UNUSED) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ g_mutex_lock (&skeleton->priv->lock); ++ if (skeleton->priv->changed_properties != NULL && ++ skeleton->priv->changed_properties_idle_source == NULL) ++ { ++ skeleton->priv->changed_properties_idle_source = g_idle_source_new (); ++ g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); ++ g_source_set_callback (skeleton->priv->changed_properties_idle_source, _gsd_accounts_user_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); ++ g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _gsd_accounts_user_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 ++gsd_accounts_user_skeleton_set_property (GObject *object, ++ guint prop_id, ++ const GValue *value, ++ GParamSpec *pspec) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ g_assert (prop_id != 0 && prop_id - 1 < 20); ++ 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) ++ _gsd_accounts_user_schedule_emit_changed (skeleton, _gsd_accounts_user_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); ++ g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); ++ g_object_notify_by_pspec (object, pspec); ++ } ++ g_mutex_unlock (&skeleton->priv->lock); ++ g_object_thaw_notify (object); ++} ++ ++static void ++gsd_accounts_user_skeleton_init (GsdAccountsUserSkeleton *skeleton) ++{ ++#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 ++ skeleton->priv = gsd_accounts_user_skeleton_get_instance_private (skeleton); ++#else ++ skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GSD_TYPE_ACCOUNTS_USER_SKELETON, GsdAccountsUserSkeletonPrivate); ++#endif ++ ++ g_mutex_init (&skeleton->priv->lock); ++ skeleton->priv->context = g_main_context_ref_thread_default (); ++ skeleton->priv->properties = g_new0 (GValue, 20); ++ g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT64); ++ g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING); ++ g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING); ++ g_value_init (&skeleton->priv->properties[3], G_TYPE_INT); ++ g_value_init (&skeleton->priv->properties[4], G_TYPE_STRING); ++ g_value_init (&skeleton->priv->properties[5], G_TYPE_STRING); ++ g_value_init (&skeleton->priv->properties[6], G_TYPE_STRING); ++ g_value_init (&skeleton->priv->properties[7], G_TYPE_STRING); ++ g_value_init (&skeleton->priv->properties[8], G_TYPE_STRING); ++ g_value_init (&skeleton->priv->properties[9], G_TYPE_STRING); ++ g_value_init (&skeleton->priv->properties[10], G_TYPE_UINT64); ++ g_value_init (&skeleton->priv->properties[11], G_TYPE_INT64); ++ g_value_init (&skeleton->priv->properties[12], G_TYPE_VARIANT); ++ g_value_init (&skeleton->priv->properties[13], G_TYPE_STRING); ++ g_value_init (&skeleton->priv->properties[14], G_TYPE_BOOLEAN); ++ g_value_init (&skeleton->priv->properties[15], G_TYPE_INT); ++ g_value_init (&skeleton->priv->properties[16], G_TYPE_STRING); ++ g_value_init (&skeleton->priv->properties[17], G_TYPE_BOOLEAN); ++ g_value_init (&skeleton->priv->properties[18], G_TYPE_BOOLEAN); ++ g_value_init (&skeleton->priv->properties[19], G_TYPE_BOOLEAN); ++} ++ ++static guint64 ++gsd_accounts_user_skeleton_get_uid (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ guint64 value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_uint64 (&(skeleton->priv->properties[0])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_skeleton_get_user_name (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[1])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_skeleton_get_real_name (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[2])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static gint ++gsd_accounts_user_skeleton_get_account_type (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ gint value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_int (&(skeleton->priv->properties[3])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_skeleton_get_home_directory (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[4])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_skeleton_get_shell (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[5])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_skeleton_get_email (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[6])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_skeleton_get_language (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[7])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_skeleton_get_xsession (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[8])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_skeleton_get_location (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[9])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static guint64 ++gsd_accounts_user_skeleton_get_login_frequency (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ guint64 value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_uint64 (&(skeleton->priv->properties[10])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static gint64 ++gsd_accounts_user_skeleton_get_login_time (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ gint64 value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_int64 (&(skeleton->priv->properties[11])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static GVariant * ++gsd_accounts_user_skeleton_get_login_history (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ GVariant *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_variant (&(skeleton->priv->properties[12])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_skeleton_get_icon_file (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[13])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static gboolean ++gsd_accounts_user_skeleton_get_locked (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ gboolean value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_boolean (&(skeleton->priv->properties[14])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static gint ++gsd_accounts_user_skeleton_get_password_mode (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ gint value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_int (&(skeleton->priv->properties[15])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static const gchar * ++gsd_accounts_user_skeleton_get_password_hint (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[16])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static gboolean ++gsd_accounts_user_skeleton_get_automatic_login (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ gboolean value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_boolean (&(skeleton->priv->properties[17])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static gboolean ++gsd_accounts_user_skeleton_get_system_account (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ gboolean value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_boolean (&(skeleton->priv->properties[18])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static gboolean ++gsd_accounts_user_skeleton_get_local_account (GsdAccountsUser *object) ++{ ++ GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); ++ gboolean value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_boolean (&(skeleton->priv->properties[19])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static void ++gsd_accounts_user_skeleton_class_init (GsdAccountsUserSkeletonClass *klass) ++{ ++ GObjectClass *gobject_class; ++ GDBusInterfaceSkeletonClass *skeleton_class; ++ ++ gobject_class = G_OBJECT_CLASS (klass); ++ gobject_class->finalize = gsd_accounts_user_skeleton_finalize; ++ gobject_class->get_property = gsd_accounts_user_skeleton_get_property; ++ gobject_class->set_property = gsd_accounts_user_skeleton_set_property; ++ gobject_class->notify = gsd_accounts_user_skeleton_notify; ++ ++ ++ gsd_accounts_user_override_properties (gobject_class, 1); ++ ++ skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); ++ skeleton_class->get_info = gsd_accounts_user_skeleton_dbus_interface_get_info; ++ skeleton_class->get_properties = gsd_accounts_user_skeleton_dbus_interface_get_properties; ++ skeleton_class->flush = gsd_accounts_user_skeleton_dbus_interface_flush; ++ skeleton_class->get_vtable = gsd_accounts_user_skeleton_dbus_interface_get_vtable; ++ ++#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 ++ g_type_class_add_private (klass, sizeof (GsdAccountsUserSkeletonPrivate)); ++#endif ++} ++ ++static void ++gsd_accounts_user_skeleton_iface_init (GsdAccountsUserIface *iface) ++{ ++ iface->changed = _gsd_accounts_user_on_signal_changed; ++ iface->get_uid = gsd_accounts_user_skeleton_get_uid; ++ iface->get_user_name = gsd_accounts_user_skeleton_get_user_name; ++ iface->get_real_name = gsd_accounts_user_skeleton_get_real_name; ++ iface->get_account_type = gsd_accounts_user_skeleton_get_account_type; ++ iface->get_home_directory = gsd_accounts_user_skeleton_get_home_directory; ++ iface->get_shell = gsd_accounts_user_skeleton_get_shell; ++ iface->get_email = gsd_accounts_user_skeleton_get_email; ++ iface->get_language = gsd_accounts_user_skeleton_get_language; ++ iface->get_xsession = gsd_accounts_user_skeleton_get_xsession; ++ iface->get_location = gsd_accounts_user_skeleton_get_location; ++ iface->get_login_frequency = gsd_accounts_user_skeleton_get_login_frequency; ++ iface->get_login_time = gsd_accounts_user_skeleton_get_login_time; ++ iface->get_login_history = gsd_accounts_user_skeleton_get_login_history; ++ iface->get_icon_file = gsd_accounts_user_skeleton_get_icon_file; ++ iface->get_locked = gsd_accounts_user_skeleton_get_locked; ++ iface->get_password_mode = gsd_accounts_user_skeleton_get_password_mode; ++ iface->get_password_hint = gsd_accounts_user_skeleton_get_password_hint; ++ iface->get_automatic_login = gsd_accounts_user_skeleton_get_automatic_login; ++ iface->get_system_account = gsd_accounts_user_skeleton_get_system_account; ++ iface->get_local_account = gsd_accounts_user_skeleton_get_local_account; ++} ++ ++/** ++ * gsd_accounts_user_skeleton_new: ++ * ++ * Creates a skeleton object for the D-Bus interface org.freedesktop.Accounts.User. ++ * ++ * Returns: (transfer full) (type GsdAccountsUserSkeleton): The skeleton object. ++ */ ++GsdAccountsUser * ++gsd_accounts_user_skeleton_new (void) ++{ ++ return GSD_ACCOUNTS_USER (g_object_new (GSD_TYPE_ACCOUNTS_USER_SKELETON, NULL)); ++} +diff --git a/plugins/account/org.freedesktop.Accounts.User.h b/plugins/account/org.freedesktop.Accounts.User.h +new file mode 100644 +index 00000000..f5a0ca0f +--- /dev/null ++++ b/plugins/account/org.freedesktop.Accounts.User.h +@@ -0,0 +1,725 @@ ++/* ++ * Generated by gdbus-codegen 2.54.1. DO NOT EDIT. ++ * ++ * The license of this code is the same as for the source it was derived from. ++ */ ++ ++#ifndef __ORG_FREEDESKTOP_ACCOUNTS_USER_H__ ++#define __ORG_FREEDESKTOP_ACCOUNTS_USER_H__ ++ ++#include ++ ++G_BEGIN_DECLS ++ ++ ++/* ------------------------------------------------------------------------ */ ++/* Declarations for org.freedesktop.Accounts.User */ ++ ++#define GSD_TYPE_ACCOUNTS_USER (gsd_accounts_user_get_type ()) ++#define GSD_ACCOUNTS_USER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_ACCOUNTS_USER, GsdAccountsUser)) ++#define GSD_IS_ACCOUNTS_USER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_ACCOUNTS_USER)) ++#define GSD_ACCOUNTS_USER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GSD_TYPE_ACCOUNTS_USER, GsdAccountsUserIface)) ++ ++struct _GsdAccountsUser; ++typedef struct _GsdAccountsUser GsdAccountsUser; ++typedef struct _GsdAccountsUserIface GsdAccountsUserIface; ++ ++struct _GsdAccountsUserIface ++{ ++ GTypeInterface parent_iface; ++ ++ ++ ++ gboolean (*handle_get_password_expiration_policy) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++ gboolean (*handle_set_account_type) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ gint arg_accountType); ++ ++ gboolean (*handle_set_automatic_login) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ gboolean arg_enabled); ++ ++ gboolean (*handle_set_email) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_email); ++ ++ gboolean (*handle_set_home_directory) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_homedir); ++ ++ gboolean (*handle_set_icon_file) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_filename); ++ ++ gboolean (*handle_set_language) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_language); ++ ++ gboolean (*handle_set_location) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_location); ++ ++ gboolean (*handle_set_locked) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ gboolean arg_locked); ++ ++ gboolean (*handle_set_password) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_password, ++ const gchar *arg_hint); ++ ++ gboolean (*handle_set_password_hint) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_hint); ++ ++ gboolean (*handle_set_password_mode) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ gint arg_mode); ++ ++ gboolean (*handle_set_real_name) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_name); ++ ++ gboolean (*handle_set_shell) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_shell); ++ ++ gboolean (*handle_set_user_name) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_name); ++ ++ gboolean (*handle_set_xsession) ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_x_session); ++ ++ gint (*get_account_type) (GsdAccountsUser *object); ++ ++ gboolean (*get_automatic_login) (GsdAccountsUser *object); ++ ++ const gchar * (*get_email) (GsdAccountsUser *object); ++ ++ const gchar * (*get_home_directory) (GsdAccountsUser *object); ++ ++ const gchar * (*get_icon_file) (GsdAccountsUser *object); ++ ++ const gchar * (*get_language) (GsdAccountsUser *object); ++ ++ gboolean (*get_local_account) (GsdAccountsUser *object); ++ ++ const gchar * (*get_location) (GsdAccountsUser *object); ++ ++ gboolean (*get_locked) (GsdAccountsUser *object); ++ ++ guint64 (*get_login_frequency) (GsdAccountsUser *object); ++ ++ GVariant * (*get_login_history) (GsdAccountsUser *object); ++ ++ gint64 (*get_login_time) (GsdAccountsUser *object); ++ ++ const gchar * (*get_password_hint) (GsdAccountsUser *object); ++ ++ gint (*get_password_mode) (GsdAccountsUser *object); ++ ++ const gchar * (*get_real_name) (GsdAccountsUser *object); ++ ++ const gchar * (*get_shell) (GsdAccountsUser *object); ++ ++ gboolean (*get_system_account) (GsdAccountsUser *object); ++ ++ guint64 (*get_uid) (GsdAccountsUser *object); ++ ++ const gchar * (*get_user_name) (GsdAccountsUser *object); ++ ++ const gchar * (*get_xsession) (GsdAccountsUser *object); ++ ++ void (*changed) ( ++ GsdAccountsUser *object); ++ ++}; ++ ++GType gsd_accounts_user_get_type (void) G_GNUC_CONST; ++ ++GDBusInterfaceInfo *gsd_accounts_user_interface_info (void); ++guint gsd_accounts_user_override_properties (GObjectClass *klass, guint property_id_begin); ++ ++ ++/* D-Bus method call completion functions: */ ++void gsd_accounts_user_complete_set_user_name ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_real_name ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_email ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_language ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_xsession ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_location ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_home_directory ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_shell ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_icon_file ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_locked ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_account_type ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_password_mode ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_password ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_password_hint ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_set_automatic_login ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_user_complete_get_password_expiration_policy ( ++ GsdAccountsUser *object, ++ GDBusMethodInvocation *invocation, ++ gint64 expiration_time, ++ gint64 last_change_time, ++ gint64 min_days_between_changes, ++ gint64 max_days_between_changes, ++ gint64 days_to_warn, ++ gint64 days_after_expiration_until_lock); ++ ++ ++ ++/* D-Bus signal emissions functions: */ ++void gsd_accounts_user_emit_changed ( ++ GsdAccountsUser *object); ++ ++ ++ ++/* D-Bus method calls: */ ++void gsd_accounts_user_call_set_user_name ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_user_name_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_user_name_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_real_name ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_real_name_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_real_name_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_email ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_email, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_email_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_email_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_email, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_language ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_language, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_language_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_language_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_language, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_xsession ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_x_session, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_xsession_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_xsession_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_x_session, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_location ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_location, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_location_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_location_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_location, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_home_directory ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_homedir, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_home_directory_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_home_directory_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_homedir, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_shell ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_shell, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_shell_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_shell_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_shell, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_icon_file ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_filename, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_icon_file_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_icon_file_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_filename, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_locked ( ++ GsdAccountsUser *proxy, ++ gboolean arg_locked, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_locked_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_locked_sync ( ++ GsdAccountsUser *proxy, ++ gboolean arg_locked, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_account_type ( ++ GsdAccountsUser *proxy, ++ gint arg_accountType, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_account_type_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_account_type_sync ( ++ GsdAccountsUser *proxy, ++ gint arg_accountType, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_password_mode ( ++ GsdAccountsUser *proxy, ++ gint arg_mode, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_password_mode_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_password_mode_sync ( ++ GsdAccountsUser *proxy, ++ gint arg_mode, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_password ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_password, ++ const gchar *arg_hint, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_password_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_password_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_password, ++ const gchar *arg_hint, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_password_hint ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_hint, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_password_hint_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_password_hint_sync ( ++ GsdAccountsUser *proxy, ++ const gchar *arg_hint, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_set_automatic_login ( ++ GsdAccountsUser *proxy, ++ gboolean arg_enabled, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_set_automatic_login_finish ( ++ GsdAccountsUser *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_set_automatic_login_sync ( ++ GsdAccountsUser *proxy, ++ gboolean arg_enabled, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_call_get_password_expiration_policy ( ++ GsdAccountsUser *proxy, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_user_call_get_password_expiration_policy_finish ( ++ GsdAccountsUser *proxy, ++ gint64 *out_expiration_time, ++ gint64 *out_last_change_time, ++ gint64 *out_min_days_between_changes, ++ gint64 *out_max_days_between_changes, ++ gint64 *out_days_to_warn, ++ gint64 *out_days_after_expiration_until_lock, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_user_call_get_password_expiration_policy_sync ( ++ GsdAccountsUser *proxy, ++ gint64 *out_expiration_time, ++ gint64 *out_last_change_time, ++ gint64 *out_min_days_between_changes, ++ gint64 *out_max_days_between_changes, ++ gint64 *out_days_to_warn, ++ gint64 *out_days_after_expiration_until_lock, ++ GCancellable *cancellable, ++ GError **error); ++ ++ ++ ++/* D-Bus property accessors: */ ++guint64 gsd_accounts_user_get_uid (GsdAccountsUser *object); ++void gsd_accounts_user_set_uid (GsdAccountsUser *object, guint64 value); ++ ++const gchar *gsd_accounts_user_get_user_name (GsdAccountsUser *object); ++gchar *gsd_accounts_user_dup_user_name (GsdAccountsUser *object); ++void gsd_accounts_user_set_user_name (GsdAccountsUser *object, const gchar *value); ++ ++const gchar *gsd_accounts_user_get_real_name (GsdAccountsUser *object); ++gchar *gsd_accounts_user_dup_real_name (GsdAccountsUser *object); ++void gsd_accounts_user_set_real_name (GsdAccountsUser *object, const gchar *value); ++ ++gint gsd_accounts_user_get_account_type (GsdAccountsUser *object); ++void gsd_accounts_user_set_account_type (GsdAccountsUser *object, gint value); ++ ++const gchar *gsd_accounts_user_get_home_directory (GsdAccountsUser *object); ++gchar *gsd_accounts_user_dup_home_directory (GsdAccountsUser *object); ++void gsd_accounts_user_set_home_directory (GsdAccountsUser *object, const gchar *value); ++ ++const gchar *gsd_accounts_user_get_shell (GsdAccountsUser *object); ++gchar *gsd_accounts_user_dup_shell (GsdAccountsUser *object); ++void gsd_accounts_user_set_shell (GsdAccountsUser *object, const gchar *value); ++ ++const gchar *gsd_accounts_user_get_email (GsdAccountsUser *object); ++gchar *gsd_accounts_user_dup_email (GsdAccountsUser *object); ++void gsd_accounts_user_set_email (GsdAccountsUser *object, const gchar *value); ++ ++const gchar *gsd_accounts_user_get_language (GsdAccountsUser *object); ++gchar *gsd_accounts_user_dup_language (GsdAccountsUser *object); ++void gsd_accounts_user_set_language (GsdAccountsUser *object, const gchar *value); ++ ++const gchar *gsd_accounts_user_get_xsession (GsdAccountsUser *object); ++gchar *gsd_accounts_user_dup_xsession (GsdAccountsUser *object); ++void gsd_accounts_user_set_xsession (GsdAccountsUser *object, const gchar *value); ++ ++const gchar *gsd_accounts_user_get_location (GsdAccountsUser *object); ++gchar *gsd_accounts_user_dup_location (GsdAccountsUser *object); ++void gsd_accounts_user_set_location (GsdAccountsUser *object, const gchar *value); ++ ++guint64 gsd_accounts_user_get_login_frequency (GsdAccountsUser *object); ++void gsd_accounts_user_set_login_frequency (GsdAccountsUser *object, guint64 value); ++ ++gint64 gsd_accounts_user_get_login_time (GsdAccountsUser *object); ++void gsd_accounts_user_set_login_time (GsdAccountsUser *object, gint64 value); ++ ++GVariant *gsd_accounts_user_get_login_history (GsdAccountsUser *object); ++GVariant *gsd_accounts_user_dup_login_history (GsdAccountsUser *object); ++void gsd_accounts_user_set_login_history (GsdAccountsUser *object, GVariant *value); ++ ++const gchar *gsd_accounts_user_get_icon_file (GsdAccountsUser *object); ++gchar *gsd_accounts_user_dup_icon_file (GsdAccountsUser *object); ++void gsd_accounts_user_set_icon_file (GsdAccountsUser *object, const gchar *value); ++ ++gboolean gsd_accounts_user_get_locked (GsdAccountsUser *object); ++void gsd_accounts_user_set_locked (GsdAccountsUser *object, gboolean value); ++ ++gint gsd_accounts_user_get_password_mode (GsdAccountsUser *object); ++void gsd_accounts_user_set_password_mode (GsdAccountsUser *object, gint value); ++ ++const gchar *gsd_accounts_user_get_password_hint (GsdAccountsUser *object); ++gchar *gsd_accounts_user_dup_password_hint (GsdAccountsUser *object); ++void gsd_accounts_user_set_password_hint (GsdAccountsUser *object, const gchar *value); ++ ++gboolean gsd_accounts_user_get_automatic_login (GsdAccountsUser *object); ++void gsd_accounts_user_set_automatic_login (GsdAccountsUser *object, gboolean value); ++ ++gboolean gsd_accounts_user_get_system_account (GsdAccountsUser *object); ++void gsd_accounts_user_set_system_account (GsdAccountsUser *object, gboolean value); ++ ++gboolean gsd_accounts_user_get_local_account (GsdAccountsUser *object); ++void gsd_accounts_user_set_local_account (GsdAccountsUser *object, gboolean value); ++ ++ ++/* ---- */ ++ ++#define GSD_TYPE_ACCOUNTS_USER_PROXY (gsd_accounts_user_proxy_get_type ()) ++#define GSD_ACCOUNTS_USER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_ACCOUNTS_USER_PROXY, GsdAccountsUserProxy)) ++#define GSD_ACCOUNTS_USER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSD_TYPE_ACCOUNTS_USER_PROXY, GsdAccountsUserProxyClass)) ++#define GSD_ACCOUNTS_USER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_ACCOUNTS_USER_PROXY, GsdAccountsUserProxyClass)) ++#define GSD_IS_ACCOUNTS_USER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_ACCOUNTS_USER_PROXY)) ++#define GSD_IS_ACCOUNTS_USER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_ACCOUNTS_USER_PROXY)) ++ ++typedef struct _GsdAccountsUserProxy GsdAccountsUserProxy; ++typedef struct _GsdAccountsUserProxyClass GsdAccountsUserProxyClass; ++typedef struct _GsdAccountsUserProxyPrivate GsdAccountsUserProxyPrivate; ++ ++struct _GsdAccountsUserProxy ++{ ++ /*< private >*/ ++ GDBusProxy parent_instance; ++ GsdAccountsUserProxyPrivate *priv; ++}; ++ ++struct _GsdAccountsUserProxyClass ++{ ++ GDBusProxyClass parent_class; ++}; ++ ++GType gsd_accounts_user_proxy_get_type (void) G_GNUC_CONST; ++ ++#if GLIB_CHECK_VERSION(2, 44, 0) ++G_DEFINE_AUTOPTR_CLEANUP_FUNC (GsdAccountsUserProxy, g_object_unref) ++#endif ++ ++void gsd_accounts_user_proxy_new ( ++ GDBusConnection *connection, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++GsdAccountsUser *gsd_accounts_user_proxy_new_finish ( ++ GAsyncResult *res, ++ GError **error); ++GsdAccountsUser *gsd_accounts_user_proxy_new_sync ( ++ GDBusConnection *connection, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_user_proxy_new_for_bus ( ++ GBusType bus_type, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++GsdAccountsUser *gsd_accounts_user_proxy_new_for_bus_finish ( ++ GAsyncResult *res, ++ GError **error); ++GsdAccountsUser *gsd_accounts_user_proxy_new_for_bus_sync ( ++ GBusType bus_type, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GError **error); ++ ++ ++/* ---- */ ++ ++#define GSD_TYPE_ACCOUNTS_USER_SKELETON (gsd_accounts_user_skeleton_get_type ()) ++#define GSD_ACCOUNTS_USER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_ACCOUNTS_USER_SKELETON, GsdAccountsUserSkeleton)) ++#define GSD_ACCOUNTS_USER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSD_TYPE_ACCOUNTS_USER_SKELETON, GsdAccountsUserSkeletonClass)) ++#define GSD_ACCOUNTS_USER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_ACCOUNTS_USER_SKELETON, GsdAccountsUserSkeletonClass)) ++#define GSD_IS_ACCOUNTS_USER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_ACCOUNTS_USER_SKELETON)) ++#define GSD_IS_ACCOUNTS_USER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_ACCOUNTS_USER_SKELETON)) ++ ++typedef struct _GsdAccountsUserSkeleton GsdAccountsUserSkeleton; ++typedef struct _GsdAccountsUserSkeletonClass GsdAccountsUserSkeletonClass; ++typedef struct _GsdAccountsUserSkeletonPrivate GsdAccountsUserSkeletonPrivate; ++ ++struct _GsdAccountsUserSkeleton ++{ ++ /*< private >*/ ++ GDBusInterfaceSkeleton parent_instance; ++ GsdAccountsUserSkeletonPrivate *priv; ++}; ++ ++struct _GsdAccountsUserSkeletonClass ++{ ++ GDBusInterfaceSkeletonClass parent_class; ++}; ++ ++GType gsd_accounts_user_skeleton_get_type (void) G_GNUC_CONST; ++ ++#if GLIB_CHECK_VERSION(2, 44, 0) ++G_DEFINE_AUTOPTR_CLEANUP_FUNC (GsdAccountsUserSkeleton, g_object_unref) ++#endif ++ ++GsdAccountsUser *gsd_accounts_user_skeleton_new (void); ++ ++ ++G_END_DECLS ++ ++#endif /* __ORG_FREEDESKTOP_ACCOUNTS_USER_H__ */ +diff --git a/plugins/account/org.freedesktop.Accounts.User.xml b/plugins/account/org.freedesktop.Accounts.User.xml +new file mode 100644 +index 00000000..4ab989a0 +--- /dev/null ++++ b/plugins/account/org.freedesktop.Accounts.User.xml +@@ -0,0 +1,825 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The new username. ++ ++ ++ ++ ++ ++ ++ Sets the users username. Note that it is usually not allowed ++ to have multiple users with the same username. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the username of any user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The new name, typically in the form "Firstname Lastname". ++ ++ ++ ++ ++ ++ ++ Sets the users real name. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.change-own-user-data ++ To change his own name ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the name of another user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The new email address. ++ ++ ++ ++ ++ ++ ++ Sets the users email address. ++ ++ ++ Note that setting an email address in the AccountsService is ++ not the same as configuring a mail client. Mail clients might ++ default to email address that is configured here, though. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.change-own-user-data ++ To change his own email address ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the email address of another user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The new language, as a locale specification like "de_DE.UTF-8". ++ ++ ++ ++ ++ ++ ++ Sets the users language. ++ ++ ++ The expectation is that display managers will start the ++ users session with this locale. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.change-own-user-data ++ To change his own language ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the language of another user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The new xsession to start (e.g. "gnome") ++ ++ ++ ++ ++ ++ ++ Sets the users x session. ++ ++ ++ The expectation is that display managers will log the user in to this ++ specified session, if available. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.change-own-user-data ++ To change his own language ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the language of another user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The new location as a freeform string. ++ ++ ++ ++ ++ ++ ++ Sets the users location. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.change-own-user-data ++ To change his own location ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the location of another user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The new homedir as an absolute path. ++ ++ ++ ++ ++ ++ ++ Sets the users home directory. ++ ++ ++ Note that changing the users home directory moves all the content ++ from the old location to the new one, and is potentially an ++ expensive operation. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the home directory of a user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The new user shell. ++ ++ ++ ++ ++ ++ ++ Sets the users shell. ++ ++ ++ Note that setting the shell to a non-allowed program may ++ prevent the user from logging in. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the shell of a user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The absolute filename of a png file to use as the users icon. ++ ++ ++ ++ ++ ++ ++ Sets the users icon. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.change-own-user-data ++ To change his own icon ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the icon of another user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Whether to lock or unlock the users account. ++ ++ ++ ++ ++ ++ ++ Locks or unlocks a users account. ++ ++ ++ Locking an account prevents the user from logging in. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.user-administration ++ To lock or unlock user accounts ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The new account type, encoded as an integer: ++ ++ ++ 0 ++ Standard user ++ ++ ++ 1 ++ Administrator ++ ++ ++ ++ ++ ++ ++ ++ ++ Changes the users account type. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change an account type ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The new password mode, encoded as an integer: ++ ++ ++ 0 ++ Regular password ++ ++ ++ 1 ++ Password must be set at next login ++ ++ ++ 2 ++ No password ++ ++ ++ ++ ++ ++ ++ ++ ++ Changes the users password mode. ++ ++ ++ Note that changing the password mode has the side-effect of ++ unlocking the account. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change a users password mode ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The crypted password. ++ ++ ++ ++ ++ ++ ++ The password hint. ++ ++ ++ ++ ++ ++ ++ Sets a new password for this user. ++ ++ ++ Note that setting a password has the side-effect of ++ unlocking the account. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the password of a user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The password hint. ++ ++ ++ ++ ++ ++ ++ Sets the users password hint. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.change-own-user-data ++ To change his own language ++ ++ ++ org.freedesktop.accounts.user-administration ++ To change the language of another user ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Whether to enable automatic login for this user. ++ ++ ++ ++ ++ ++ ++ Enables or disables automatic login for a user. ++ ++ ++ Note that usually only one user can have automatic login ++ enabled, so turning it on for a user will disable it for ++ the previously configured autologin user. ++ ++ ++ ++ The caller needs one of the following PolicyKit authorizations: ++ ++ ++ org.freedesktop.accounts.set-login-option ++ To change the login screen configuration ++ ++ ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The uid of the user. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The username of the user. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The users real name. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The users account type, encoded as an integer: ++ ++ ++ 0 ++ Standard user ++ ++ ++ 1 ++ Administrator ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The users home directory. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The users shell. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The email address. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The users language, as a locale specification like "de_DE.UTF-8". ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The users x session. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The users location. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ How often the user has logged in. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The last login time. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The login history for this user. ++ Each entry in the array represents a login session. The first two ++ members are the login time and logout time, as timestamps (seconds since the epoch). If the session is still running, the logout time ++ is 0. ++ ++ ++ The a{sv} member is a dictionary containing additional information ++ about the session. Possible members include 'type' (with values like ':0', 'tty0', 'pts/0' etc). ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The filename of a png file containing the users icon. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Whether the users account is locked. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The password mode for the user account, encoded as an integer: ++ ++ ++ 0 ++ Regular password ++ ++ ++ 1 ++ Password must be set at next login ++ ++ ++ 2 ++ No password ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The password hint for the user. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Whether automatic login is enabled for the user. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Whether this is a 'system' account, like 'root' or 'nobody'. ++ System accounts should normally not appear in lists of ++ users, and ListCachedUsers will not include such accounts. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Whether the user is a local account or not. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Emitted when the user is changed. ++ ++ ++ ++ ++ ++ ++ +diff --git a/plugins/account/org.freedesktop.Accounts.c b/plugins/account/org.freedesktop.Accounts.c +new file mode 100644 +index 00000000..669c43a8 +--- /dev/null ++++ b/plugins/account/org.freedesktop.Accounts.c +@@ -0,0 +1,3016 @@ ++/* ++ * Generated by gdbus-codegen 2.54.1. 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 "org.freedesktop.Accounts.h" ++ ++#include ++#ifdef G_OS_UNIX ++# include ++#endif ++ ++typedef struct ++{ ++ GDBusArgInfo parent_struct; ++ gboolean use_gvariant; ++} _ExtendedGDBusArgInfo; ++ ++typedef struct ++{ ++ GDBusMethodInfo parent_struct; ++ const gchar *signal_name; ++ gboolean pass_fdlist; ++} _ExtendedGDBusMethodInfo; ++ ++typedef struct ++{ ++ GDBusSignalInfo parent_struct; ++ const gchar *signal_name; ++} _ExtendedGDBusSignalInfo; ++ ++typedef struct ++{ ++ GDBusPropertyInfo parent_struct; ++ const gchar *hyphen_name; ++ gboolean use_gvariant; ++} _ExtendedGDBusPropertyInfo; ++ ++typedef struct ++{ ++ GDBusInterfaceInfo parent_struct; ++ const gchar *hyphen_name; ++} _ExtendedGDBusInterfaceInfo; ++ ++typedef struct ++{ ++ const _ExtendedGDBusPropertyInfo *info; ++ guint prop_id; ++ GValue orig_value; /* the value before the change */ ++} ChangedProperty; ++ ++static void ++_changed_property_free (ChangedProperty *data) ++{ ++ g_value_unset (&data->orig_value); ++ g_free (data); ++} ++ ++static gboolean ++_g_strv_equal0 (gchar **a, gchar **b) ++{ ++ gboolean ret = FALSE; ++ guint n; ++ if (a == NULL && b == NULL) ++ { ++ ret = TRUE; ++ goto out; ++ } ++ if (a == NULL || b == NULL) ++ goto out; ++ if (g_strv_length (a) != g_strv_length (b)) ++ goto out; ++ for (n = 0; a[n] != NULL; n++) ++ if (g_strcmp0 (a[n], b[n]) != 0) ++ goto out; ++ ret = TRUE; ++out: ++ return ret; ++} ++ ++static gboolean ++_g_variant_equal0 (GVariant *a, GVariant *b) ++{ ++ gboolean ret = FALSE; ++ if (a == NULL && b == NULL) ++ { ++ ret = TRUE; ++ goto out; ++ } ++ if (a == NULL || b == NULL) ++ goto out; ++ ret = g_variant_equal (a, b); ++out: ++ return ret; ++} ++ ++G_GNUC_UNUSED static gboolean ++_g_value_equal (const GValue *a, const GValue *b) ++{ ++ gboolean ret = FALSE; ++ g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); ++ switch (G_VALUE_TYPE (a)) ++ { ++ case G_TYPE_BOOLEAN: ++ ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); ++ break; ++ case G_TYPE_UCHAR: ++ ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); ++ break; ++ case G_TYPE_INT: ++ ret = (g_value_get_int (a) == g_value_get_int (b)); ++ break; ++ case G_TYPE_UINT: ++ ret = (g_value_get_uint (a) == g_value_get_uint (b)); ++ break; ++ case G_TYPE_INT64: ++ ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); ++ break; ++ case G_TYPE_UINT64: ++ ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); ++ break; ++ case G_TYPE_DOUBLE: ++ { ++ /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ ++ gdouble da = g_value_get_double (a); ++ gdouble db = g_value_get_double (b); ++ ret = memcmp (&da, &db, sizeof (gdouble)) == 0; ++ } ++ break; ++ case G_TYPE_STRING: ++ ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); ++ break; ++ case G_TYPE_VARIANT: ++ ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); ++ break; ++ default: ++ if (G_VALUE_TYPE (a) == G_TYPE_STRV) ++ ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); ++ else ++ g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); ++ break; ++ } ++ return ret; ++} ++ ++/* ------------------------------------------------------------------------ ++ * Code for interface org.freedesktop.Accounts ++ * ------------------------------------------------------------------------ ++ */ ++ ++/** ++ * SECTION:GsdAccounts ++ * @title: GsdAccounts ++ * @short_description: Generated C code for the org.freedesktop.Accounts D-Bus interface ++ * ++ * This section contains code for working with the org.freedesktop.Accounts D-Bus interface in C. ++ */ ++ ++/* ---- Introspection data for org.freedesktop.Accounts ---- */ ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_list_cached_users_OUT_ARG_users = ++{ ++ { ++ -1, ++ (gchar *) "users", ++ (gchar *) "ao", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_list_cached_users_OUT_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_list_cached_users_OUT_ARG_users, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_method_list_cached_users_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_method_list_cached_users_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_method_list_cached_users_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_method_info_list_cached_users = ++{ ++ { ++ -1, ++ (gchar *) "ListCachedUsers", ++ NULL, ++ (GDBusArgInfo **) &_gsd_accounts_method_info_list_cached_users_OUT_ARG_pointers, ++ (GDBusAnnotationInfo **) &_gsd_accounts_method_list_cached_users_annotation_info_pointers ++ }, ++ "handle-list-cached-users", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_find_user_by_id_IN_ARG_id = ++{ ++ { ++ -1, ++ (gchar *) "id", ++ (gchar *) "x", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_find_user_by_id_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_find_user_by_id_IN_ARG_id, ++ NULL ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_find_user_by_id_OUT_ARG_user = ++{ ++ { ++ -1, ++ (gchar *) "user", ++ (gchar *) "o", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_find_user_by_id_OUT_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_find_user_by_id_OUT_ARG_user, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_method_find_user_by_id_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_method_find_user_by_id_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_method_find_user_by_id_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_method_info_find_user_by_id = ++{ ++ { ++ -1, ++ (gchar *) "FindUserById", ++ (GDBusArgInfo **) &_gsd_accounts_method_info_find_user_by_id_IN_ARG_pointers, ++ (GDBusArgInfo **) &_gsd_accounts_method_info_find_user_by_id_OUT_ARG_pointers, ++ (GDBusAnnotationInfo **) &_gsd_accounts_method_find_user_by_id_annotation_info_pointers ++ }, ++ "handle-find-user-by-id", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_find_user_by_name_IN_ARG_name = ++{ ++ { ++ -1, ++ (gchar *) "name", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_find_user_by_name_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_find_user_by_name_IN_ARG_name, ++ NULL ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_find_user_by_name_OUT_ARG_user = ++{ ++ { ++ -1, ++ (gchar *) "user", ++ (gchar *) "o", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_find_user_by_name_OUT_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_find_user_by_name_OUT_ARG_user, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_method_find_user_by_name_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_method_find_user_by_name_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_method_find_user_by_name_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_method_info_find_user_by_name = ++{ ++ { ++ -1, ++ (gchar *) "FindUserByName", ++ (GDBusArgInfo **) &_gsd_accounts_method_info_find_user_by_name_IN_ARG_pointers, ++ (GDBusArgInfo **) &_gsd_accounts_method_info_find_user_by_name_OUT_ARG_pointers, ++ (GDBusAnnotationInfo **) &_gsd_accounts_method_find_user_by_name_annotation_info_pointers ++ }, ++ "handle-find-user-by-name", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_create_user_IN_ARG_name = ++{ ++ { ++ -1, ++ (gchar *) "name", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_create_user_IN_ARG_fullname = ++{ ++ { ++ -1, ++ (gchar *) "fullname", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_create_user_IN_ARG_accountType = ++{ ++ { ++ -1, ++ (gchar *) "accountType", ++ (gchar *) "i", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_create_user_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_create_user_IN_ARG_name, ++ &_gsd_accounts_method_info_create_user_IN_ARG_fullname, ++ &_gsd_accounts_method_info_create_user_IN_ARG_accountType, ++ NULL ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_create_user_OUT_ARG_user = ++{ ++ { ++ -1, ++ (gchar *) "user", ++ (gchar *) "o", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_create_user_OUT_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_create_user_OUT_ARG_user, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_method_create_user_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_method_create_user_annotation_info_1 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_method_create_user_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_method_create_user_annotation_info_0, ++ &_gsd_accounts_method_create_user_annotation_info_1, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_method_info_create_user = ++{ ++ { ++ -1, ++ (gchar *) "CreateUser", ++ (GDBusArgInfo **) &_gsd_accounts_method_info_create_user_IN_ARG_pointers, ++ (GDBusArgInfo **) &_gsd_accounts_method_info_create_user_OUT_ARG_pointers, ++ (GDBusAnnotationInfo **) &_gsd_accounts_method_create_user_annotation_info_pointers ++ }, ++ "handle-create-user", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_cache_user_IN_ARG_name = ++{ ++ { ++ -1, ++ (gchar *) "name", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_cache_user_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_cache_user_IN_ARG_name, ++ NULL ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_cache_user_OUT_ARG_user = ++{ ++ { ++ -1, ++ (gchar *) "user", ++ (gchar *) "o", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_cache_user_OUT_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_cache_user_OUT_ARG_user, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_method_cache_user_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_method_cache_user_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_method_cache_user_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_method_info_cache_user = ++{ ++ { ++ -1, ++ (gchar *) "CacheUser", ++ (GDBusArgInfo **) &_gsd_accounts_method_info_cache_user_IN_ARG_pointers, ++ (GDBusArgInfo **) &_gsd_accounts_method_info_cache_user_OUT_ARG_pointers, ++ (GDBusAnnotationInfo **) &_gsd_accounts_method_cache_user_annotation_info_pointers ++ }, ++ "handle-cache-user", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_uncache_user_IN_ARG_name = ++{ ++ { ++ -1, ++ (gchar *) "name", ++ (gchar *) "s", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_uncache_user_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_uncache_user_IN_ARG_name, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_method_uncache_user_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_method_uncache_user_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_method_uncache_user_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_method_info_uncache_user = ++{ ++ { ++ -1, ++ (gchar *) "UncacheUser", ++ (GDBusArgInfo **) &_gsd_accounts_method_info_uncache_user_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_method_uncache_user_annotation_info_pointers ++ }, ++ "handle-uncache-user", ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_delete_user_IN_ARG_id = ++{ ++ { ++ -1, ++ (gchar *) "id", ++ (gchar *) "x", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_method_info_delete_user_IN_ARG_removeFiles = ++{ ++ { ++ -1, ++ (gchar *) "removeFiles", ++ (gchar *) "b", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_method_info_delete_user_IN_ARG_pointers[] = ++{ ++ &_gsd_accounts_method_info_delete_user_IN_ARG_id, ++ &_gsd_accounts_method_info_delete_user_IN_ARG_removeFiles, ++ NULL ++}; ++ ++static const GDBusAnnotationInfo _gsd_accounts_method_delete_user_annotation_info_0 = ++{ ++ -1, ++ (gchar *) "org.freedesktop.DBus.GLib.Async", ++ (gchar *) "", ++ NULL ++}; ++ ++static const GDBusAnnotationInfo * const _gsd_accounts_method_delete_user_annotation_info_pointers[] = ++{ ++ &_gsd_accounts_method_delete_user_annotation_info_0, ++ NULL ++}; ++ ++static const _ExtendedGDBusMethodInfo _gsd_accounts_method_info_delete_user = ++{ ++ { ++ -1, ++ (gchar *) "DeleteUser", ++ (GDBusArgInfo **) &_gsd_accounts_method_info_delete_user_IN_ARG_pointers, ++ NULL, ++ (GDBusAnnotationInfo **) &_gsd_accounts_method_delete_user_annotation_info_pointers ++ }, ++ "handle-delete-user", ++ FALSE ++}; ++ ++static const _ExtendedGDBusMethodInfo * const _gsd_accounts_method_info_pointers[] = ++{ ++ &_gsd_accounts_method_info_list_cached_users, ++ &_gsd_accounts_method_info_find_user_by_id, ++ &_gsd_accounts_method_info_find_user_by_name, ++ &_gsd_accounts_method_info_create_user, ++ &_gsd_accounts_method_info_cache_user, ++ &_gsd_accounts_method_info_uncache_user, ++ &_gsd_accounts_method_info_delete_user, ++ NULL ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_signal_info_user_added_ARG_user = ++{ ++ { ++ -1, ++ (gchar *) "user", ++ (gchar *) "o", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_signal_info_user_added_ARG_pointers[] = ++{ ++ &_gsd_accounts_signal_info_user_added_ARG_user, ++ NULL ++}; ++ ++static const _ExtendedGDBusSignalInfo _gsd_accounts_signal_info_user_added = ++{ ++ { ++ -1, ++ (gchar *) "UserAdded", ++ (GDBusArgInfo **) &_gsd_accounts_signal_info_user_added_ARG_pointers, ++ NULL ++ }, ++ "user-added" ++}; ++ ++static const _ExtendedGDBusArgInfo _gsd_accounts_signal_info_user_deleted_ARG_user = ++{ ++ { ++ -1, ++ (gchar *) "user", ++ (gchar *) "o", ++ NULL ++ }, ++ FALSE ++}; ++ ++static const _ExtendedGDBusArgInfo * const _gsd_accounts_signal_info_user_deleted_ARG_pointers[] = ++{ ++ &_gsd_accounts_signal_info_user_deleted_ARG_user, ++ NULL ++}; ++ ++static const _ExtendedGDBusSignalInfo _gsd_accounts_signal_info_user_deleted = ++{ ++ { ++ -1, ++ (gchar *) "UserDeleted", ++ (GDBusArgInfo **) &_gsd_accounts_signal_info_user_deleted_ARG_pointers, ++ NULL ++ }, ++ "user-deleted" ++}; ++ ++static const _ExtendedGDBusSignalInfo * const _gsd_accounts_signal_info_pointers[] = ++{ ++ &_gsd_accounts_signal_info_user_added, ++ &_gsd_accounts_signal_info_user_deleted, ++ NULL ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_property_info_daemon_version = ++{ ++ { ++ -1, ++ (gchar *) "DaemonVersion", ++ (gchar *) "s", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "daemon-version", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_property_info_has_no_users = ++{ ++ { ++ -1, ++ (gchar *) "HasNoUsers", ++ (gchar *) "b", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "has-no-users", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo _gsd_accounts_property_info_has_multiple_users = ++{ ++ { ++ -1, ++ (gchar *) "HasMultipleUsers", ++ (gchar *) "b", ++ G_DBUS_PROPERTY_INFO_FLAGS_READABLE, ++ NULL ++ }, ++ "has-multiple-users", ++ FALSE ++}; ++ ++static const _ExtendedGDBusPropertyInfo * const _gsd_accounts_property_info_pointers[] = ++{ ++ &_gsd_accounts_property_info_daemon_version, ++ &_gsd_accounts_property_info_has_no_users, ++ &_gsd_accounts_property_info_has_multiple_users, ++ NULL ++}; ++ ++static const _ExtendedGDBusInterfaceInfo _gsd_accounts_interface_info = ++{ ++ { ++ -1, ++ (gchar *) "org.freedesktop.Accounts", ++ (GDBusMethodInfo **) &_gsd_accounts_method_info_pointers, ++ (GDBusSignalInfo **) &_gsd_accounts_signal_info_pointers, ++ (GDBusPropertyInfo **) &_gsd_accounts_property_info_pointers, ++ NULL ++ }, ++ "accounts", ++}; ++ ++ ++/** ++ * gsd_accounts_interface_info: ++ * ++ * Gets a machine-readable description of the org.freedesktop.Accounts D-Bus interface. ++ * ++ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. ++ */ ++GDBusInterfaceInfo * ++gsd_accounts_interface_info (void) ++{ ++ return (GDBusInterfaceInfo *) &_gsd_accounts_interface_info.parent_struct; ++} ++ ++/** ++ * gsd_accounts_override_properties: ++ * @klass: The class structure for a #GObject-derived class. ++ * @property_id_begin: The property id to assign to the first overridden property. ++ * ++ * Overrides all #GObject properties in the #GsdAccounts interface for a concrete class. ++ * The properties are overridden in the order they are defined. ++ * ++ * Returns: The last property id. ++ */ ++guint ++gsd_accounts_override_properties (GObjectClass *klass, guint property_id_begin) ++{ ++ g_object_class_override_property (klass, property_id_begin++, "daemon-version"); ++ g_object_class_override_property (klass, property_id_begin++, "has-no-users"); ++ g_object_class_override_property (klass, property_id_begin++, "has-multiple-users"); ++ return property_id_begin - 1; ++} ++ ++ ++ ++/** ++ * GsdAccounts: ++ * ++ * Abstract interface type for the D-Bus interface org.freedesktop.Accounts. ++ */ ++ ++/** ++ * GsdAccountsIface: ++ * @parent_iface: The parent interface. ++ * @handle_cache_user: Handler for the #GsdAccounts::handle-cache-user signal. ++ * @handle_create_user: Handler for the #GsdAccounts::handle-create-user signal. ++ * @handle_delete_user: Handler for the #GsdAccounts::handle-delete-user signal. ++ * @handle_find_user_by_id: Handler for the #GsdAccounts::handle-find-user-by-id signal. ++ * @handle_find_user_by_name: Handler for the #GsdAccounts::handle-find-user-by-name signal. ++ * @handle_list_cached_users: Handler for the #GsdAccounts::handle-list-cached-users signal. ++ * @handle_uncache_user: Handler for the #GsdAccounts::handle-uncache-user signal. ++ * @get_daemon_version: Getter for the #GsdAccounts:daemon-version property. ++ * @get_has_multiple_users: Getter for the #GsdAccounts:has-multiple-users property. ++ * @get_has_no_users: Getter for the #GsdAccounts:has-no-users property. ++ * @user_added: Handler for the #GsdAccounts::user-added signal. ++ * @user_deleted: Handler for the #GsdAccounts::user-deleted signal. ++ * ++ * Virtual table for the D-Bus interface org.freedesktop.Accounts. ++ */ ++ ++typedef GsdAccountsIface GsdAccountsInterface; ++G_DEFINE_INTERFACE (GsdAccounts, gsd_accounts, G_TYPE_OBJECT) ++ ++static void ++gsd_accounts_default_init (GsdAccountsIface *iface) ++{ ++ /* GObject signals for incoming D-Bus method calls: */ ++ /** ++ * GsdAccounts::handle-list-cached-users: ++ * @object: A #GsdAccounts. ++ * @invocation: A #GDBusMethodInvocation. ++ * ++ * Signal emitted when a remote caller is invoking the ListCachedUsers() 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 gsd_accounts_complete_list_cached_users() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-list-cached-users", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsIface, handle_list_cached_users), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 1, ++ G_TYPE_DBUS_METHOD_INVOCATION); ++ ++ /** ++ * GsdAccounts::handle-find-user-by-id: ++ * @object: A #GsdAccounts. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_id: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the FindUserById() 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 gsd_accounts_complete_find_user_by_id() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-find-user-by-id", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsIface, handle_find_user_by_id), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT64); ++ ++ /** ++ * GsdAccounts::handle-find-user-by-name: ++ * @object: A #GsdAccounts. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_name: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the FindUserByName() 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 gsd_accounts_complete_find_user_by_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-find-user-by-name", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsIface, handle_find_user_by_name), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccounts::handle-create-user: ++ * @object: A #GsdAccounts. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_name: Argument passed by remote caller. ++ * @arg_fullname: Argument passed by remote caller. ++ * @arg_accountType: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the CreateUser() 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 gsd_accounts_complete_create_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-create-user", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsIface, handle_create_user), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 4, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); ++ ++ /** ++ * GsdAccounts::handle-cache-user: ++ * @object: A #GsdAccounts. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_name: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the CacheUser() 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 gsd_accounts_complete_cache_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-cache-user", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsIface, handle_cache_user), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccounts::handle-uncache-user: ++ * @object: A #GsdAccounts. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_name: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the UncacheUser() 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 gsd_accounts_complete_uncache_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-uncache-user", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsIface, handle_uncache_user), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 2, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); ++ ++ /** ++ * GsdAccounts::handle-delete-user: ++ * @object: A #GsdAccounts. ++ * @invocation: A #GDBusMethodInvocation. ++ * @arg_id: Argument passed by remote caller. ++ * @arg_removeFiles: Argument passed by remote caller. ++ * ++ * Signal emitted when a remote caller is invoking the DeleteUser() 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 gsd_accounts_complete_delete_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. ++ * ++ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. ++ */ ++ g_signal_new ("handle-delete-user", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsIface, handle_delete_user), ++ g_signal_accumulator_true_handled, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_BOOLEAN, ++ 3, ++ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT64, G_TYPE_BOOLEAN); ++ ++ /* GObject signals for received D-Bus signals: */ ++ /** ++ * GsdAccounts::user-added: ++ * @object: A #GsdAccounts. ++ * @arg_user: Argument. ++ * ++ * On the client-side, this signal is emitted whenever the D-Bus signal "UserAdded" is received. ++ * ++ * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. ++ */ ++ g_signal_new ("user-added", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsIface, user_added), ++ NULL, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_NONE, ++ 1, G_TYPE_STRING); ++ ++ /** ++ * GsdAccounts::user-deleted: ++ * @object: A #GsdAccounts. ++ * @arg_user: Argument. ++ * ++ * On the client-side, this signal is emitted whenever the D-Bus signal "UserDeleted" is received. ++ * ++ * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. ++ */ ++ g_signal_new ("user-deleted", ++ G_TYPE_FROM_INTERFACE (iface), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GsdAccountsIface, user_deleted), ++ NULL, ++ NULL, ++ g_cclosure_marshal_generic, ++ G_TYPE_NONE, ++ 1, G_TYPE_STRING); ++ ++ /* GObject properties for D-Bus properties: */ ++ /** ++ * GsdAccounts:daemon-version: ++ * ++ * Represents the D-Bus property "DaemonVersion". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_string ("daemon-version", "DaemonVersion", "DaemonVersion", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccounts:has-no-users: ++ * ++ * Represents the D-Bus property "HasNoUsers". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_boolean ("has-no-users", "HasNoUsers", "HasNoUsers", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ /** ++ * GsdAccounts:has-multiple-users: ++ * ++ * Represents the D-Bus property "HasMultipleUsers". ++ * ++ * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. ++ */ ++ g_object_interface_install_property (iface, ++ g_param_spec_boolean ("has-multiple-users", "HasMultipleUsers", "HasMultipleUsers", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++} ++ ++/** ++ * gsd_accounts_get_daemon_version: (skip) ++ * @object: A #GsdAccounts. ++ * ++ * Gets the value of the "DaemonVersion" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * 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 gsd_accounts_dup_daemon_version() if on another thread. ++ * ++ * 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 * ++gsd_accounts_get_daemon_version (GsdAccounts *object) ++{ ++ return GSD_ACCOUNTS_GET_IFACE (object)->get_daemon_version (object); ++} ++ ++/** ++ * gsd_accounts_dup_daemon_version: (skip) ++ * @object: A #GsdAccounts. ++ * ++ * Gets a copy of the "DaemonVersion" 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 * ++gsd_accounts_dup_daemon_version (GsdAccounts *object) ++{ ++ gchar *value; ++ g_object_get (G_OBJECT (object), "daemon-version", &value, NULL); ++ return value; ++} ++ ++/** ++ * gsd_accounts_set_daemon_version: (skip) ++ * @object: A #GsdAccounts. ++ * @value: The value to set. ++ * ++ * Sets the "DaemonVersion" 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 ++gsd_accounts_set_daemon_version (GsdAccounts *object, const gchar *value) ++{ ++ g_object_set (G_OBJECT (object), "daemon-version", value, NULL); ++} ++ ++/** ++ * gsd_accounts_get_has_no_users: (skip) ++ * @object: A #GsdAccounts. ++ * ++ * Gets the value of the "HasNoUsers" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++gboolean ++gsd_accounts_get_has_no_users (GsdAccounts *object) ++{ ++ return GSD_ACCOUNTS_GET_IFACE (object)->get_has_no_users (object); ++} ++ ++/** ++ * gsd_accounts_set_has_no_users: (skip) ++ * @object: A #GsdAccounts. ++ * @value: The value to set. ++ * ++ * Sets the "HasNoUsers" 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 ++gsd_accounts_set_has_no_users (GsdAccounts *object, gboolean value) ++{ ++ g_object_set (G_OBJECT (object), "has-no-users", value, NULL); ++} ++ ++/** ++ * gsd_accounts_get_has_multiple_users: (skip) ++ * @object: A #GsdAccounts. ++ * ++ * Gets the value of the "HasMultipleUsers" D-Bus property. ++ * ++ * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. ++ * ++ * Returns: The property value. ++ */ ++gboolean ++gsd_accounts_get_has_multiple_users (GsdAccounts *object) ++{ ++ return GSD_ACCOUNTS_GET_IFACE (object)->get_has_multiple_users (object); ++} ++ ++/** ++ * gsd_accounts_set_has_multiple_users: (skip) ++ * @object: A #GsdAccounts. ++ * @value: The value to set. ++ * ++ * Sets the "HasMultipleUsers" 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 ++gsd_accounts_set_has_multiple_users (GsdAccounts *object, gboolean value) ++{ ++ g_object_set (G_OBJECT (object), "has-multiple-users", value, NULL); ++} ++ ++/** ++ * gsd_accounts_emit_user_added: ++ * @object: A #GsdAccounts. ++ * @arg_user: Argument to pass with the signal. ++ * ++ * Emits the "UserAdded" D-Bus signal. ++ */ ++void ++gsd_accounts_emit_user_added ( ++ GsdAccounts *object, ++ const gchar *arg_user) ++{ ++ g_signal_emit_by_name (object, "user-added", arg_user); ++} ++ ++/** ++ * gsd_accounts_emit_user_deleted: ++ * @object: A #GsdAccounts. ++ * @arg_user: Argument to pass with the signal. ++ * ++ * Emits the "UserDeleted" D-Bus signal. ++ */ ++void ++gsd_accounts_emit_user_deleted ( ++ GsdAccounts *object, ++ const gchar *arg_user) ++{ ++ g_signal_emit_by_name (object, "user-deleted", arg_user); ++} ++ ++/** ++ * gsd_accounts_call_list_cached_users: ++ * @proxy: A #GsdAccountsProxy. ++ * @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 ListCachedUsers() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_call_list_cached_users_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_call_list_cached_users_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_call_list_cached_users ( ++ GsdAccounts *proxy, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "ListCachedUsers", ++ g_variant_new ("()"), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_call_list_cached_users_finish: ++ * @proxy: A #GsdAccountsProxy. ++ * @out_users: (out): Return location for return parameter or %NULL to ignore. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_call_list_cached_users(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_call_list_cached_users(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_list_cached_users_finish ( ++ GsdAccounts *proxy, ++ gchar ***out_users, ++ GAsyncResult *res, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(^ao)", ++ out_users); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_list_cached_users_sync: ++ * @proxy: A #GsdAccountsProxy. ++ * @out_users: (out): Return location for return parameter or %NULL to ignore. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the ListCachedUsers() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_call_list_cached_users() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_list_cached_users_sync ( ++ GsdAccounts *proxy, ++ gchar ***out_users, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "ListCachedUsers", ++ g_variant_new ("()"), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(^ao)", ++ out_users); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_find_user_by_id: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_id: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the FindUserById() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_call_find_user_by_id_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_call_find_user_by_id_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_call_find_user_by_id ( ++ GsdAccounts *proxy, ++ gint64 arg_id, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "FindUserById", ++ g_variant_new ("(x)", ++ arg_id), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_call_find_user_by_id_finish: ++ * @proxy: A #GsdAccountsProxy. ++ * @out_user: (out): Return location for return parameter or %NULL to ignore. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_call_find_user_by_id(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_call_find_user_by_id(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_find_user_by_id_finish ( ++ GsdAccounts *proxy, ++ gchar **out_user, ++ GAsyncResult *res, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(o)", ++ out_user); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_find_user_by_id_sync: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_id: Argument to pass with the method invocation. ++ * @out_user: (out): Return location for return parameter or %NULL to ignore. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the FindUserById() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_call_find_user_by_id() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_find_user_by_id_sync ( ++ GsdAccounts *proxy, ++ gint64 arg_id, ++ gchar **out_user, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "FindUserById", ++ g_variant_new ("(x)", ++ arg_id), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(o)", ++ out_user); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_find_user_by_name: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the FindUserByName() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_call_find_user_by_name_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_call_find_user_by_name_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_call_find_user_by_name ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "FindUserByName", ++ g_variant_new ("(s)", ++ arg_name), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_call_find_user_by_name_finish: ++ * @proxy: A #GsdAccountsProxy. ++ * @out_user: (out): Return location for return parameter or %NULL to ignore. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_call_find_user_by_name(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_call_find_user_by_name(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_find_user_by_name_finish ( ++ GsdAccounts *proxy, ++ gchar **out_user, ++ GAsyncResult *res, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(o)", ++ out_user); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_find_user_by_name_sync: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @out_user: (out): Return location for return parameter or %NULL to ignore. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the FindUserByName() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_call_find_user_by_name() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_find_user_by_name_sync ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ gchar **out_user, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "FindUserByName", ++ g_variant_new ("(s)", ++ arg_name), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(o)", ++ out_user); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_create_user: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @arg_fullname: Argument to pass with the method invocation. ++ * @arg_accountType: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the CreateUser() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_call_create_user_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_call_create_user_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_call_create_user ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ const gchar *arg_fullname, ++ gint arg_accountType, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "CreateUser", ++ g_variant_new ("(ssi)", ++ arg_name, ++ arg_fullname, ++ arg_accountType), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_call_create_user_finish: ++ * @proxy: A #GsdAccountsProxy. ++ * @out_user: (out): Return location for return parameter or %NULL to ignore. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_call_create_user(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_call_create_user(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_create_user_finish ( ++ GsdAccounts *proxy, ++ gchar **out_user, ++ GAsyncResult *res, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(o)", ++ out_user); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_create_user_sync: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @arg_fullname: Argument to pass with the method invocation. ++ * @arg_accountType: Argument to pass with the method invocation. ++ * @out_user: (out): Return location for return parameter or %NULL to ignore. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the CreateUser() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_call_create_user() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_create_user_sync ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ const gchar *arg_fullname, ++ gint arg_accountType, ++ gchar **out_user, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "CreateUser", ++ g_variant_new ("(ssi)", ++ arg_name, ++ arg_fullname, ++ arg_accountType), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(o)", ++ out_user); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_cache_user: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the CacheUser() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_call_cache_user_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_call_cache_user_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_call_cache_user ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "CacheUser", ++ g_variant_new ("(s)", ++ arg_name), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_call_cache_user_finish: ++ * @proxy: A #GsdAccountsProxy. ++ * @out_user: (out): Return location for return parameter or %NULL to ignore. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_call_cache_user(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_call_cache_user(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_cache_user_finish ( ++ GsdAccounts *proxy, ++ gchar **out_user, ++ GAsyncResult *res, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(o)", ++ out_user); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_cache_user_sync: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @out_user: (out): Return location for return parameter or %NULL to ignore. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the CacheUser() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_call_cache_user() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_cache_user_sync ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ gchar **out_user, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "CacheUser", ++ g_variant_new ("(s)", ++ arg_name), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "(o)", ++ out_user); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_uncache_user: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the UncacheUser() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_call_uncache_user_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_call_uncache_user_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_call_uncache_user ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "UncacheUser", ++ g_variant_new ("(s)", ++ arg_name), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_call_uncache_user_finish: ++ * @proxy: A #GsdAccountsProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_call_uncache_user(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_call_uncache_user(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_uncache_user_finish ( ++ GsdAccounts *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; ++} ++ ++/** ++ * gsd_accounts_call_uncache_user_sync: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_name: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the UncacheUser() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_call_uncache_user() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_uncache_user_sync ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "UncacheUser", ++ g_variant_new ("(s)", ++ arg_name), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_call_delete_user: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_id: Argument to pass with the method invocation. ++ * @arg_removeFiles: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously invokes the DeleteUser() D-Bus method on @proxy. ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_call_delete_user_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_call_delete_user_sync() for the synchronous, blocking version of this method. ++ */ ++void ++gsd_accounts_call_delete_user ( ++ GsdAccounts *proxy, ++ gint64 arg_id, ++ gboolean arg_removeFiles, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_dbus_proxy_call (G_DBUS_PROXY (proxy), ++ "DeleteUser", ++ g_variant_new ("(xb)", ++ arg_id, ++ arg_removeFiles), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ callback, ++ user_data); ++} ++ ++/** ++ * gsd_accounts_call_delete_user_finish: ++ * @proxy: A #GsdAccountsProxy. ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_call_delete_user(). ++ * @error: Return location for error or %NULL. ++ * ++ * Finishes an operation started with gsd_accounts_call_delete_user(). ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_delete_user_finish ( ++ GsdAccounts *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; ++} ++ ++/** ++ * gsd_accounts_call_delete_user_sync: ++ * @proxy: A #GsdAccountsProxy. ++ * @arg_id: Argument to pass with the method invocation. ++ * @arg_removeFiles: Argument to pass with the method invocation. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL. ++ * ++ * Synchronously invokes the DeleteUser() D-Bus method on @proxy. The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_call_delete_user() for the asynchronous version of this method. ++ * ++ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. ++ */ ++gboolean ++gsd_accounts_call_delete_user_sync ( ++ GsdAccounts *proxy, ++ gint64 arg_id, ++ gboolean arg_removeFiles, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GVariant *_ret; ++ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), ++ "DeleteUser", ++ g_variant_new ("(xb)", ++ arg_id, ++ arg_removeFiles), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ cancellable, ++ error); ++ if (_ret == NULL) ++ goto _out; ++ g_variant_get (_ret, ++ "()"); ++ g_variant_unref (_ret); ++_out: ++ return _ret != NULL; ++} ++ ++/** ++ * gsd_accounts_complete_list_cached_users: ++ * @object: A #GsdAccounts. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * @users: Parameter to return. ++ * ++ * Helper function used in service implementations to finish handling invocations of the ListCachedUsers() 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 ++gsd_accounts_complete_list_cached_users ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *const *users) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("(^ao)", ++ users)); ++} ++ ++/** ++ * gsd_accounts_complete_find_user_by_id: ++ * @object: A #GsdAccounts. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * @user: Parameter to return. ++ * ++ * Helper function used in service implementations to finish handling invocations of the FindUserById() 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 ++gsd_accounts_complete_find_user_by_id ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *user) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("(o)", ++ user)); ++} ++ ++/** ++ * gsd_accounts_complete_find_user_by_name: ++ * @object: A #GsdAccounts. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * @user: Parameter to return. ++ * ++ * Helper function used in service implementations to finish handling invocations of the FindUserByName() 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 ++gsd_accounts_complete_find_user_by_name ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *user) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("(o)", ++ user)); ++} ++ ++/** ++ * gsd_accounts_complete_create_user: ++ * @object: A #GsdAccounts. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * @user: Parameter to return. ++ * ++ * Helper function used in service implementations to finish handling invocations of the CreateUser() 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 ++gsd_accounts_complete_create_user ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *user) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("(o)", ++ user)); ++} ++ ++/** ++ * gsd_accounts_complete_cache_user: ++ * @object: A #GsdAccounts. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * @user: Parameter to return. ++ * ++ * Helper function used in service implementations to finish handling invocations of the CacheUser() 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 ++gsd_accounts_complete_cache_user ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *user) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("(o)", ++ user)); ++} ++ ++/** ++ * gsd_accounts_complete_uncache_user: ++ * @object: A #GsdAccounts. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the UncacheUser() 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 ++gsd_accounts_complete_uncache_user ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/** ++ * gsd_accounts_complete_delete_user: ++ * @object: A #GsdAccounts. ++ * @invocation: (transfer full): A #GDBusMethodInvocation. ++ * ++ * Helper function used in service implementations to finish handling invocations of the DeleteUser() 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 ++gsd_accounts_complete_delete_user ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation) ++{ ++ g_dbus_method_invocation_return_value (invocation, ++ g_variant_new ("()")); ++} ++ ++/* ------------------------------------------------------------------------ */ ++ ++/** ++ * GsdAccountsProxy: ++ * ++ * The #GsdAccountsProxy structure contains only private data and should only be accessed using the provided API. ++ */ ++ ++/** ++ * GsdAccountsProxyClass: ++ * @parent_class: The parent class. ++ * ++ * Class structure for #GsdAccountsProxy. ++ */ ++ ++struct _GsdAccountsProxyPrivate ++{ ++ GData *qdata; ++}; ++ ++static void gsd_accounts_proxy_iface_init (GsdAccountsIface *iface); ++ ++#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 ++G_DEFINE_TYPE_WITH_CODE (GsdAccountsProxy, gsd_accounts_proxy, G_TYPE_DBUS_PROXY, ++ G_ADD_PRIVATE (GsdAccountsProxy) ++ G_IMPLEMENT_INTERFACE (GSD_TYPE_ACCOUNTS, gsd_accounts_proxy_iface_init)) ++ ++#else ++G_DEFINE_TYPE_WITH_CODE (GsdAccountsProxy, gsd_accounts_proxy, G_TYPE_DBUS_PROXY, ++ G_IMPLEMENT_INTERFACE (GSD_TYPE_ACCOUNTS, gsd_accounts_proxy_iface_init)) ++ ++#endif ++static void ++gsd_accounts_proxy_finalize (GObject *object) ++{ ++ GsdAccountsProxy *proxy = GSD_ACCOUNTS_PROXY (object); ++ g_datalist_clear (&proxy->priv->qdata); ++ G_OBJECT_CLASS (gsd_accounts_proxy_parent_class)->finalize (object); ++} ++ ++static void ++gsd_accounts_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 = _gsd_accounts_property_info_pointers[prop_id - 1]; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); ++ if (info->use_gvariant) ++ { ++ g_value_set_variant (value, variant); ++ } ++ else ++ { ++ if (variant != NULL) ++ g_dbus_gvariant_to_gvalue (variant, value); ++ } ++ if (variant != NULL) ++ g_variant_unref (variant); ++} ++ ++static void ++gsd_accounts_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.Accounts: %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 ++gsd_accounts_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 = _gsd_accounts_property_info_pointers[prop_id - 1]; ++ variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); ++ g_dbus_proxy_call (G_DBUS_PROXY (object), ++ "org.freedesktop.DBus.Properties.Set", ++ g_variant_new ("(ssv)", "org.freedesktop.Accounts", info->parent_struct.name, variant), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ NULL, (GAsyncReadyCallback) gsd_accounts_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); ++ g_variant_unref (variant); ++} ++ ++static void ++gsd_accounts_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 *) &_gsd_accounts_interface_info.parent_struct, signal_name); ++ if (info == NULL) ++ return; ++ num_params = g_variant_n_children (parameters); ++ paramv = g_new0 (GValue, num_params + 1); ++ g_value_init (¶mv[0], GSD_TYPE_ACCOUNTS); ++ g_value_set_object (¶mv[0], proxy); ++ g_variant_iter_init (&iter, parameters); ++ n = 1; ++ while ((child = g_variant_iter_next_value (&iter)) != NULL) ++ { ++ _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; ++ if (arg_info->use_gvariant) ++ { ++ g_value_init (¶mv[n], G_TYPE_VARIANT); ++ g_value_set_variant (¶mv[n], child); ++ n++; ++ } ++ else ++ g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); ++ g_variant_unref (child); ++ } ++ signal_id = g_signal_lookup (info->signal_name, GSD_TYPE_ACCOUNTS); ++ g_signal_emitv (paramv, signal_id, 0, NULL); ++ for (n = 0; n < num_params + 1; n++) ++ g_value_unset (¶mv[n]); ++ g_free (paramv); ++} ++ ++static void ++gsd_accounts_proxy_g_properties_changed (GDBusProxy *_proxy, ++ GVariant *changed_properties, ++ const gchar *const *invalidated_properties) ++{ ++ GsdAccountsProxy *proxy = GSD_ACCOUNTS_PROXY (_proxy); ++ guint n; ++ const gchar *key; ++ GVariantIter *iter; ++ _ExtendedGDBusPropertyInfo *info; ++ g_variant_get (changed_properties, "a{sv}", &iter); ++ while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) ++ { ++ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsd_accounts_interface_info.parent_struct, key); ++ g_datalist_remove_data (&proxy->priv->qdata, key); ++ if (info != NULL) ++ g_object_notify (G_OBJECT (proxy), info->hyphen_name); ++ } ++ g_variant_iter_free (iter); ++ for (n = 0; invalidated_properties[n] != NULL; n++) ++ { ++ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsd_accounts_interface_info.parent_struct, invalidated_properties[n]); ++ g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); ++ if (info != NULL) ++ g_object_notify (G_OBJECT (proxy), info->hyphen_name); ++ } ++} ++ ++static const gchar * ++gsd_accounts_proxy_get_daemon_version (GsdAccounts *object) ++{ ++ GsdAccountsProxy *proxy = GSD_ACCOUNTS_PROXY (object); ++ GVariant *variant; ++ const gchar *value = NULL; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "DaemonVersion"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_string (variant, NULL); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static gboolean ++gsd_accounts_proxy_get_has_no_users (GsdAccounts *object) ++{ ++ GsdAccountsProxy *proxy = GSD_ACCOUNTS_PROXY (object); ++ GVariant *variant; ++ gboolean value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "HasNoUsers"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_boolean (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static gboolean ++gsd_accounts_proxy_get_has_multiple_users (GsdAccounts *object) ++{ ++ GsdAccountsProxy *proxy = GSD_ACCOUNTS_PROXY (object); ++ GVariant *variant; ++ gboolean value = 0; ++ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "HasMultipleUsers"); ++ if (variant != NULL) ++ { ++ value = g_variant_get_boolean (variant); ++ g_variant_unref (variant); ++ } ++ return value; ++} ++ ++static void ++gsd_accounts_proxy_init (GsdAccountsProxy *proxy) ++{ ++#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 ++ proxy->priv = gsd_accounts_proxy_get_instance_private (proxy); ++#else ++ proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GSD_TYPE_ACCOUNTS_PROXY, GsdAccountsProxyPrivate); ++#endif ++ ++ g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gsd_accounts_interface_info ()); ++} ++ ++static void ++gsd_accounts_proxy_class_init (GsdAccountsProxyClass *klass) ++{ ++ GObjectClass *gobject_class; ++ GDBusProxyClass *proxy_class; ++ ++ gobject_class = G_OBJECT_CLASS (klass); ++ gobject_class->finalize = gsd_accounts_proxy_finalize; ++ gobject_class->get_property = gsd_accounts_proxy_get_property; ++ gobject_class->set_property = gsd_accounts_proxy_set_property; ++ ++ proxy_class = G_DBUS_PROXY_CLASS (klass); ++ proxy_class->g_signal = gsd_accounts_proxy_g_signal; ++ proxy_class->g_properties_changed = gsd_accounts_proxy_g_properties_changed; ++ ++ gsd_accounts_override_properties (gobject_class, 1); ++ ++#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 ++ g_type_class_add_private (klass, sizeof (GsdAccountsProxyPrivate)); ++#endif ++} ++ ++static void ++gsd_accounts_proxy_iface_init (GsdAccountsIface *iface) ++{ ++ iface->get_daemon_version = gsd_accounts_proxy_get_daemon_version; ++ iface->get_has_no_users = gsd_accounts_proxy_get_has_no_users; ++ iface->get_has_multiple_users = gsd_accounts_proxy_get_has_multiple_users; ++} ++ ++/** ++ * gsd_accounts_proxy_new: ++ * @connection: A #GDBusConnection. ++ * @flags: Flags from the #GDBusProxyFlags enumeration. ++ * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. ++ * @object_path: An object path. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied. ++ * @user_data: User data to pass to @callback. ++ * ++ * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.Accounts. See g_dbus_proxy_new() for more details. ++ * ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_proxy_new_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_proxy_new_sync() for the synchronous, blocking version of this constructor. ++ */ ++void ++gsd_accounts_proxy_new ( ++ GDBusConnection *connection, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_async_initable_new_async (GSD_TYPE_ACCOUNTS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts", NULL); ++} ++ ++/** ++ * gsd_accounts_proxy_new_finish: ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_proxy_new(). ++ * @error: Return location for error or %NULL ++ * ++ * Finishes an operation started with gsd_accounts_proxy_new(). ++ * ++ * Returns: (transfer full) (type GsdAccountsProxy): The constructed proxy object or %NULL if @error is set. ++ */ ++GsdAccounts * ++gsd_accounts_proxy_new_finish ( ++ GAsyncResult *res, ++ GError **error) ++{ ++ GObject *ret; ++ GObject *source_object; ++ source_object = g_async_result_get_source_object (res); ++ ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); ++ g_object_unref (source_object); ++ if (ret != NULL) ++ return GSD_ACCOUNTS (ret); ++ else ++ return NULL; ++} ++ ++/** ++ * gsd_accounts_proxy_new_sync: ++ * @connection: A #GDBusConnection. ++ * @flags: Flags from the #GDBusProxyFlags enumeration. ++ * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. ++ * @object_path: An object path. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL ++ * ++ * Synchronously creates a proxy for the D-Bus interface org.freedesktop.Accounts. See g_dbus_proxy_new_sync() for more details. ++ * ++ * The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_proxy_new() for the asynchronous version of this constructor. ++ * ++ * Returns: (transfer full) (type GsdAccountsProxy): The constructed proxy object or %NULL if @error is set. ++ */ ++GsdAccounts * ++gsd_accounts_proxy_new_sync ( ++ GDBusConnection *connection, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GInitable *ret; ++ ret = g_initable_new (GSD_TYPE_ACCOUNTS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts", NULL); ++ if (ret != NULL) ++ return GSD_ACCOUNTS (ret); ++ else ++ return NULL; ++} ++ ++ ++/** ++ * gsd_accounts_proxy_new_for_bus: ++ * @bus_type: A #GBusType. ++ * @flags: Flags from the #GDBusProxyFlags enumeration. ++ * @name: A bus name (well-known or unique). ++ * @object_path: An object path. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @callback: A #GAsyncReadyCallback to call when the request is satisfied. ++ * @user_data: User data to pass to @callback. ++ * ++ * Like gsd_accounts_proxy_new() but takes a #GBusType instead of a #GDBusConnection. ++ * ++ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. ++ * You can then call gsd_accounts_proxy_new_for_bus_finish() to get the result of the operation. ++ * ++ * See gsd_accounts_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. ++ */ ++void ++gsd_accounts_proxy_new_for_bus ( ++ GBusType bus_type, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ g_async_initable_new_async (GSD_TYPE_ACCOUNTS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts", NULL); ++} ++ ++/** ++ * gsd_accounts_proxy_new_for_bus_finish: ++ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsd_accounts_proxy_new_for_bus(). ++ * @error: Return location for error or %NULL ++ * ++ * Finishes an operation started with gsd_accounts_proxy_new_for_bus(). ++ * ++ * Returns: (transfer full) (type GsdAccountsProxy): The constructed proxy object or %NULL if @error is set. ++ */ ++GsdAccounts * ++gsd_accounts_proxy_new_for_bus_finish ( ++ GAsyncResult *res, ++ GError **error) ++{ ++ GObject *ret; ++ GObject *source_object; ++ source_object = g_async_result_get_source_object (res); ++ ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); ++ g_object_unref (source_object); ++ if (ret != NULL) ++ return GSD_ACCOUNTS (ret); ++ else ++ return NULL; ++} ++ ++/** ++ * gsd_accounts_proxy_new_for_bus_sync: ++ * @bus_type: A #GBusType. ++ * @flags: Flags from the #GDBusProxyFlags enumeration. ++ * @name: A bus name (well-known or unique). ++ * @object_path: An object path. ++ * @cancellable: (allow-none): A #GCancellable or %NULL. ++ * @error: Return location for error or %NULL ++ * ++ * Like gsd_accounts_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. ++ * ++ * The calling thread is blocked until a reply is received. ++ * ++ * See gsd_accounts_proxy_new_for_bus() for the asynchronous version of this constructor. ++ * ++ * Returns: (transfer full) (type GsdAccountsProxy): The constructed proxy object or %NULL if @error is set. ++ */ ++GsdAccounts * ++gsd_accounts_proxy_new_for_bus_sync ( ++ GBusType bus_type, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GInitable *ret; ++ ret = g_initable_new (GSD_TYPE_ACCOUNTS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts", NULL); ++ if (ret != NULL) ++ return GSD_ACCOUNTS (ret); ++ else ++ return NULL; ++} ++ ++ ++/* ------------------------------------------------------------------------ */ ++ ++/** ++ * GsdAccountsSkeleton: ++ * ++ * The #GsdAccountsSkeleton structure contains only private data and should only be accessed using the provided API. ++ */ ++ ++/** ++ * GsdAccountsSkeletonClass: ++ * @parent_class: The parent class. ++ * ++ * Class structure for #GsdAccountsSkeleton. ++ */ ++ ++struct _GsdAccountsSkeletonPrivate ++{ ++ GValue *properties; ++ GList *changed_properties; ++ GSource *changed_properties_idle_source; ++ GMainContext *context; ++ GMutex lock; ++}; ++ ++static void ++_gsd_accounts_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) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_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], GSD_TYPE_ACCOUNTS); ++ g_value_set_object (¶mv[n++], skeleton); ++ g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); ++ g_value_set_object (¶mv[n++], invocation); ++ if (info->pass_fdlist) ++ { ++#ifdef G_OS_UNIX ++ g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); ++ g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); ++#else ++ g_assert_not_reached (); ++#endif ++ } ++ g_variant_iter_init (&iter, parameters); ++ while ((child = g_variant_iter_next_value (&iter)) != NULL) ++ { ++ _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; ++ if (arg_info->use_gvariant) ++ { ++ g_value_init (¶mv[n], G_TYPE_VARIANT); ++ g_value_set_variant (¶mv[n], child); ++ n++; ++ } ++ else ++ g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); ++ g_variant_unref (child); ++ } ++ signal_id = g_signal_lookup (info->signal_name, GSD_TYPE_ACCOUNTS); ++ g_value_init (&return_value, G_TYPE_BOOLEAN); ++ g_signal_emitv (paramv, signal_id, 0, &return_value); ++ if (!g_value_get_boolean (&return_value)) ++ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); ++ g_value_unset (&return_value); ++ for (n = 0; n < num_params + num_extra; n++) ++ g_value_unset (¶mv[n]); ++ g_free (paramv); ++} ++ ++static GVariant * ++_gsd_accounts_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) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (user_data); ++ GValue value = G_VALUE_INIT; ++ GParamSpec *pspec; ++ _ExtendedGDBusPropertyInfo *info; ++ GVariant *ret; ++ ret = NULL; ++ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsd_accounts_interface_info.parent_struct, property_name); ++ g_assert (info != NULL); ++ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); ++ if (pspec == NULL) ++ { ++ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); ++ } ++ else ++ { ++ g_value_init (&value, pspec->value_type); ++ g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); ++ ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); ++ g_value_unset (&value); ++ } ++ return ret; ++} ++ ++static gboolean ++_gsd_accounts_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) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (user_data); ++ GValue value = G_VALUE_INIT; ++ GParamSpec *pspec; ++ _ExtendedGDBusPropertyInfo *info; ++ gboolean ret; ++ ret = FALSE; ++ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsd_accounts_interface_info.parent_struct, property_name); ++ g_assert (info != NULL); ++ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); ++ if (pspec == NULL) ++ { ++ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); ++ } ++ else ++ { ++ if (info->use_gvariant) ++ g_value_set_variant (&value, variant); ++ else ++ g_dbus_gvariant_to_gvalue (variant, &value); ++ g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); ++ g_value_unset (&value); ++ ret = TRUE; ++ } ++ return ret; ++} ++ ++static const GDBusInterfaceVTable _gsd_accounts_skeleton_vtable = ++{ ++ _gsd_accounts_skeleton_handle_method_call, ++ _gsd_accounts_skeleton_handle_get_property, ++ _gsd_accounts_skeleton_handle_set_property, ++ {NULL} ++}; ++ ++static GDBusInterfaceInfo * ++gsd_accounts_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) ++{ ++ return gsd_accounts_interface_info (); ++} ++ ++static GDBusInterfaceVTable * ++gsd_accounts_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) ++{ ++ return (GDBusInterfaceVTable *) &_gsd_accounts_skeleton_vtable; ++} ++ ++static GVariant * ++gsd_accounts_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (_skeleton); ++ ++ GVariantBuilder builder; ++ guint n; ++ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); ++ if (_gsd_accounts_interface_info.parent_struct.properties == NULL) ++ goto out; ++ for (n = 0; _gsd_accounts_interface_info.parent_struct.properties[n] != NULL; n++) ++ { ++ GDBusPropertyInfo *info = _gsd_accounts_interface_info.parent_struct.properties[n]; ++ if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) ++ { ++ GVariant *value; ++ value = _gsd_accounts_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Accounts", info->name, NULL, skeleton); ++ if (value != NULL) ++ { ++ g_variant_take_ref (value); ++ g_variant_builder_add (&builder, "{sv}", info->name, value); ++ g_variant_unref (value); ++ } ++ } ++ } ++out: ++ return g_variant_builder_end (&builder); ++} ++ ++static gboolean _gsd_accounts_emit_changed (gpointer user_data); ++ ++static void ++gsd_accounts_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (_skeleton); ++ gboolean emit_changed = FALSE; ++ ++ g_mutex_lock (&skeleton->priv->lock); ++ if (skeleton->priv->changed_properties_idle_source != NULL) ++ { ++ g_source_destroy (skeleton->priv->changed_properties_idle_source); ++ skeleton->priv->changed_properties_idle_source = NULL; ++ emit_changed = TRUE; ++ } ++ g_mutex_unlock (&skeleton->priv->lock); ++ ++ if (emit_changed) ++ _gsd_accounts_emit_changed (skeleton); ++} ++ ++static void ++_gsd_accounts_on_signal_user_added ( ++ GsdAccounts *object, ++ const gchar *arg_user) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (object); ++ ++ GList *connections, *l; ++ GVariant *signal_variant; ++ connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); ++ ++ signal_variant = g_variant_ref_sink (g_variant_new ("(o)", ++ arg_user)); ++ for (l = connections; l != NULL; l = l->next) ++ { ++ GDBusConnection *connection = l->data; ++ g_dbus_connection_emit_signal (connection, ++ NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Accounts", "UserAdded", ++ signal_variant, NULL); ++ } ++ g_variant_unref (signal_variant); ++ g_list_free_full (connections, g_object_unref); ++} ++ ++static void ++_gsd_accounts_on_signal_user_deleted ( ++ GsdAccounts *object, ++ const gchar *arg_user) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (object); ++ ++ GList *connections, *l; ++ GVariant *signal_variant; ++ connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); ++ ++ signal_variant = g_variant_ref_sink (g_variant_new ("(o)", ++ arg_user)); ++ for (l = connections; l != NULL; l = l->next) ++ { ++ GDBusConnection *connection = l->data; ++ g_dbus_connection_emit_signal (connection, ++ NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Accounts", "UserDeleted", ++ signal_variant, NULL); ++ } ++ g_variant_unref (signal_variant); ++ g_list_free_full (connections, g_object_unref); ++} ++ ++static void gsd_accounts_skeleton_iface_init (GsdAccountsIface *iface); ++#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 ++G_DEFINE_TYPE_WITH_CODE (GsdAccountsSkeleton, gsd_accounts_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, ++ G_ADD_PRIVATE (GsdAccountsSkeleton) ++ G_IMPLEMENT_INTERFACE (GSD_TYPE_ACCOUNTS, gsd_accounts_skeleton_iface_init)) ++ ++#else ++G_DEFINE_TYPE_WITH_CODE (GsdAccountsSkeleton, gsd_accounts_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, ++ G_IMPLEMENT_INTERFACE (GSD_TYPE_ACCOUNTS, gsd_accounts_skeleton_iface_init)) ++ ++#endif ++static void ++gsd_accounts_skeleton_finalize (GObject *object) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_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 (gsd_accounts_skeleton_parent_class)->finalize (object); ++} ++ ++static void ++gsd_accounts_skeleton_get_property (GObject *object, ++ guint prop_id, ++ GValue *value, ++ GParamSpec *pspec G_GNUC_UNUSED) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_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 ++_gsd_accounts_emit_changed (gpointer user_data) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (user_data); ++ GList *l; ++ GVariantBuilder builder; ++ GVariantBuilder invalidated_builder; ++ guint num_changes; ++ ++ g_mutex_lock (&skeleton->priv->lock); ++ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); ++ g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); ++ for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) ++ { ++ ChangedProperty *cp = l->data; ++ GVariant *variant; ++ const GValue *cur_value; ++ ++ cur_value = &skeleton->priv->properties[cp->prop_id - 1]; ++ if (!_g_value_equal (cur_value, &cp->orig_value)) ++ { ++ variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); ++ g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); ++ g_variant_unref (variant); ++ num_changes++; ++ } ++ } ++ if (num_changes > 0) ++ { ++ GList *connections, *ll; ++ GVariant *signal_variant; ++ signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.Accounts", ++ &builder, &invalidated_builder)); ++ connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); ++ for (ll = connections; ll != NULL; ll = ll->next) ++ { ++ GDBusConnection *connection = ll->data; ++ ++ g_dbus_connection_emit_signal (connection, ++ NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), ++ "org.freedesktop.DBus.Properties", ++ "PropertiesChanged", ++ signal_variant, ++ NULL); ++ } ++ g_variant_unref (signal_variant); ++ g_list_free_full (connections, g_object_unref); ++ } ++ else ++ { ++ g_variant_builder_clear (&builder); ++ g_variant_builder_clear (&invalidated_builder); ++ } ++ g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); ++ skeleton->priv->changed_properties = NULL; ++ skeleton->priv->changed_properties_idle_source = NULL; ++ g_mutex_unlock (&skeleton->priv->lock); ++ return FALSE; ++} ++ ++static void ++_gsd_accounts_schedule_emit_changed (GsdAccountsSkeleton *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 ++gsd_accounts_skeleton_notify (GObject *object, ++ GParamSpec *pspec G_GNUC_UNUSED) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (object); ++ g_mutex_lock (&skeleton->priv->lock); ++ if (skeleton->priv->changed_properties != NULL && ++ skeleton->priv->changed_properties_idle_source == NULL) ++ { ++ skeleton->priv->changed_properties_idle_source = g_idle_source_new (); ++ g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); ++ g_source_set_callback (skeleton->priv->changed_properties_idle_source, _gsd_accounts_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); ++ g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _gsd_accounts_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 ++gsd_accounts_skeleton_set_property (GObject *object, ++ guint prop_id, ++ const GValue *value, ++ GParamSpec *pspec) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_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) ++ _gsd_accounts_schedule_emit_changed (skeleton, _gsd_accounts_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); ++ g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); ++ g_object_notify_by_pspec (object, pspec); ++ } ++ g_mutex_unlock (&skeleton->priv->lock); ++ g_object_thaw_notify (object); ++} ++ ++static void ++gsd_accounts_skeleton_init (GsdAccountsSkeleton *skeleton) ++{ ++#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 ++ skeleton->priv = gsd_accounts_skeleton_get_instance_private (skeleton); ++#else ++ skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GSD_TYPE_ACCOUNTS_SKELETON, GsdAccountsSkeletonPrivate); ++#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_BOOLEAN); ++ g_value_init (&skeleton->priv->properties[2], G_TYPE_BOOLEAN); ++} ++ ++static const gchar * ++gsd_accounts_skeleton_get_daemon_version (GsdAccounts *object) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (object); ++ const gchar *value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_string (&(skeleton->priv->properties[0])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static gboolean ++gsd_accounts_skeleton_get_has_no_users (GsdAccounts *object) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (object); ++ gboolean value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_boolean (&(skeleton->priv->properties[1])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static gboolean ++gsd_accounts_skeleton_get_has_multiple_users (GsdAccounts *object) ++{ ++ GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (object); ++ gboolean value; ++ g_mutex_lock (&skeleton->priv->lock); ++ value = g_value_get_boolean (&(skeleton->priv->properties[2])); ++ g_mutex_unlock (&skeleton->priv->lock); ++ return value; ++} ++ ++static void ++gsd_accounts_skeleton_class_init (GsdAccountsSkeletonClass *klass) ++{ ++ GObjectClass *gobject_class; ++ GDBusInterfaceSkeletonClass *skeleton_class; ++ ++ gobject_class = G_OBJECT_CLASS (klass); ++ gobject_class->finalize = gsd_accounts_skeleton_finalize; ++ gobject_class->get_property = gsd_accounts_skeleton_get_property; ++ gobject_class->set_property = gsd_accounts_skeleton_set_property; ++ gobject_class->notify = gsd_accounts_skeleton_notify; ++ ++ ++ gsd_accounts_override_properties (gobject_class, 1); ++ ++ skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); ++ skeleton_class->get_info = gsd_accounts_skeleton_dbus_interface_get_info; ++ skeleton_class->get_properties = gsd_accounts_skeleton_dbus_interface_get_properties; ++ skeleton_class->flush = gsd_accounts_skeleton_dbus_interface_flush; ++ skeleton_class->get_vtable = gsd_accounts_skeleton_dbus_interface_get_vtable; ++ ++#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 ++ g_type_class_add_private (klass, sizeof (GsdAccountsSkeletonPrivate)); ++#endif ++} ++ ++static void ++gsd_accounts_skeleton_iface_init (GsdAccountsIface *iface) ++{ ++ iface->user_added = _gsd_accounts_on_signal_user_added; ++ iface->user_deleted = _gsd_accounts_on_signal_user_deleted; ++ iface->get_daemon_version = gsd_accounts_skeleton_get_daemon_version; ++ iface->get_has_no_users = gsd_accounts_skeleton_get_has_no_users; ++ iface->get_has_multiple_users = gsd_accounts_skeleton_get_has_multiple_users; ++} ++ ++/** ++ * gsd_accounts_skeleton_new: ++ * ++ * Creates a skeleton object for the D-Bus interface org.freedesktop.Accounts. ++ * ++ * Returns: (transfer full) (type GsdAccountsSkeleton): The skeleton object. ++ */ ++GsdAccounts * ++gsd_accounts_skeleton_new (void) ++{ ++ return GSD_ACCOUNTS (g_object_new (GSD_TYPE_ACCOUNTS_SKELETON, NULL)); ++} +diff --git a/plugins/account/org.freedesktop.Accounts.h b/plugins/account/org.freedesktop.Accounts.h +new file mode 100644 +index 00000000..b8d0625e +--- /dev/null ++++ b/plugins/account/org.freedesktop.Accounts.h +@@ -0,0 +1,400 @@ ++/* ++ * Generated by gdbus-codegen 2.54.1. DO NOT EDIT. ++ * ++ * The license of this code is the same as for the source it was derived from. ++ */ ++ ++#ifndef __ORG_FREEDESKTOP_ACCOUNTS_H__ ++#define __ORG_FREEDESKTOP_ACCOUNTS_H__ ++ ++#include ++ ++G_BEGIN_DECLS ++ ++ ++/* ------------------------------------------------------------------------ */ ++/* Declarations for org.freedesktop.Accounts */ ++ ++#define GSD_TYPE_ACCOUNTS (gsd_accounts_get_type ()) ++#define GSD_ACCOUNTS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_ACCOUNTS, GsdAccounts)) ++#define GSD_IS_ACCOUNTS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_ACCOUNTS)) ++#define GSD_ACCOUNTS_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GSD_TYPE_ACCOUNTS, GsdAccountsIface)) ++ ++struct _GsdAccounts; ++typedef struct _GsdAccounts GsdAccounts; ++typedef struct _GsdAccountsIface GsdAccountsIface; ++ ++struct _GsdAccountsIface ++{ ++ GTypeInterface parent_iface; ++ ++ ++ ++ gboolean (*handle_cache_user) ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_name); ++ ++ gboolean (*handle_create_user) ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_name, ++ const gchar *arg_fullname, ++ gint arg_accountType); ++ ++ gboolean (*handle_delete_user) ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ gint64 arg_id, ++ gboolean arg_removeFiles); ++ ++ gboolean (*handle_find_user_by_id) ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ gint64 arg_id); ++ ++ gboolean (*handle_find_user_by_name) ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_name); ++ ++ gboolean (*handle_list_cached_users) ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation); ++ ++ gboolean (*handle_uncache_user) ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *arg_name); ++ ++ const gchar * (*get_daemon_version) (GsdAccounts *object); ++ ++ gboolean (*get_has_multiple_users) (GsdAccounts *object); ++ ++ gboolean (*get_has_no_users) (GsdAccounts *object); ++ ++ void (*user_added) ( ++ GsdAccounts *object, ++ const gchar *arg_user); ++ ++ void (*user_deleted) ( ++ GsdAccounts *object, ++ const gchar *arg_user); ++ ++}; ++ ++GType gsd_accounts_get_type (void) G_GNUC_CONST; ++ ++GDBusInterfaceInfo *gsd_accounts_interface_info (void); ++guint gsd_accounts_override_properties (GObjectClass *klass, guint property_id_begin); ++ ++ ++/* D-Bus method call completion functions: */ ++void gsd_accounts_complete_list_cached_users ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *const *users); ++ ++void gsd_accounts_complete_find_user_by_id ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *user); ++ ++void gsd_accounts_complete_find_user_by_name ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *user); ++ ++void gsd_accounts_complete_create_user ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *user); ++ ++void gsd_accounts_complete_cache_user ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation, ++ const gchar *user); ++ ++void gsd_accounts_complete_uncache_user ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation); ++ ++void gsd_accounts_complete_delete_user ( ++ GsdAccounts *object, ++ GDBusMethodInvocation *invocation); ++ ++ ++ ++/* D-Bus signal emissions functions: */ ++void gsd_accounts_emit_user_added ( ++ GsdAccounts *object, ++ const gchar *arg_user); ++ ++void gsd_accounts_emit_user_deleted ( ++ GsdAccounts *object, ++ const gchar *arg_user); ++ ++ ++ ++/* D-Bus method calls: */ ++void gsd_accounts_call_list_cached_users ( ++ GsdAccounts *proxy, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_call_list_cached_users_finish ( ++ GsdAccounts *proxy, ++ gchar ***out_users, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_call_list_cached_users_sync ( ++ GsdAccounts *proxy, ++ gchar ***out_users, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_call_find_user_by_id ( ++ GsdAccounts *proxy, ++ gint64 arg_id, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_call_find_user_by_id_finish ( ++ GsdAccounts *proxy, ++ gchar **out_user, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_call_find_user_by_id_sync ( ++ GsdAccounts *proxy, ++ gint64 arg_id, ++ gchar **out_user, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_call_find_user_by_name ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_call_find_user_by_name_finish ( ++ GsdAccounts *proxy, ++ gchar **out_user, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_call_find_user_by_name_sync ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ gchar **out_user, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_call_create_user ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ const gchar *arg_fullname, ++ gint arg_accountType, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_call_create_user_finish ( ++ GsdAccounts *proxy, ++ gchar **out_user, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_call_create_user_sync ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ const gchar *arg_fullname, ++ gint arg_accountType, ++ gchar **out_user, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_call_cache_user ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_call_cache_user_finish ( ++ GsdAccounts *proxy, ++ gchar **out_user, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_call_cache_user_sync ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ gchar **out_user, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_call_uncache_user ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_call_uncache_user_finish ( ++ GsdAccounts *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_call_uncache_user_sync ( ++ GsdAccounts *proxy, ++ const gchar *arg_name, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_call_delete_user ( ++ GsdAccounts *proxy, ++ gint64 arg_id, ++ gboolean arg_removeFiles, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++ ++gboolean gsd_accounts_call_delete_user_finish ( ++ GsdAccounts *proxy, ++ GAsyncResult *res, ++ GError **error); ++ ++gboolean gsd_accounts_call_delete_user_sync ( ++ GsdAccounts *proxy, ++ gint64 arg_id, ++ gboolean arg_removeFiles, ++ GCancellable *cancellable, ++ GError **error); ++ ++ ++ ++/* D-Bus property accessors: */ ++const gchar *gsd_accounts_get_daemon_version (GsdAccounts *object); ++gchar *gsd_accounts_dup_daemon_version (GsdAccounts *object); ++void gsd_accounts_set_daemon_version (GsdAccounts *object, const gchar *value); ++ ++gboolean gsd_accounts_get_has_no_users (GsdAccounts *object); ++void gsd_accounts_set_has_no_users (GsdAccounts *object, gboolean value); ++ ++gboolean gsd_accounts_get_has_multiple_users (GsdAccounts *object); ++void gsd_accounts_set_has_multiple_users (GsdAccounts *object, gboolean value); ++ ++ ++/* ---- */ ++ ++#define GSD_TYPE_ACCOUNTS_PROXY (gsd_accounts_proxy_get_type ()) ++#define GSD_ACCOUNTS_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_ACCOUNTS_PROXY, GsdAccountsProxy)) ++#define GSD_ACCOUNTS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSD_TYPE_ACCOUNTS_PROXY, GsdAccountsProxyClass)) ++#define GSD_ACCOUNTS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_ACCOUNTS_PROXY, GsdAccountsProxyClass)) ++#define GSD_IS_ACCOUNTS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_ACCOUNTS_PROXY)) ++#define GSD_IS_ACCOUNTS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_ACCOUNTS_PROXY)) ++ ++typedef struct _GsdAccountsProxy GsdAccountsProxy; ++typedef struct _GsdAccountsProxyClass GsdAccountsProxyClass; ++typedef struct _GsdAccountsProxyPrivate GsdAccountsProxyPrivate; ++ ++struct _GsdAccountsProxy ++{ ++ /*< private >*/ ++ GDBusProxy parent_instance; ++ GsdAccountsProxyPrivate *priv; ++}; ++ ++struct _GsdAccountsProxyClass ++{ ++ GDBusProxyClass parent_class; ++}; ++ ++GType gsd_accounts_proxy_get_type (void) G_GNUC_CONST; ++ ++#if GLIB_CHECK_VERSION(2, 44, 0) ++G_DEFINE_AUTOPTR_CLEANUP_FUNC (GsdAccountsProxy, g_object_unref) ++#endif ++ ++void gsd_accounts_proxy_new ( ++ GDBusConnection *connection, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++GsdAccounts *gsd_accounts_proxy_new_finish ( ++ GAsyncResult *res, ++ GError **error); ++GsdAccounts *gsd_accounts_proxy_new_sync ( ++ GDBusConnection *connection, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GError **error); ++ ++void gsd_accounts_proxy_new_for_bus ( ++ GBusType bus_type, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++GsdAccounts *gsd_accounts_proxy_new_for_bus_finish ( ++ GAsyncResult *res, ++ GError **error); ++GsdAccounts *gsd_accounts_proxy_new_for_bus_sync ( ++ GBusType bus_type, ++ GDBusProxyFlags flags, ++ const gchar *name, ++ const gchar *object_path, ++ GCancellable *cancellable, ++ GError **error); ++ ++ ++/* ---- */ ++ ++#define GSD_TYPE_ACCOUNTS_SKELETON (gsd_accounts_skeleton_get_type ()) ++#define GSD_ACCOUNTS_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_ACCOUNTS_SKELETON, GsdAccountsSkeleton)) ++#define GSD_ACCOUNTS_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSD_TYPE_ACCOUNTS_SKELETON, GsdAccountsSkeletonClass)) ++#define GSD_ACCOUNTS_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_ACCOUNTS_SKELETON, GsdAccountsSkeletonClass)) ++#define GSD_IS_ACCOUNTS_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_ACCOUNTS_SKELETON)) ++#define GSD_IS_ACCOUNTS_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_ACCOUNTS_SKELETON)) ++ ++typedef struct _GsdAccountsSkeleton GsdAccountsSkeleton; ++typedef struct _GsdAccountsSkeletonClass GsdAccountsSkeletonClass; ++typedef struct _GsdAccountsSkeletonPrivate GsdAccountsSkeletonPrivate; ++ ++struct _GsdAccountsSkeleton ++{ ++ /*< private >*/ ++ GDBusInterfaceSkeleton parent_instance; ++ GsdAccountsSkeletonPrivate *priv; ++}; ++ ++struct _GsdAccountsSkeletonClass ++{ ++ GDBusInterfaceSkeletonClass parent_class; ++}; ++ ++GType gsd_accounts_skeleton_get_type (void) G_GNUC_CONST; ++ ++#if GLIB_CHECK_VERSION(2, 44, 0) ++G_DEFINE_AUTOPTR_CLEANUP_FUNC (GsdAccountsSkeleton, g_object_unref) ++#endif ++ ++GsdAccounts *gsd_accounts_skeleton_new (void); ++ ++ ++G_END_DECLS ++ ++#endif /* __ORG_FREEDESKTOP_ACCOUNTS_H__ */ +diff --git a/plugins/account/org.freedesktop.Accounts.xml b/plugins/account/org.freedesktop.Accounts.xml +new file mode 100644 +index 00000000..ed7db50c +--- /dev/null ++++ b/plugins/account/org.freedesktop.Accounts.xml +@@ -0,0 +1,248 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Object paths of cached users ++ ++ ++ ++ ++ ++ Lists users which have logged into the system locally before. ++ This is not meant to return an exhaustive list of all users. ++ It is possible for FindUserByName() ++ to return a user that's not on the list. ++ ++ ++ ++ ++ ++ ++ ++ ++ The uid to look up ++ ++ ++ Object path of user ++ ++ ++ ++ ++ ++ Finds a user by uid. ++ ++ ++ ++ if no user with the given uid exists ++ ++ ++ ++ ++ ++ ++ ++ The username to look up ++ ++ ++ Object path of user ++ ++ ++ ++ ++ ++ Finds a user by its username. ++ ++ ++ ++ if no user with the given username exists ++ ++ ++ ++ ++ ++ ++ ++ The username for the new user ++ ++ ++ ++ The real name for the new user ++ ++ ++ Object path of the new user ++ ++ ++ ++ The account type, encoded as an integer ++ ++ ++ ++ ++ ++ Creates a new user account. ++ ++ ++ The accountType argument can take the following values: ++ ++ ++ ++ 0 ++ Standard user ++ ++ ++ 1 ++ Administrator ++ ++ ++ ++ ++ The caller needs the org.freedesktop.accounts.user-administration PolicyKit authorization. ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ ++ The username for the user ++ ++ ++ Object path of user ++ ++ ++ ++ ++ ++ Caches a user account, so that it shows up in ListCachedUsers() output. ++ The user name may be a remote user, but the system must be able to lookup ++ the user name and resolve the user information. ++ ++ ++ ++ The caller needs the org.freedesktop.accounts.user-administration PolicyKit authorization. ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the user name cannot be resolved ++ ++ ++ ++ ++ ++ ++ ++ The username for the user ++ ++ ++ ++ ++ ++ Releases all metadata about a user account, including icon, language and session. If the user account is ++ from a remote server and the user has never logged in before, then that account will no longer show up ++ in ListCachedUsers() output. ++ ++ ++ ++ The caller needs the org.freedesktop.accounts.user-administration PolicyKit authorization. ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the user name cannot be resolved ++ ++ ++ ++ ++ ++ ++ ++ The uid to delete ++ ++ ++ Whether to remove the users files ++ ++ ++ ++ ++ ++ Deletes a user account. ++ ++ ++ ++ The caller needs the org.freedesktop.accounts.user-administration PolicyKit authorization. ++ ++ ++ if the caller lacks the appropriate PolicyKit authorization ++ if the operation failed ++ ++ ++ ++ ++ ++ ++ Object path of the user that was added. ++ ++ ++ ++ ++ Emitted when a user is added. ++ ++ ++ ++ ++ ++ ++ ++ Object path of the user that was deleted. ++ ++ ++ ++ ++ Emitted when a user is deleted. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The version of the running daemon. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Whether or not the system has no users ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Whether or not the system has multiple users ++ ++ ++ ++ ++ ++ ++ +diff --git a/plugins/account/org.gnome.SettingsDaemon.Account.desktop b/plugins/account/org.gnome.SettingsDaemon.Account.desktop +new file mode 100644 +index 00000000..388fbd54 +--- /dev/null ++++ b/plugins/account/org.gnome.SettingsDaemon.Account.desktop +@@ -0,0 +1,9 @@ ++[Desktop Entry] ++Type=Application ++Name=GNOME Settings Daemon's housekeeping plugin ++Exec=/usr/libexec/gsd-account ++OnlyShowIn=GNOME; ++NoDisplay=true ++X-GNOME-Autostart-Phase=Initialization ++X-GNOME-Autostart-Notify=true ++X-GNOME-AutoRestart=true +diff --git a/plugins/account/org.gnome.SettingsDaemon.Account.desktop.in b/plugins/account/org.gnome.SettingsDaemon.Account.desktop.in +new file mode 100644 +index 00000000..1a8ded7d +--- /dev/null ++++ b/plugins/account/org.gnome.SettingsDaemon.Account.desktop.in +@@ -0,0 +1,9 @@ ++[Desktop Entry] ++Type=Application ++Name=GNOME Settings Daemon's housekeeping plugin ++Exec=@libexecdir@/gsd-account ++OnlyShowIn=GNOME; ++NoDisplay=true ++X-GNOME-Autostart-Phase=Initialization ++X-GNOME-Autostart-Notify=true ++X-GNOME-AutoRestart=true +diff --git a/plugins/meson.build b/plugins/meson.build +index 3db69da7..3c4d42ac 100644 +--- a/plugins/meson.build ++++ b/plugins/meson.build +@@ -1,32 +1,33 @@ + enabled_plugins = [ + ['a11y-settings', 'A11ySettings'], ++ ['account', 'Account'], + ['clipboard', 'Clipboard'], + ['color', 'Color'], + ['datetime', 'Datetime'], + ['dummy', ''], + ['power', 'Power'], + ['housekeeping', 'Housekeeping'], + ['keyboard', 'Keyboard'], + ['media-keys', 'MediaKeys'], + ['mouse', 'Mouse'], + ['screensaver-proxy', 'ScreensaverProxy'], + ['sharing', 'Sharing'], + ['sound', 'Sound'], + ['xsettings', 'XSettings'] + ] + + if enable_smartcard + enabled_plugins += [['smartcard', 'Smartcard']] + endif + + if enable_wacom + enabled_plugins += [['wacom', 'Wacom']] + endif + + if enable_cups + enabled_plugins += [['print-notifications', 'PrintNotifications']] + endif + + if enable_rfkill + enabled_plugins += [['rfkill', 'Rfkill']] + endif +-- +2.21.0 + diff --git a/SOURCES/0001-housekeeping-Add-a-GPU-memory-usage-notification.patch b/SOURCES/0001-housekeeping-Add-a-GPU-memory-usage-notification.patch new file mode 100644 index 0000000..981d617 --- /dev/null +++ b/SOURCES/0001-housekeeping-Add-a-GPU-memory-usage-notification.patch @@ -0,0 +1,5101 @@ +From e206501e56a364efa130f9a1c691f61d8cf0bd1a Mon Sep 17 00:00:00 2001 +From: Rui Matos +Date: Thu, 31 Aug 2017 17:32:43 +0200 +Subject: [PATCH] housekeeping: Add a GPU memory usage notification + +Only works on supported nvidia GPUs and nvidia binary driver +combinations. +--- + meson.build | 1 + + plugins/housekeeping/gsd-gpu-mem.c | 261 + + plugins/housekeeping/gsd-gpu-mem.h | 33 + + .../housekeeping/gsd-housekeeping-manager.c | 7 + + plugins/housekeeping/meson.build | 7 +- + plugins/housekeeping/nvml/include/nvml.h | 4447 +++++++++++++++++ + 6 files changed, 4754 insertions(+), 2 deletions(-) + create mode 100644 plugins/housekeeping/gsd-gpu-mem.c + create mode 100644 plugins/housekeeping/gsd-gpu-mem.h + create mode 100644 plugins/housekeeping/nvml/include/nvml.h + +diff --git a/meson.build b/meson.build +index a352d04f..1632ea05 100644 +--- a/meson.build ++++ b/meson.build +@@ -76,60 +76,61 @@ endif + + # Workaround for meson's bug + # https://github.com/mesonbuild/meson/pull/1896 + if get_option('b_ndebug') == true + common_flags += ['-DG_DISABLE_ASSERT'] + endif + + add_project_arguments(common_flags + compiler_flags, language: 'c') + + glib_dep = dependency('glib-2.0', version: '>= 2.56') + colord_dep = dependency('colord', version: '>= 1.0.2') + geocode_glib_dep = dependency('geocode-glib-1.0', version: '>= 3.10.0') + gio_dep = dependency('gio-2.0', version: '>= 2.53.0') + gio_unix_dep = dependency('gio-unix-2.0') + gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.11.1') + gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 3.27.90') + gtk_dep = dependency('gtk+-3.0', version: '>= 3.15.3') + gtk_x11_dep = dependency('gtk+-x11-3.0') + gweather_dep = dependency('gweather-3.0', version: '>= 3.9.5') + lcms_dep = dependency('lcms2', version: '>= 2.2') + libcanberra_gtk_dep = dependency('libcanberra-gtk3') + libgeoclue_dep = dependency('libgeoclue-2.0', version: '>= 2.3.1') + libnotify_dep = dependency('libnotify', version: '>= 0.7.3') + libpulse_mainloop_glib_dep = dependency('libpulse-mainloop-glib', version: '>= 2.0') + pango_dep = dependency('pango', version: '>= 1.20.0') + polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103') + upower_glib_dep = dependency('upower-glib', version: '>= 0.99.0') + x11_dep = dependency('x11') + + m_dep = cc.find_library('m') ++dl_dep = cc.find_library('dl') + + # ALSA integration (default enabled) + enable_alsa = get_option('alsa') + assert(enable_alsa or not host_is_linux, 'ALSA is not optional on Linux platforms') + + libgvc = subproject( + 'gvc', + default_options: [ + 'static=true', + 'alsa=' + enable_alsa.to_string() + ] + ) + libgvc_dep = libgvc.get_variable('libgvc_dep') + + # GUdev integration (default enabled) + enable_gudev = get_option('gudev') + if enable_gudev + gudev_dep = dependency('gudev-1.0') + endif + config_h.set10('HAVE_GUDEV', enable_gudev) + if host_is_linux + assert(enable_gudev, 'GUdev is not optional on Linux platforms') + endif + + has_timerfd_create = cc.has_function('timerfd_create') + config_h.set10('HAVE_TIMERFD', has_timerfd_create) + + # Check for wayland dependencies + enable_wayland = get_option('wayland') + if enable_wayland +diff --git a/plugins/housekeeping/gsd-gpu-mem.c b/plugins/housekeeping/gsd-gpu-mem.c +new file mode 100644 +index 00000000..a76579b6 +--- /dev/null ++++ b/plugins/housekeeping/gsd-gpu-mem.c +@@ -0,0 +1,261 @@ ++/* ++ * Copyright (C) 2017 Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ */ ++ ++#include ++#include ++#include ++#include "nvml/include/nvml.h" ++ ++typedef nvmlReturn_t (*nvml_init_t) (void); ++static nvml_init_t nvml_init; ++typedef nvmlReturn_t (*nvml_device_get_handle_by_index_t) (unsigned int, nvmlDevice_t *); ++static nvml_device_get_handle_by_index_t nvml_device_get_handle_by_index; ++typedef nvmlReturn_t (*nvml_device_get_memory_info_t) (nvmlDevice_t, nvmlMemory_t *); ++static nvml_device_get_memory_info_t nvml_device_get_memory_info; ++typedef const char* (*nvml_error_string_t) (nvmlReturn_t); ++static nvml_error_string_t nvml_error_string; ++static void *nvml_handle = NULL; ++static gboolean nvml_loaded = FALSE; ++ ++static gboolean ++nvml_load (void) ++{ ++ char *error; ++ ++ if (nvml_loaded) ++ goto out; ++ nvml_loaded = TRUE; ++ ++ nvml_handle = dlopen ("libnvidia-ml.so", RTLD_LAZY); ++ error = dlerror(); ++ if (!nvml_handle) ++ { ++ g_warning ("Loading NVML: %s", error); ++ goto out; ++ } ++ ++ nvml_init = (nvml_init_t) dlsym (nvml_handle, "nvmlInit"); ++ nvml_device_get_handle_by_index = (nvml_device_get_handle_by_index_t) dlsym (nvml_handle, "nvmlDeviceGetHandleByIndex"); ++ nvml_device_get_memory_info = (nvml_device_get_memory_info_t) dlsym (nvml_handle, "nvmlDeviceGetMemoryInfo"); ++ nvml_error_string = (nvml_error_string_t) dlsym (nvml_handle, "nvmlErrorString"); ++ error = dlerror(); ++ if (error) ++ { ++ g_warning ("Loading NVML: %s", error); ++ goto cleanup; ++ } ++ goto out; ++ ++ cleanup: ++ dlclose (nvml_handle); ++ nvml_handle = NULL; ++ out: ++ return nvml_handle != NULL; ++} ++ ++static nvmlReturn_t nvml_status = NVML_ERROR_UNINITIALIZED; ++static nvmlDevice_t nvml_device = NULL; ++ ++static nvmlReturn_t ++nvml_warn (nvmlReturn_t rcode, const gchar *prefix) ++{ ++ if (rcode != NVML_SUCCESS) ++ g_warning ("%s: %s", prefix, nvml_error_string (rcode)); ++ return rcode; ++} ++ ++static gboolean ++nvml_ready (void) ++{ ++ if (!nvml_load ()) ++ return FALSE; ++ ++ if (nvml_status == NVML_ERROR_UNINITIALIZED) ++ { ++ nvml_status = nvml_warn (nvml_init (), "Initializing NVML"); ++ if (nvml_status == NVML_SUCCESS) ++ nvml_warn (nvml_device_get_handle_by_index (0, &nvml_device), "Getting NVML device 0"); ++ } ++ ++ return nvml_status == NVML_SUCCESS && nvml_device != NULL; ++} ++ ++static void ++nvml_read_mem_info (nvmlMemory_t *mem_info) ++{ ++ if (!nvml_ready ()) ++ return; ++ ++ nvml_device_get_memory_info (nvml_device, mem_info); ++} ++ ++ ++#include ++#include ++#include "gsd-gpu-mem.h" ++ ++#define POLLING_INTERVAL 30 ++#define MEM_USAGE_NOTIFY_THRESHOLD 0.80 ++ ++struct _GsdGpuMem ++{ ++ GObject parent_instance; ++ ++ guint timeout_id; ++ ++ GDesktopAppInfo *sysmon_app_info; ++ NotifyNotification *notification; ++}; ++ ++G_DEFINE_TYPE (GsdGpuMem, gsd_gpu_mem, G_TYPE_OBJECT) ++ ++static void ++clear_timeout (GsdGpuMem *self) ++{ ++ if (self->timeout_id != 0) ++ { ++ g_source_remove (self->timeout_id); ++ self->timeout_id = 0; ++ } ++} ++ ++static void ++notification_closed (GsdGpuMem *self) ++{ ++ g_clear_object (&self->notification); ++} ++ ++static void ++unnotify (GsdGpuMem *self) ++{ ++ if (!self->notification) ++ return; ++ ++ notify_notification_close (self->notification, NULL); ++} ++ ++static void ++ignore_callback (NotifyNotification *n, ++ const char *a, ++ GsdGpuMem *self) ++{ ++ unnotify (self); ++ clear_timeout (self); ++} ++ ++static void ++examine_callback (NotifyNotification *n, ++ const char *a, ++ GsdGpuMem *self) ++ ++{ ++ unnotify (self); ++ g_app_info_launch (G_APP_INFO (self->sysmon_app_info), NULL, NULL, NULL); ++} ++ ++static void ++notify (GsdGpuMem *self, double mem_usage) ++{ ++ const gchar *summary = "Running low on GPU memory"; ++ const gchar *icon_name = "utilities-system-monitor-symbolic"; ++ g_autofree gchar *body = g_strdup_printf ("GPU memory usage is at %d%%. " ++ "You may free up some memory by closing some applications.", ++ (int) round (mem_usage * 100)); ++ if (self->notification) ++ { ++ notify_notification_update (self->notification, summary, body, icon_name); ++ notify_notification_show (self->notification, NULL); ++ return; ++ } ++ ++ self->notification = notify_notification_new (summary, body, icon_name); ++ g_signal_connect_object (self->notification, "closed", ++ G_CALLBACK (notification_closed), ++ self, G_CONNECT_SWAPPED); ++ ++ notify_notification_set_app_name (self->notification, "GPU memory"); ++ ++ notify_notification_add_action (self->notification, ++ "ignore", ++ "Ignore", ++ (NotifyActionCallback) ignore_callback, ++ self, NULL); ++ ++ if (self->sysmon_app_info) ++ notify_notification_add_action (self->notification, ++ "examine", ++ "Examine", ++ (NotifyActionCallback) examine_callback, ++ self, NULL); ++ ++ notify_notification_show (self->notification, NULL); ++} ++ ++static gboolean ++poll_gpu_memory (gpointer user_data) ++{ ++ GsdGpuMem *self = user_data; ++ nvmlMemory_t mem_info = { 0 }; ++ double mem_usage = 0.0; ++ ++ nvml_read_mem_info (&mem_info); ++ if (mem_info.total > 0) ++ mem_usage = (double) mem_info.used / mem_info.total; ++ ++ if (mem_usage > MEM_USAGE_NOTIFY_THRESHOLD) ++ { ++ notify (self, mem_usage); ++ } ++ else ++ { ++ unnotify (self); ++ } ++ ++ return G_SOURCE_CONTINUE; ++} ++ ++static void ++gsd_gpu_mem_init (GsdGpuMem *self) ++{ ++ if (!nvml_ready ()) ++ return; ++ ++ self->timeout_id = g_timeout_add_seconds (POLLING_INTERVAL, poll_gpu_memory, self); ++ self->sysmon_app_info = g_desktop_app_info_new ("gnome-system-monitor.desktop"); ++} ++ ++static void ++gsd_gpu_mem_finalize (GObject *object) ++{ ++ GsdGpuMem *self = GSD_GPU_MEM (object); ++ ++ clear_timeout (self); ++ g_clear_object (&self->sysmon_app_info); ++ unnotify (self); ++ ++ G_OBJECT_CLASS (gsd_gpu_mem_parent_class)->finalize (object); ++} ++ ++static void ++gsd_gpu_mem_class_init (GsdGpuMemClass *klass) ++{ ++ GObjectClass *gobject_class = G_OBJECT_CLASS (klass); ++ ++ gobject_class->finalize = gsd_gpu_mem_finalize; ++} +diff --git a/plugins/housekeeping/gsd-gpu-mem.h b/plugins/housekeeping/gsd-gpu-mem.h +new file mode 100644 +index 00000000..f8967879 +--- /dev/null ++++ b/plugins/housekeeping/gsd-gpu-mem.h +@@ -0,0 +1,33 @@ ++/* ++ * Copyright (C) 2017 Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ */ ++ ++#ifndef _GSD_GPU_MEM_H ++#define _GSD_GPU_MEM_H ++ ++#include ++ ++G_BEGIN_DECLS ++ ++#define GSD_TYPE_GPU_MEM (gsd_gpu_mem_get_type ()) ++G_DECLARE_FINAL_TYPE (GsdGpuMem, gsd_gpu_mem, ++ GSD, GPU_MEM, GObject) ++ ++G_END_DECLS ++ ++#endif /* _GSD_GPU_MEM_H */ +diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeeping/gsd-housekeeping-manager.c +index 5ace4179..1bd53061 100644 +--- a/plugins/housekeeping/gsd-housekeeping-manager.c ++++ b/plugins/housekeeping/gsd-housekeeping-manager.c +@@ -1,89 +1,92 @@ + /* + * Copyright (C) 2008 Michael J. Chudobiak + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + */ + + #include "config.h" + + #include + #include + #include + #include + + #include "gnome-settings-profile.h" + #include "gsd-housekeeping-manager.h" + #include "gsd-disk-space.h" ++#include "gsd-gpu-mem.h" + + + /* General */ + #define INTERVAL_ONCE_A_DAY 24*60*60 + #define INTERVAL_TWO_MINUTES 2*60 + + /* Thumbnail cleaner */ + #define THUMB_PREFIX "org.gnome.desktop.thumbnail-cache" + + #define THUMB_AGE_KEY "maximum-age" + #define THUMB_SIZE_KEY "maximum-size" + + #define GSD_HOUSEKEEPING_DBUS_PATH "/org/gnome/SettingsDaemon/Housekeeping" + + static const gchar introspection_xml[] = + "" + " " + " " + " " + " " + ""; + + struct GsdHousekeepingManagerPrivate { + GSettings *settings; + guint long_term_cb; + guint short_term_cb; + + GDBusNodeInfo *introspection_data; + GDBusConnection *connection; + GCancellable *bus_cancellable; + guint name_id; ++ ++ GsdGpuMem *gpu_mem_notifier; + }; + + #define GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManagerPrivate)) + + static void gsd_housekeeping_manager_class_init (GsdHousekeepingManagerClass *klass); + static void gsd_housekeeping_manager_init (GsdHousekeepingManager *housekeeping_manager); + + G_DEFINE_TYPE (GsdHousekeepingManager, gsd_housekeeping_manager, G_TYPE_OBJECT) + + static gpointer manager_object = NULL; + + + typedef struct { + glong now; + glong max_age; + goffset total_size; + goffset max_size; + } PurgeData; + + + typedef struct { + time_t mtime; + char *path; + glong size; + } ThumbData; + + + static void + thumb_data_free (gpointer data) + { +@@ -384,101 +387,105 @@ gsd_housekeeping_manager_start (GsdHousekeepingManager *manager, + { + gchar *dir; + + g_debug ("Starting housekeeping manager"); + gnome_settings_profile_start (NULL); + + /* Create ~/.local/ as early as possible */ + (void) g_mkdir_with_parents(g_get_user_data_dir (), 0700); + + /* Create ~/.local/share/applications/, see + * https://bugzilla.gnome.org/show_bug.cgi?id=703048 */ + dir = g_build_filename (g_get_user_data_dir (), "applications", NULL); + (void) g_mkdir (dir, 0700); + g_free (dir); + + gsd_ldsm_setup (FALSE); + + manager->priv->settings = g_settings_new (THUMB_PREFIX); + g_signal_connect (G_OBJECT (manager->priv->settings), "changed", + G_CALLBACK (settings_changed_callback), manager); + + /* Clean once, a few minutes after start-up */ + do_cleanup_soon (manager); + + /* Clean periodically, on a daily basis. */ + manager->priv->long_term_cb = g_timeout_add_seconds (INTERVAL_ONCE_A_DAY, + (GSourceFunc) do_cleanup, + manager); + g_source_set_name_by_id (manager->priv->long_term_cb, "[gnome-settings-daemon] do_cleanup"); + ++ manager->priv->gpu_mem_notifier = g_object_new (GSD_TYPE_GPU_MEM, NULL); ++ + gnome_settings_profile_end (NULL); + + return TRUE; + } + + void + gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager) + { + GsdHousekeepingManagerPrivate *p = manager->priv; + + g_debug ("Stopping housekeeping manager"); + + if (manager->priv->name_id != 0) { + g_bus_unown_name (manager->priv->name_id); + manager->priv->name_id = 0; + } + + g_clear_object (&p->bus_cancellable); + g_clear_pointer (&p->introspection_data, g_dbus_node_info_unref); + g_clear_object (&p->connection); + + if (p->short_term_cb) { + g_source_remove (p->short_term_cb); + p->short_term_cb = 0; + } + + if (p->long_term_cb) { + g_source_remove (p->long_term_cb); + p->long_term_cb = 0; + + /* Do a clean-up on shutdown if and only if the size or age + limits have been set to paranoid levels (zero) */ + if ((g_settings_get_int (p->settings, THUMB_AGE_KEY) == 0) || + (g_settings_get_int (p->settings, THUMB_SIZE_KEY) == 0)) { + do_cleanup (manager); + } + + } + + g_clear_object (&p->settings); + gsd_ldsm_clean (); ++ ++ g_clear_object (&p->gpu_mem_notifier); + } + + static void + gsd_housekeeping_manager_finalize (GObject *object) + { + gsd_housekeeping_manager_stop (GSD_HOUSEKEEPING_MANAGER (object)); + + G_OBJECT_CLASS (gsd_housekeeping_manager_parent_class)->finalize (object); + } + + static void + gsd_housekeeping_manager_class_init (GsdHousekeepingManagerClass *klass) + { + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = gsd_housekeeping_manager_finalize; + + notify_init ("gnome-settings-daemon"); + + g_type_class_add_private (klass, sizeof (GsdHousekeepingManagerPrivate)); + } + + static void + gsd_housekeeping_manager_init (GsdHousekeepingManager *manager) + { + manager->priv = GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE (manager); + } + + GsdHousekeepingManager * + gsd_housekeeping_manager_new (void) +diff --git a/plugins/housekeeping/meson.build b/plugins/housekeeping/meson.build +index a0b4ca5f..0b690cdb 100644 +--- a/plugins/housekeeping/meson.build ++++ b/plugins/housekeeping/meson.build +@@ -1,41 +1,44 @@ + common_files = files( + 'gsd-disk-space.c', +- 'gsd-disk-space-helper.c' ++ 'gsd-disk-space-helper.c', ++ 'gsd-gpu-mem.c' + ) + + sources = common_files + files( + 'gsd-housekeeping-manager.c', + 'main.c' + ) + + deps = plugins_deps + [ + gio_unix_dep, + gtk_dep, +- libnotify_dep ++ libnotify_dep, ++ m_dep, ++ dl_dep + ] + + executable( + 'gsd-' + plugin_name, + sources, + include_directories: [top_inc, common_inc], + dependencies: deps, + c_args: cflags, + install: true, + install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + + programs = [ + 'gsd-disk-space-test', + 'gsd-empty-trash-test', + 'gsd-purge-temp-test' + ] + + foreach program: programs + executable( + program, + common_files + [program + '.c'], + include_directories: top_inc, + dependencies: deps + ) + endforeach +diff --git a/plugins/housekeeping/nvml/include/nvml.h b/plugins/housekeeping/nvml/include/nvml.h +new file mode 100644 +index 00000000..f151007e +--- /dev/null ++++ b/plugins/housekeeping/nvml/include/nvml.h +@@ -0,0 +1,4447 @@ ++/* ++ * Copyright 1993-2016 NVIDIA Corporation. All rights reserved. ++ * ++ * NOTICE TO USER: ++ * ++ * This source code is subject to NVIDIA ownership rights under U.S. and ++ * international Copyright laws. Users and possessors of this source code ++ * are hereby granted a nonexclusive, royalty-free license to use this code ++ * in individual and commercial software. ++ * ++ * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE ++ * CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR ++ * IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH ++ * REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. ++ * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, ++ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS ++ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE ++ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE ++ * OR PERFORMANCE OF THIS SOURCE CODE. ++ * ++ * U.S. Government End Users. This source code is a "commercial item" as ++ * that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of ++ * "commercial computer software" and "commercial computer software ++ * documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) ++ * and is provided to the U.S. Government only as a commercial end item. ++ * Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through ++ * 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the ++ * source code with only those rights set forth herein. ++ * ++ * Any use of this source code in individual and commercial software must ++ * include, in the user documentation and internal comments to the code, ++ * the above Disclaimer and U.S. Government End Users Notice. ++ */ ++ ++/* ++NVML API Reference ++ ++The NVIDIA Management Library (NVML) is a C-based programmatic interface for monitoring and ++managing various states within NVIDIA Tesla &tm; GPUs. It is intended to be a platform for building ++3rd party applications, and is also the underlying library for the NVIDIA-supported nvidia-smi ++tool. NVML is thread-safe so it is safe to make simultaneous NVML calls from multiple threads. ++ ++API Documentation ++ ++Supported platforms: ++- Windows: Windows Server 2008 R2 64bit, Windows Server 2012 R2 64bit, Windows 7 64bit, Windows 8 64bit, Windows 10 64bit ++- Linux: 32-bit and 64-bit ++- Hypervisors: Windows Server 2008R2/2012 Hyper-V 64bit, Citrix XenServer 6.2 SP1+, VMware ESX 5.1/5.5 ++ ++Supported products: ++- Full Support ++ - All Tesla products, starting with the Fermi architecture ++ - All Quadro products, starting with the Fermi architecture ++ - All GRID products, starting with the Kepler architecture ++ - Selected GeForce Titan products ++- Limited Support ++ - All Geforce products, starting with the Fermi architecture ++ ++The NVML library can be found at \%ProgramW6432\%\\"NVIDIA Corporation"\\NVSMI\\ on Windows. It is ++not be added to the system path by default. To dynamically link to NVML, add this path to the PATH ++environmental variable. To dynamically load NVML, call LoadLibrary with this path. ++ ++On Linux the NVML library will be found on the standard library path. For 64 bit Linux, both the 32 bit ++and 64 bit NVML libraries will be installed. ++ ++Online documentation for this library is available at http://docs.nvidia.com/deploy/nvml-api/index.html ++*/ ++ ++#ifndef __nvml_nvml_h__ ++#define __nvml_nvml_h__ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++ * On Windows, set up methods for DLL export ++ * define NVML_STATIC_IMPORT when using nvml_loader library ++ */ ++#if defined _WINDOWS ++ #if !defined NVML_STATIC_IMPORT ++ #if defined NVML_LIB_EXPORT ++ #define DECLDIR __declspec(dllexport) ++ #else ++ #define DECLDIR __declspec(dllimport) ++ #endif ++ #else ++ #define DECLDIR ++ #endif ++#else ++ #define DECLDIR ++#endif ++ ++/** ++ * NVML API versioning support ++ */ ++#define NVML_API_VERSION 8 ++#define NVML_API_VERSION_STR "8" ++#define nvmlInit nvmlInit_v2 ++#define nvmlDeviceGetPciInfo nvmlDeviceGetPciInfo_v2 ++#define nvmlDeviceGetCount nvmlDeviceGetCount_v2 ++#define nvmlDeviceGetHandleByIndex nvmlDeviceGetHandleByIndex_v2 ++#define nvmlDeviceGetHandleByPciBusId nvmlDeviceGetHandleByPciBusId_v2 ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlDeviceStructs Device Structs ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Special constant that some fields take when they are not available. ++ * Used when only part of the struct is not available. ++ * ++ * Each structure explicitly states when to check for this value. ++ */ ++#define NVML_VALUE_NOT_AVAILABLE (-1) ++ ++typedef struct nvmlDevice_st* nvmlDevice_t; ++ ++/** ++ * Buffer size guaranteed to be large enough for pci bus id ++ */ ++#define NVML_DEVICE_PCI_BUS_ID_BUFFER_SIZE 16 ++ ++/** ++ * PCI information about a GPU device. ++ */ ++typedef struct nvmlPciInfo_st ++{ ++ char busId[NVML_DEVICE_PCI_BUS_ID_BUFFER_SIZE]; //!< The tuple domain:bus:device.function PCI identifier (& NULL terminator) ++ unsigned int domain; //!< The PCI domain on which the device's bus resides, 0 to 0xffff ++ unsigned int bus; //!< The bus on which the device resides, 0 to 0xff ++ unsigned int device; //!< The device's id on the bus, 0 to 31 ++ unsigned int pciDeviceId; //!< The combined 16-bit device id and 16-bit vendor id ++ ++ // Added in NVML 2.285 API ++ unsigned int pciSubSystemId; //!< The 32-bit Sub System Device ID ++ ++ // NVIDIA reserved for internal use only ++ unsigned int reserved0; ++ unsigned int reserved1; ++ unsigned int reserved2; ++ unsigned int reserved3; ++} nvmlPciInfo_t; ++ ++/** ++ * Detailed ECC error counts for a device. ++ * ++ * @deprecated Different GPU families can have different memory error counters ++ * See \ref nvmlDeviceGetMemoryErrorCounter ++ */ ++typedef struct nvmlEccErrorCounts_st ++{ ++ unsigned long long l1Cache; //!< L1 cache errors ++ unsigned long long l2Cache; //!< L2 cache errors ++ unsigned long long deviceMemory; //!< Device memory errors ++ unsigned long long registerFile; //!< Register file errors ++} nvmlEccErrorCounts_t; ++ ++/** ++ * Utilization information for a device. ++ * Each sample period may be between 1 second and 1/6 second, depending on the product being queried. ++ */ ++typedef struct nvmlUtilization_st ++{ ++ unsigned int gpu; //!< Percent of time over the past sample period during which one or more kernels was executing on the GPU ++ unsigned int memory; //!< Percent of time over the past sample period during which global (device) memory was being read or written ++} nvmlUtilization_t; ++ ++/** ++ * Memory allocation information for a device. ++ */ ++typedef struct nvmlMemory_st ++{ ++ unsigned long long total; //!< Total installed FB memory (in bytes) ++ unsigned long long free; //!< Unallocated FB memory (in bytes) ++ unsigned long long used; //!< Allocated FB memory (in bytes). Note that the driver/GPU always sets aside a small amount of memory for bookkeeping ++} nvmlMemory_t; ++ ++/** ++ * BAR1 Memory allocation Information for a device ++ */ ++typedef struct nvmlBAR1Memory_st ++{ ++ unsigned long long bar1Total; //!< Total BAR1 Memory (in bytes) ++ unsigned long long bar1Free; //!< Unallocated BAR1 Memory (in bytes) ++ unsigned long long bar1Used; //!< Allocated Used Memory (in bytes) ++}nvmlBAR1Memory_t; ++ ++/** ++ * Information about running compute processes on the GPU ++ */ ++typedef struct nvmlProcessInfo_st ++{ ++ unsigned int pid; //!< Process ID ++ unsigned long long usedGpuMemory; //!< Amount of used GPU memory in bytes. ++ //! Under WDDM, \ref NVML_VALUE_NOT_AVAILABLE is always reported ++ //! because Windows KMD manages all the memory and not the NVIDIA driver ++} nvmlProcessInfo_t; ++ ++ ++/** ++ * Enum to represent type of bridge chip ++ */ ++typedef enum nvmlBridgeChipType_enum ++{ ++ NVML_BRIDGE_CHIP_PLX = 0, ++ NVML_BRIDGE_CHIP_BRO4 = 1 ++}nvmlBridgeChipType_t; ++ ++/** ++ * Maximum number of NvLink links supported ++ */ ++#define NVML_NVLINK_MAX_LINKS 4 ++ ++/** ++ * Enum to represent the NvLink utilization counter packet units ++ */ ++typedef enum nvmlNvLinkUtilizationCountUnits_enum ++{ ++ NVML_NVLINK_COUNTER_UNIT_CYCLES = 0, // count by cycles ++ NVML_NVLINK_COUNTER_UNIT_PACKETS = 1, // count by packets ++ NVML_NVLINK_COUNTER_UNIT_BYTES = 2, // count by bytes ++ ++ // this must be last ++ NVML_NVLINK_COUNTER_UNIT_COUNT ++} nvmlNvLinkUtilizationCountUnits_t; ++ ++/** ++ * Enum to represent the NvLink utilization counter packet types to count ++ * ** this is ONLY applicable with the units as packets or bytes ++ * ** as specified in \a nvmlNvLinkUtilizationCountUnits_t ++ * ** all packet filter descriptions are target GPU centric ++ * ** these can be "OR'd" together ++ */ ++typedef enum nvmlNvLinkUtilizationCountPktTypes_enum ++{ ++ NVML_NVLINK_COUNTER_PKTFILTER_NOP = 0x1, // no operation packets ++ NVML_NVLINK_COUNTER_PKTFILTER_READ = 0x2, // read packets ++ NVML_NVLINK_COUNTER_PKTFILTER_WRITE = 0x4, // write packets ++ NVML_NVLINK_COUNTER_PKTFILTER_RATOM = 0x8, // reduction atomic requests ++ NVML_NVLINK_COUNTER_PKTFILTER_NRATOM = 0x10, // non-reduction atomic requests ++ NVML_NVLINK_COUNTER_PKTFILTER_FLUSH = 0x20, // flush requests ++ NVML_NVLINK_COUNTER_PKTFILTER_RESPDATA = 0x40, // responses with data ++ NVML_NVLINK_COUNTER_PKTFILTER_RESPNODATA = 0x80, // responses without data ++ NVML_NVLINK_COUNTER_PKTFILTER_ALL = 0xFF // all packets ++} nvmlNvLinkUtilizationCountPktTypes_t; ++ ++/** ++ * Struct to define the NVLINK counter controls ++ */ ++typedef struct nvmlNvLinkUtilizationControl_st ++{ ++ nvmlNvLinkUtilizationCountUnits_t units; ++ nvmlNvLinkUtilizationCountPktTypes_t pktfilter; ++} nvmlNvLinkUtilizationControl_t; ++ ++/** ++ * Enum to represent NvLink queryable capabilities ++ */ ++typedef enum nvmlNvLinkCapability_enum ++{ ++ NVML_NVLINK_CAP_P2P_SUPPORTED = 0, // P2P over NVLink is supported ++ NVML_NVLINK_CAP_SYSMEM_ACCESS = 1, // Access to system memory is supported ++ NVML_NVLINK_CAP_P2P_ATOMICS = 2, // P2P atomics are supported ++ NVML_NVLINK_CAP_SYSMEM_ATOMICS= 3, // System memory atomics are supported ++ NVML_NVLINK_CAP_SLI_BRIDGE = 4, // SLI is supported over this link ++ NVML_NVLINK_CAP_VALID = 5, // Link is supported on this device ++ // should be last ++ NVML_NVLINK_CAP_COUNT ++} nvmlNvLinkCapability_t; ++ ++/** ++ * Enum to represent NvLink queryable error counters ++ */ ++typedef enum nvmlNvLinkErrorCounter_enum ++{ ++ NVML_NVLINK_ERROR_DL_REPLAY = 0, // Data link transmit replay error counter ++ NVML_NVLINK_ERROR_DL_RECOVERY = 1, // Data link transmit recovery error counter ++ NVML_NVLINK_ERROR_DL_CRC_FLIT = 2, // Data link receive flow control digit CRC error counter ++ NVML_NVLINK_ERROR_DL_CRC_DATA = 3, // Data link receive data CRC error counter ++ ++ // this must be last ++ NVML_NVLINK_ERROR_COUNT ++} nvmlNvLinkErrorCounter_t; ++ ++/** ++ * Represents level relationships within a system between two GPUs ++ * The enums are spaced to allow for future relationships ++ */ ++typedef enum nvmlGpuLevel_enum ++{ ++ NVML_TOPOLOGY_INTERNAL = 0, // e.g. Tesla K80 ++ NVML_TOPOLOGY_SINGLE = 10, // all devices that only need traverse a single PCIe switch ++ NVML_TOPOLOGY_MULTIPLE = 20, // all devices that need not traverse a host bridge ++ NVML_TOPOLOGY_HOSTBRIDGE = 30, // all devices that are connected to the same host bridge ++ NVML_TOPOLOGY_CPU = 40, // all devices that are connected to the same CPU but possibly multiple host bridges ++ NVML_TOPOLOGY_SYSTEM = 50, // all devices in the system ++ ++ // there is purposefully no COUNT here because of the need for spacing above ++} nvmlGpuTopologyLevel_t; ++ ++/* P2P Capability Index Status*/ ++typedef enum nvmlGpuP2PStatus_enum ++{ ++ NVML_P2P_STATUS_OK = 0, ++ NVML_P2P_STATUS_CHIPSET_NOT_SUPPORED, ++ NVML_P2P_STATUS_GPU_NOT_SUPPORTED, ++ NVML_P2P_STATUS_IOH_TOPOLOGY_NOT_SUPPORTED, ++ NVML_P2P_STATUS_DISABLED_BY_REGKEY, ++ NVML_P2P_STATUS_NOT_SUPPORTED, ++ NVML_P2P_STATUS_UNKNOWN ++ ++} nvmlGpuP2PStatus_t; ++ ++/* P2P Capability Index*/ ++typedef enum nvmlGpuP2PCapsIndex_enum ++{ ++ NVML_P2P_CAPS_INDEX_READ = 0, ++ NVML_P2P_CAPS_INDEX_WRITE, ++ NVML_P2P_CAPS_INDEX_NVLINK, ++ NVML_P2P_CAPS_INDEX_ATOMICS, ++ NVML_P2P_CAPS_INDEX_PROP, ++ NVML_P2P_CAPS_INDEX_UNKNOWN ++}nvmlGpuP2PCapsIndex_t; ++ ++/** ++ * Maximum limit on Physical Bridges per Board ++ */ ++#define NVML_MAX_PHYSICAL_BRIDGE (128) ++ ++/** ++ * Information about the Bridge Chip Firmware ++ */ ++typedef struct nvmlBridgeChipInfo_st ++{ ++ nvmlBridgeChipType_t type; //!< Type of Bridge Chip ++ unsigned int fwVersion; //!< Firmware Version. 0=Version is unavailable ++}nvmlBridgeChipInfo_t; ++ ++/** ++ * This structure stores the complete Hierarchy of the Bridge Chip within the board. The immediate ++ * bridge is stored at index 0 of bridgeInfoList, parent to immediate bridge is at index 1 and so forth. ++ */ ++typedef struct nvmlBridgeChipHierarchy_st ++{ ++ unsigned char bridgeCount; //!< Number of Bridge Chips on the Board ++ nvmlBridgeChipInfo_t bridgeChipInfo[NVML_MAX_PHYSICAL_BRIDGE]; //!< Hierarchy of Bridge Chips on the board ++}nvmlBridgeChipHierarchy_t; ++ ++/** ++ * Represents Type of Sampling Event ++ */ ++typedef enum nvmlSamplingType_enum ++{ ++ NVML_TOTAL_POWER_SAMPLES = 0, //!< To represent total power drawn by GPU ++ NVML_GPU_UTILIZATION_SAMPLES = 1, //!< To represent percent of time during which one or more kernels was executing on the GPU ++ NVML_MEMORY_UTILIZATION_SAMPLES = 2, //!< To represent percent of time during which global (device) memory was being read or written ++ NVML_ENC_UTILIZATION_SAMPLES = 3, //!< To represent percent of time during which NVENC remains busy ++ NVML_DEC_UTILIZATION_SAMPLES = 4, //!< To represent percent of time during which NVDEC remains busy ++ NVML_PROCESSOR_CLK_SAMPLES = 5, //!< To represent processor clock samples ++ NVML_MEMORY_CLK_SAMPLES = 6, //!< To represent memory clock samples ++ ++ // Keep this last ++ NVML_SAMPLINGTYPE_COUNT ++}nvmlSamplingType_t; ++ ++/** ++ * Represents the queryable PCIe utilization counters ++ */ ++typedef enum nvmlPcieUtilCounter_enum ++{ ++ NVML_PCIE_UTIL_TX_BYTES = 0, // 1KB granularity ++ NVML_PCIE_UTIL_RX_BYTES = 1, // 1KB granularity ++ ++ // Keep this last ++ NVML_PCIE_UTIL_COUNT ++} nvmlPcieUtilCounter_t; ++ ++/** ++ * Represents the type for sample value returned ++ */ ++typedef enum nvmlValueType_enum ++{ ++ NVML_VALUE_TYPE_DOUBLE = 0, ++ NVML_VALUE_TYPE_UNSIGNED_INT = 1, ++ NVML_VALUE_TYPE_UNSIGNED_LONG = 2, ++ NVML_VALUE_TYPE_UNSIGNED_LONG_LONG = 3, ++ ++ // Keep this last ++ NVML_VALUE_TYPE_COUNT ++}nvmlValueType_t; ++ ++ ++/** ++ * Union to represent different types of Value ++ */ ++typedef union nvmlValue_st ++{ ++ double dVal; //!< If the value is double ++ unsigned int uiVal; //!< If the value is unsigned int ++ unsigned long ulVal; //!< If the value is unsigned long ++ unsigned long long ullVal; //!< If the value is unsigned long long ++}nvmlValue_t; ++ ++/** ++ * Information for Sample ++ */ ++typedef struct nvmlSample_st ++{ ++ unsigned long long timeStamp; //!< CPU Timestamp in microseconds ++ nvmlValue_t sampleValue; //!< Sample Value ++}nvmlSample_t; ++ ++/** ++ * Represents type of perf policy for which violation times can be queried ++ */ ++typedef enum nvmlPerfPolicyType_enum ++{ ++ NVML_PERF_POLICY_POWER = 0, ++ NVML_PERF_POLICY_THERMAL = 1, ++ NVML_PERF_POLICY_SYNC_BOOST = 2, ++ ++ // Keep this last ++ NVML_PERF_POLICY_COUNT ++}nvmlPerfPolicyType_t; ++ ++/** ++ * Struct to hold perf policy violation status data ++ */ ++typedef struct nvmlViolationTime_st ++{ ++ unsigned long long referenceTime; //!< referenceTime represents CPU timestamp in microseconds ++ unsigned long long violationTime; //!< violationTime in Nanoseconds ++}nvmlViolationTime_t; ++ ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlDeviceEnumvs Device Enums ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Generic enable/disable enum. ++ */ ++typedef enum nvmlEnableState_enum ++{ ++ NVML_FEATURE_DISABLED = 0, //!< Feature disabled ++ NVML_FEATURE_ENABLED = 1 //!< Feature enabled ++} nvmlEnableState_t; ++ ++//! Generic flag used to specify the default behavior of some functions. See description of particular functions for details. ++#define nvmlFlagDefault 0x00 ++//! Generic flag used to force some behavior. See description of particular functions for details. ++#define nvmlFlagForce 0x01 ++ ++/** ++ * * The Brand of the GPU ++ * */ ++typedef enum nvmlBrandType_enum ++{ ++ NVML_BRAND_UNKNOWN = 0, ++ NVML_BRAND_QUADRO = 1, ++ NVML_BRAND_TESLA = 2, ++ NVML_BRAND_NVS = 3, ++ NVML_BRAND_GRID = 4, ++ NVML_BRAND_GEFORCE = 5, ++ ++ // Keep this last ++ NVML_BRAND_COUNT ++} nvmlBrandType_t; ++ ++/** ++ * Temperature thresholds. ++ */ ++typedef enum nvmlTemperatureThresholds_enum ++{ ++ NVML_TEMPERATURE_THRESHOLD_SHUTDOWN = 0, // Temperature at which the GPU will shut down ++ // for HW protection ++ NVML_TEMPERATURE_THRESHOLD_SLOWDOWN = 1, // Temperature at which the GPU will begin slowdown ++ // Keep this last ++ NVML_TEMPERATURE_THRESHOLD_COUNT ++} nvmlTemperatureThresholds_t; ++ ++/** ++ * Temperature sensors. ++ */ ++typedef enum nvmlTemperatureSensors_enum ++{ ++ NVML_TEMPERATURE_GPU = 0, //!< Temperature sensor for the GPU die ++ ++ // Keep this last ++ NVML_TEMPERATURE_COUNT ++} nvmlTemperatureSensors_t; ++ ++/** ++ * Compute mode. ++ * ++ * NVML_COMPUTEMODE_EXCLUSIVE_PROCESS was added in CUDA 4.0. ++ * Earlier CUDA versions supported a single exclusive mode, ++ * which is equivalent to NVML_COMPUTEMODE_EXCLUSIVE_THREAD in CUDA 4.0 and beyond. ++ */ ++typedef enum nvmlComputeMode_enum ++{ ++ NVML_COMPUTEMODE_DEFAULT = 0, //!< Default compute mode -- multiple contexts per device ++ NVML_COMPUTEMODE_EXCLUSIVE_THREAD = 1, //!< Support Removed ++ NVML_COMPUTEMODE_PROHIBITED = 2, //!< Compute-prohibited mode -- no contexts per device ++ NVML_COMPUTEMODE_EXCLUSIVE_PROCESS = 3, //!< Compute-exclusive-process mode -- only one context per device, usable from multiple threads at a time ++ ++ // Keep this last ++ NVML_COMPUTEMODE_COUNT ++} nvmlComputeMode_t; ++ ++/** ++ * ECC bit types. ++ * ++ * @deprecated See \ref nvmlMemoryErrorType_t for a more flexible type ++ */ ++#define nvmlEccBitType_t nvmlMemoryErrorType_t ++ ++/** ++ * Single bit ECC errors ++ * ++ * @deprecated Mapped to \ref NVML_MEMORY_ERROR_TYPE_CORRECTED ++ */ ++#define NVML_SINGLE_BIT_ECC NVML_MEMORY_ERROR_TYPE_CORRECTED ++ ++/** ++ * Double bit ECC errors ++ * ++ * @deprecated Mapped to \ref NVML_MEMORY_ERROR_TYPE_UNCORRECTED ++ */ ++#define NVML_DOUBLE_BIT_ECC NVML_MEMORY_ERROR_TYPE_UNCORRECTED ++ ++/** ++ * Memory error types ++ */ ++typedef enum nvmlMemoryErrorType_enum ++{ ++ /** ++ * A memory error that was corrected ++ * ++ * For ECC errors, these are single bit errors ++ * For Texture memory, these are errors fixed by resend ++ */ ++ NVML_MEMORY_ERROR_TYPE_CORRECTED = 0, ++ /** ++ * A memory error that was not corrected ++ * ++ * For ECC errors, these are double bit errors ++ * For Texture memory, these are errors where the resend fails ++ */ ++ NVML_MEMORY_ERROR_TYPE_UNCORRECTED = 1, ++ ++ ++ // Keep this last ++ NVML_MEMORY_ERROR_TYPE_COUNT //!< Count of memory error types ++ ++} nvmlMemoryErrorType_t; ++ ++/** ++ * ECC counter types. ++ * ++ * Note: Volatile counts are reset each time the driver loads. On Windows this is once per boot. On Linux this can be more frequent. ++ * On Linux the driver unloads when no active clients exist. If persistence mode is enabled or there is always a driver ++ * client active (e.g. X11), then Linux also sees per-boot behavior. If not, volatile counts are reset each time a compute app ++ * is run. ++ */ ++typedef enum nvmlEccCounterType_enum ++{ ++ NVML_VOLATILE_ECC = 0, //!< Volatile counts are reset each time the driver loads. ++ NVML_AGGREGATE_ECC = 1, //!< Aggregate counts persist across reboots (i.e. for the lifetime of the device) ++ ++ // Keep this last ++ NVML_ECC_COUNTER_TYPE_COUNT //!< Count of memory counter types ++} nvmlEccCounterType_t; ++ ++/** ++ * Clock types. ++ * ++ * All speeds are in Mhz. ++ */ ++typedef enum nvmlClockType_enum ++{ ++ NVML_CLOCK_GRAPHICS = 0, //!< Graphics clock domain ++ NVML_CLOCK_SM = 1, //!< SM clock domain ++ NVML_CLOCK_MEM = 2, //!< Memory clock domain ++ NVML_CLOCK_VIDEO = 3, //!< Video encoder/decoder clock domain ++ ++ // Keep this last ++ NVML_CLOCK_COUNT //usedGpuMemory is not supported ++ ++ ++ unsigned long long time; //!< Amount of time in ms during which the compute context was active. The time is reported as 0 if ++ //!< the process is not terminated ++ ++ unsigned long long startTime; //!< CPU Timestamp in usec representing start time for the process ++ ++ unsigned int isRunning; //!< Flag to represent if the process is running (1 for running, 0 for terminated) ++ ++ unsigned int reserved[5]; //!< Reserved for future use ++} nvmlAccountingStats_t; ++ ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlInitializationAndCleanup Initialization and Cleanup ++ * This chapter describes the methods that handle NVML initialization and cleanup. ++ * It is the user's responsibility to call \ref nvmlInit() before calling any other methods, and ++ * nvmlShutdown() once NVML is no longer being used. ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Initialize NVML, but don't initialize any GPUs yet. ++ * ++ * \note In NVML 5.319 new nvmlInit_v2 has replaced nvmlInit"_v1" (default in NVML 4.304 and older) that ++ * did initialize all GPU devices in the system. ++ * ++ * This allows NVML to communicate with a GPU ++ * when other GPUs in the system are unstable or in a bad state. When using this API, GPUs are ++ * discovered and initialized in nvmlDeviceGetHandleBy* functions instead. ++ * ++ * \note To contrast nvmlInit_v2 with nvmlInit"_v1", NVML 4.304 nvmlInit"_v1" will fail when any detected GPU is in ++ * a bad or unstable state. ++ * ++ * For all products. ++ * ++ * This method, should be called once before invoking any other methods in the library. ++ * A reference count of the number of initializations is maintained. Shutdown only occurs ++ * when the reference count reaches zero. ++ * ++ * @return ++ * - \ref NVML_SUCCESS if NVML has been properly initialized ++ * - \ref NVML_ERROR_DRIVER_NOT_LOADED if NVIDIA driver is not running ++ * - \ref NVML_ERROR_NO_PERMISSION if NVML does not have permission to talk to the driver ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlInit(void); ++ ++/** ++ * Shut down NVML by releasing all GPU resources previously allocated with \ref nvmlInit(). ++ * ++ * For all products. ++ * ++ * This method should be called after NVML work is done, once for each call to \ref nvmlInit() ++ * A reference count of the number of initializations is maintained. Shutdown only occurs ++ * when the reference count reaches zero. For backwards compatibility, no error is reported if ++ * nvmlShutdown() is called more times than nvmlInit(). ++ * ++ * @return ++ * - \ref NVML_SUCCESS if NVML has been properly shut down ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlShutdown(void); ++ ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlErrorReporting Error reporting ++ * This chapter describes helper functions for error reporting routines. ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Helper method for converting NVML error codes into readable strings. ++ * ++ * For all products. ++ * ++ * @param result NVML error code to convert ++ * ++ * @return String representation of the error. ++ * ++ */ ++const DECLDIR char* nvmlErrorString(nvmlReturn_t result); ++/** @} */ ++ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlConstants Constants ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Buffer size guaranteed to be large enough for \ref nvmlDeviceGetInforomVersion and \ref nvmlDeviceGetInforomImageVersion ++ */ ++#define NVML_DEVICE_INFOROM_VERSION_BUFFER_SIZE 16 ++ ++/** ++ * Buffer size guaranteed to be large enough for \ref nvmlDeviceGetUUID ++ */ ++#define NVML_DEVICE_UUID_BUFFER_SIZE 80 ++ ++/** ++ * Buffer size guaranteed to be large enough for \ref nvmlDeviceGetBoardPartNumber ++ */ ++#define NVML_DEVICE_PART_NUMBER_BUFFER_SIZE 80 ++ ++/** ++ * Buffer size guaranteed to be large enough for \ref nvmlSystemGetDriverVersion ++ */ ++#define NVML_SYSTEM_DRIVER_VERSION_BUFFER_SIZE 80 ++ ++/** ++ * Buffer size guaranteed to be large enough for \ref nvmlSystemGetNVMLVersion ++ */ ++#define NVML_SYSTEM_NVML_VERSION_BUFFER_SIZE 80 ++ ++/** ++ * Buffer size guaranteed to be large enough for \ref nvmlDeviceGetName ++ */ ++#define NVML_DEVICE_NAME_BUFFER_SIZE 64 ++ ++/** ++ * Buffer size guaranteed to be large enough for \ref nvmlDeviceGetSerial ++ */ ++#define NVML_DEVICE_SERIAL_BUFFER_SIZE 30 ++ ++/** ++ * Buffer size guaranteed to be large enough for \ref nvmlDeviceGetVbiosVersion ++ */ ++#define NVML_DEVICE_VBIOS_VERSION_BUFFER_SIZE 32 ++ ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlSystemQueries System Queries ++ * This chapter describes the queries that NVML can perform against the local system. These queries ++ * are not device-specific. ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Retrieves the version of the system's graphics driver. ++ * ++ * For all products. ++ * ++ * The version identifier is an alphanumeric string. It will not exceed 80 characters in length ++ * (including the NULL terminator). See \ref nvmlConstants::NVML_SYSTEM_DRIVER_VERSION_BUFFER_SIZE. ++ * ++ * @param version Reference in which to return the version identifier ++ * @param length The maximum allowed length of the string returned in \a version ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a version has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a version is NULL ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ */ ++nvmlReturn_t DECLDIR nvmlSystemGetDriverVersion(char *version, unsigned int length); ++ ++/** ++ * Retrieves the version of the NVML library. ++ * ++ * For all products. ++ * ++ * The version identifier is an alphanumeric string. It will not exceed 80 characters in length ++ * (including the NULL terminator). See \ref nvmlConstants::NVML_SYSTEM_NVML_VERSION_BUFFER_SIZE. ++ * ++ * @param version Reference in which to return the version identifier ++ * @param length The maximum allowed length of the string returned in \a version ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a version has been set ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a version is NULL ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ */ ++nvmlReturn_t DECLDIR nvmlSystemGetNVMLVersion(char *version, unsigned int length); ++ ++/** ++ * Gets name of the process with provided process id ++ * ++ * For all products. ++ * ++ * Returned process name is cropped to provided length. ++ * name string is encoded in ANSI. ++ * ++ * @param pid The identifier of the process ++ * @param name Reference in which to return the process name ++ * @param length The maximum allowed length of the string returned in \a name ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a name has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a name is NULL or \a length is 0. ++ * - \ref NVML_ERROR_NOT_FOUND if process doesn't exists ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlSystemGetProcessName(unsigned int pid, char *name, unsigned int length); ++ ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlUnitQueries Unit Queries ++ * This chapter describes that queries that NVML can perform against each unit. For S-class systems only. ++ * In each case the device is identified with an nvmlUnit_t handle. This handle is obtained by ++ * calling \ref nvmlUnitGetHandleByIndex(). ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++ /** ++ * Retrieves the number of units in the system. ++ * ++ * For S-class products. ++ * ++ * @param unitCount Reference in which to return the number of units ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a unitCount has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unitCount is NULL ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlUnitGetCount(unsigned int *unitCount); ++ ++/** ++ * Acquire the handle for a particular unit, based on its index. ++ * ++ * For S-class products. ++ * ++ * Valid indices are derived from the \a unitCount returned by \ref nvmlUnitGetCount(). ++ * For example, if \a unitCount is 2 the valid indices are 0 and 1, corresponding to UNIT 0 and UNIT 1. ++ * ++ * The order in which NVML enumerates units has no guarantees of consistency between reboots. ++ * ++ * @param index The index of the target unit, >= 0 and < \a unitCount ++ * @param unit Reference in which to return the unit handle ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a unit has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a index is invalid or \a unit is NULL ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlUnitGetHandleByIndex(unsigned int index, nvmlUnit_t *unit); ++ ++/** ++ * Retrieves the static information associated with a unit. ++ * ++ * For S-class products. ++ * ++ * See \ref nvmlUnitInfo_t for details on available unit info. ++ * ++ * @param unit The identifier of the target unit ++ * @param info Reference in which to return the unit information ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a info has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit is invalid or \a info is NULL ++ */ ++nvmlReturn_t DECLDIR nvmlUnitGetUnitInfo(nvmlUnit_t unit, nvmlUnitInfo_t *info); ++ ++/** ++ * Retrieves the LED state associated with this unit. ++ * ++ * For S-class products. ++ * ++ * See \ref nvmlLedState_t for details on allowed states. ++ * ++ * @param unit The identifier of the target unit ++ * @param state Reference in which to return the current LED state ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a state has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit is invalid or \a state is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this is not an S-class product ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlUnitSetLedState() ++ */ ++nvmlReturn_t DECLDIR nvmlUnitGetLedState(nvmlUnit_t unit, nvmlLedState_t *state); ++ ++/** ++ * Retrieves the PSU stats for the unit. ++ * ++ * For S-class products. ++ * ++ * See \ref nvmlPSUInfo_t for details on available PSU info. ++ * ++ * @param unit The identifier of the target unit ++ * @param psu Reference in which to return the PSU information ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a psu has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit is invalid or \a psu is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this is not an S-class product ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlUnitGetPsuInfo(nvmlUnit_t unit, nvmlPSUInfo_t *psu); ++ ++/** ++ * Retrieves the temperature readings for the unit, in degrees C. ++ * ++ * For S-class products. ++ * ++ * Depending on the product, readings may be available for intake (type=0), ++ * exhaust (type=1) and board (type=2). ++ * ++ * @param unit The identifier of the target unit ++ * @param type The type of reading to take ++ * @param temp Reference in which to return the intake temperature ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a temp has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit or \a type is invalid or \a temp is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this is not an S-class product ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlUnitGetTemperature(nvmlUnit_t unit, unsigned int type, unsigned int *temp); ++ ++/** ++ * Retrieves the fan speed readings for the unit. ++ * ++ * For S-class products. ++ * ++ * See \ref nvmlUnitFanSpeeds_t for details on available fan speed info. ++ * ++ * @param unit The identifier of the target unit ++ * @param fanSpeeds Reference in which to return the fan speed information ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a fanSpeeds has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit is invalid or \a fanSpeeds is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this is not an S-class product ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlUnitGetFanSpeedInfo(nvmlUnit_t unit, nvmlUnitFanSpeeds_t *fanSpeeds); ++ ++/** ++ * Retrieves the set of GPU devices that are attached to the specified unit. ++ * ++ * For S-class products. ++ * ++ * The \a deviceCount argument is expected to be set to the size of the input \a devices array. ++ * ++ * @param unit The identifier of the target unit ++ * @param deviceCount Reference in which to provide the \a devices array size, and ++ * to return the number of attached GPU devices ++ * @param devices Reference in which to return the references to the attached GPU devices ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a deviceCount and \a devices have been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a deviceCount indicates that the \a devices array is too small ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit is invalid, either of \a deviceCount or \a devices is NULL ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlUnitGetDevices(nvmlUnit_t unit, unsigned int *deviceCount, nvmlDevice_t *devices); ++ ++/** ++ * Retrieves the IDs and firmware versions for any Host Interface Cards (HICs) in the system. ++ * ++ * For S-class products. ++ * ++ * The \a hwbcCount argument is expected to be set to the size of the input \a hwbcEntries array. ++ * The HIC must be connected to an S-class system for it to be reported by this function. ++ * ++ * @param hwbcCount Size of hwbcEntries array ++ * @param hwbcEntries Array holding information about hwbc ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a hwbcCount and \a hwbcEntries have been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if either \a hwbcCount or \a hwbcEntries is NULL ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a hwbcCount indicates that the \a hwbcEntries array is too small ++ */ ++nvmlReturn_t DECLDIR nvmlSystemGetHicVersion(unsigned int *hwbcCount, nvmlHwbcEntry_t *hwbcEntries); ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlDeviceQueries Device Queries ++ * This chapter describes that queries that NVML can perform against each device. ++ * In each case the device is identified with an nvmlDevice_t handle. This handle is obtained by ++ * calling one of \ref nvmlDeviceGetHandleByIndex(), \ref nvmlDeviceGetHandleBySerial(), ++ * \ref nvmlDeviceGetHandleByPciBusId(). or \ref nvmlDeviceGetHandleByUUID(). ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++ /** ++ * Retrieves the number of compute devices in the system. A compute device is a single GPU. ++ * ++ * For all products. ++ * ++ * Note: New nvmlDeviceGetCount_v2 (default in NVML 5.319) returns count of all devices in the system ++ * even if nvmlDeviceGetHandleByIndex_v2 returns NVML_ERROR_NO_PERMISSION for such device. ++ * Update your code to handle this error, or use NVML 4.304 or older nvml header file. ++ * For backward binary compatibility reasons _v1 version of the API is still present in the shared ++ * library. ++ * Old _v1 version of nvmlDeviceGetCount doesn't count devices that NVML has no permission to talk to. ++ * ++ * @param deviceCount Reference in which to return the number of accessible devices ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a deviceCount has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a deviceCount is NULL ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetCount(unsigned int *deviceCount); ++ ++/** ++ * Acquire the handle for a particular device, based on its index. ++ * ++ * For all products. ++ * ++ * Valid indices are derived from the \a accessibleDevices count returned by ++ * \ref nvmlDeviceGetCount(). For example, if \a accessibleDevices is 2 the valid indices ++ * are 0 and 1, corresponding to GPU 0 and GPU 1. ++ * ++ * The order in which NVML enumerates devices has no guarantees of consistency between reboots. For that reason it ++ * is recommended that devices be looked up by their PCI ids or UUID. See ++ * \ref nvmlDeviceGetHandleByUUID() and \ref nvmlDeviceGetHandleByPciBusId(). ++ * ++ * Note: The NVML index may not correlate with other APIs, such as the CUDA device index. ++ * ++ * Starting from NVML 5, this API causes NVML to initialize the target GPU ++ * NVML may initialize additional GPUs if: ++ * - The target GPU is an SLI slave ++ * ++ * Note: New nvmlDeviceGetCount_v2 (default in NVML 5.319) returns count of all devices in the system ++ * even if nvmlDeviceGetHandleByIndex_v2 returns NVML_ERROR_NO_PERMISSION for such device. ++ * Update your code to handle this error, or use NVML 4.304 or older nvml header file. ++ * For backward binary compatibility reasons _v1 version of the API is still present in the shared ++ * library. ++ * Old _v1 version of nvmlDeviceGetCount doesn't count devices that NVML has no permission to talk to. ++ * ++ * This means that nvmlDeviceGetHandleByIndex_v2 and _v1 can return different devices for the same index. ++ * If you don't touch macros that map old (_v1) versions to _v2 versions at the top of the file you don't ++ * need to worry about that. ++ * ++ * @param index The index of the target GPU, >= 0 and < \a accessibleDevices ++ * @param device Reference in which to return the device handle ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a device has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a index is invalid or \a device is NULL ++ * - \ref NVML_ERROR_INSUFFICIENT_POWER if any attached devices have improperly attached external power cables ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to talk to this device ++ * - \ref NVML_ERROR_IRQ_ISSUE if NVIDIA kernel detected an interrupt issue with the attached GPUs ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetIndex ++ * @see nvmlDeviceGetCount ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetHandleByIndex(unsigned int index, nvmlDevice_t *device); ++ ++/** ++ * Acquire the handle for a particular device, based on its board serial number. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * This number corresponds to the value printed directly on the board, and to the value returned by ++ * \ref nvmlDeviceGetSerial(). ++ * ++ * @deprecated Since more than one GPU can exist on a single board this function is deprecated in favor ++ * of \ref nvmlDeviceGetHandleByUUID. ++ * For dual GPU boards this function will return NVML_ERROR_INVALID_ARGUMENT. ++ * ++ * Starting from NVML 5, this API causes NVML to initialize the target GPU ++ * NVML may initialize additional GPUs as it searches for the target GPU ++ * ++ * @param serial The board serial number of the target GPU ++ * @param device Reference in which to return the device handle ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a device has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a serial is invalid, \a device is NULL or more than one ++ * device has the same serial (dual GPU boards) ++ * - \ref NVML_ERROR_NOT_FOUND if \a serial does not match a valid device on the system ++ * - \ref NVML_ERROR_INSUFFICIENT_POWER if any attached devices have improperly attached external power cables ++ * - \ref NVML_ERROR_IRQ_ISSUE if NVIDIA kernel detected an interrupt issue with the attached GPUs ++ * - \ref NVML_ERROR_GPU_IS_LOST if any GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetSerial ++ * @see nvmlDeviceGetHandleByUUID ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetHandleBySerial(const char *serial, nvmlDevice_t *device); ++ ++/** ++ * Acquire the handle for a particular device, based on its globally unique immutable UUID associated with each device. ++ * ++ * For all products. ++ * ++ * @param uuid The UUID of the target GPU ++ * @param device Reference in which to return the device handle ++ * ++ * Starting from NVML 5, this API causes NVML to initialize the target GPU ++ * NVML may initialize additional GPUs as it searches for the target GPU ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a device has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a uuid is invalid or \a device is null ++ * - \ref NVML_ERROR_NOT_FOUND if \a uuid does not match a valid device on the system ++ * - \ref NVML_ERROR_INSUFFICIENT_POWER if any attached devices have improperly attached external power cables ++ * - \ref NVML_ERROR_IRQ_ISSUE if NVIDIA kernel detected an interrupt issue with the attached GPUs ++ * - \ref NVML_ERROR_GPU_IS_LOST if any GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetUUID ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetHandleByUUID(const char *uuid, nvmlDevice_t *device); ++ ++/** ++ * Acquire the handle for a particular device, based on its PCI bus id. ++ * ++ * For all products. ++ * ++ * This value corresponds to the nvmlPciInfo_t::busId returned by \ref nvmlDeviceGetPciInfo(). ++ * ++ * Starting from NVML 5, this API causes NVML to initialize the target GPU ++ * NVML may initialize additional GPUs if: ++ * - The target GPU is an SLI slave ++ * ++ * \note NVML 4.304 and older version of nvmlDeviceGetHandleByPciBusId"_v1" returns NVML_ERROR_NOT_FOUND ++ * instead of NVML_ERROR_NO_PERMISSION. ++ * ++ * @param pciBusId The PCI bus id of the target GPU ++ * @param device Reference in which to return the device handle ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a device has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a pciBusId is invalid or \a device is NULL ++ * - \ref NVML_ERROR_NOT_FOUND if \a pciBusId does not match a valid device on the system ++ * - \ref NVML_ERROR_INSUFFICIENT_POWER if the attached device has improperly attached external power cables ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to talk to this device ++ * - \ref NVML_ERROR_IRQ_ISSUE if NVIDIA kernel detected an interrupt issue with the attached GPUs ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetHandleByPciBusId(const char *pciBusId, nvmlDevice_t *device); ++ ++/** ++ * Retrieves the name of this device. ++ * ++ * For all products. ++ * ++ * The name is an alphanumeric string that denotes a particular product, e.g. Tesla &tm; C2070. It will not ++ * exceed 64 characters in length (including the NULL terminator). See \ref ++ * nvmlConstants::NVML_DEVICE_NAME_BUFFER_SIZE. ++ * ++ * @param device The identifier of the target device ++ * @param name Reference in which to return the product name ++ * @param length The maximum allowed length of the string returned in \a name ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a name has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a name is NULL ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetName(nvmlDevice_t device, char *name, unsigned int length); ++ ++/** ++ * Retrieves the brand of this device. ++ * ++ * For all products. ++ * ++ * The type is a member of \ref nvmlBrandType_t defined above. ++ * ++ * @param device The identifier of the target device ++ * @param type Reference in which to return the product brand type ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a name has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a type is NULL ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetBrand(nvmlDevice_t device, nvmlBrandType_t *type); ++ ++/** ++ * Retrieves the NVML index of this device. ++ * ++ * For all products. ++ * ++ * Valid indices are derived from the \a accessibleDevices count returned by ++ * \ref nvmlDeviceGetCount(). For example, if \a accessibleDevices is 2 the valid indices ++ * are 0 and 1, corresponding to GPU 0 and GPU 1. ++ * ++ * The order in which NVML enumerates devices has no guarantees of consistency between reboots. For that reason it ++ * is recommended that devices be looked up by their PCI ids or GPU UUID. See ++ * \ref nvmlDeviceGetHandleByPciBusId() and \ref nvmlDeviceGetHandleByUUID(). ++ * ++ * Note: The NVML index may not correlate with other APIs, such as the CUDA device index. ++ * ++ * @param device The identifier of the target device ++ * @param index Reference in which to return the NVML index of the device ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a index has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a index is NULL ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetHandleByIndex() ++ * @see nvmlDeviceGetCount() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetIndex(nvmlDevice_t device, unsigned int *index); ++ ++/** ++ * Retrieves the globally unique board serial number associated with this device's board. ++ * ++ * For all products with an inforom. ++ * ++ * The serial number is an alphanumeric string that will not exceed 30 characters (including the NULL terminator). ++ * This number matches the serial number tag that is physically attached to the board. See \ref ++ * nvmlConstants::NVML_DEVICE_SERIAL_BUFFER_SIZE. ++ * ++ * @param device The identifier of the target device ++ * @param serial Reference in which to return the board/module serial number ++ * @param length The maximum allowed length of the string returned in \a serial ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a serial has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a serial is NULL ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetSerial(nvmlDevice_t device, char *serial, unsigned int length); ++ ++/** ++ * Retrieves an array of unsigned ints (sized to cpuSetSize) of bitmasks with the ideal CPU affinity for the device ++ * For example, if processors 0, 1, 32, and 33 are ideal for the device and cpuSetSize == 2, ++ * result[0] = 0x3, result[1] = 0x3 ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * Supported on Linux only. ++ * ++ * @param device The identifier of the target device ++ * @param cpuSetSize The size of the cpuSet array that is safe to access ++ * @param cpuSet Array reference in which to return a bitmask of CPUs, 64 CPUs per ++ * unsigned long on 64-bit machines, 32 on 32-bit machines ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a cpuAffinity has been filled ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, cpuSetSize == 0, or cpuSet is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetCpuAffinity(nvmlDevice_t device, unsigned int cpuSetSize, unsigned long *cpuSet); ++ ++/** ++ * Sets the ideal affinity for the calling thread and device using the guidelines ++ * given in nvmlDeviceGetCpuAffinity(). Note, this is a change as of version 8.0. ++ * Older versions set the affinity for a calling process and all children. ++ * Currently supports up to 64 processors. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * Supported on Linux only. ++ * ++ * @param device The identifier of the target device ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the calling process has been successfully bound ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetCpuAffinity(nvmlDevice_t device); ++ ++/** ++ * Clear all affinity bindings for the calling thread. Note, this is a change as of version ++ * 8.0 as older versions cleared the affinity for a calling process and all children. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * Supported on Linux only. ++ * ++ * @param device The identifier of the target device ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the calling process has been successfully unbound ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceClearCpuAffinity(nvmlDevice_t device); ++ ++/** ++ * Retrieve the common ancestor for two devices ++ * For all products. ++ * Supported on Linux only. ++ * ++ * @param device1 The identifier of the first device ++ * @param device2 The identifier of the second device ++ * @param pathInfo A \ref nvmlGpuTopologyLevel_t that gives the path type ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a pathInfo has been set ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device1, or \a device2 is invalid, or \a pathInfo is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device or OS does not support this feature ++ * - \ref NVML_ERROR_UNKNOWN an error has occurred in underlying topology discovery ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetTopologyCommonAncestor(nvmlDevice_t device1, nvmlDevice_t device2, nvmlGpuTopologyLevel_t *pathInfo); ++ ++/** ++ * Retrieve the set of GPUs that are nearest to a given device at a specific interconnectivity level ++ * For all products. ++ * Supported on Linux only. ++ * ++ * @param device The identifier of the first device ++ * @param level The \ref nvmlGpuTopologyLevel_t level to search for other GPUs ++ * @param count When zero, is set to the number of matching GPUs such that \a deviceArray ++ * can be malloc'd. When non-zero, \a deviceArray will be filled with \a count ++ * number of device handles. ++ * @param deviceArray An array of device handles for GPUs found at \a level ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a deviceArray or \a count (if initially zero) has been set ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a level, or \a count is invalid, or \a deviceArray is NULL with a non-zero \a count ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device or OS does not support this feature ++ * - \ref NVML_ERROR_UNKNOWN an error has occurred in underlying topology discovery ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetTopologyNearestGpus(nvmlDevice_t device, nvmlGpuTopologyLevel_t level, unsigned int *count, nvmlDevice_t *deviceArray); ++ ++/** ++ * Retrieve the set of GPUs that have a CPU affinity with the given CPU number ++ * For all products. ++ * Supported on Linux only. ++ * ++ * @param cpuNumber The CPU number ++ * @param count When zero, is set to the number of matching GPUs such that \a deviceArray ++ * can be malloc'd. When non-zero, \a deviceArray will be filled with \a count ++ * number of device handles. ++ * @param deviceArray An array of device handles for GPUs found with affinity to \a cpuNumber ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a deviceArray or \a count (if initially zero) has been set ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a cpuNumber, or \a count is invalid, or \a deviceArray is NULL with a non-zero \a count ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device or OS does not support this feature ++ * - \ref NVML_ERROR_UNKNOWN an error has occurred in underlying topology discovery ++ */ ++nvmlReturn_t DECLDIR nvmlSystemGetTopologyGpuSet(unsigned int cpuNumber, unsigned int *count, nvmlDevice_t *deviceArray); ++ ++/** ++ * Retrieve the status for a given p2p capability index between a given pair of GPU ++ * ++ * @param device1 The first device ++ * @param device2 The second device ++ * @param p2pIndex p2p Capability Index being looked for between \a device1 and \a device2 ++ * @param p2pStatus Reference in which to return the status of the \a p2pIndex ++ * between \a device1 and \a device2 ++ * @return ++ * - \ref NVML_SUCCESS if \a p2pStatus has been populated ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device1 or \a device2 or \a p2pIndex is invalid or \a p2pStatus is NULL ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetP2PStatus(nvmlDevice_t device1, nvmlDevice_t device2, nvmlGpuP2PCapsIndex_t p2pIndex,nvmlGpuP2PStatus_t *p2pStatus); ++ ++ ++/** ++ * Retrieves the globally unique immutable UUID associated with this device, as a 5 part hexadecimal string, ++ * that augments the immutable, board serial identifier. ++ * ++ * For all products. ++ * ++ * The UUID is a globally unique identifier. It is the only available identifier for pre-Fermi-architecture products. ++ * It does NOT correspond to any identifier printed on the board. It will not exceed 80 characters in length ++ * (including the NULL terminator). See \ref nvmlConstants::NVML_DEVICE_UUID_BUFFER_SIZE. ++ * ++ * @param device The identifier of the target device ++ * @param uuid Reference in which to return the GPU UUID ++ * @param length The maximum allowed length of the string returned in \a uuid ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a uuid has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a uuid is NULL ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetUUID(nvmlDevice_t device, char *uuid, unsigned int length); ++ ++/** ++ * Retrieves minor number for the device. The minor number for the device is such that the Nvidia device node file for ++ * each GPU will have the form /dev/nvidia[minor number]. ++ * ++ * For all products. ++ * Supported only for Linux ++ * ++ * @param device The identifier of the target device ++ * @param minorNumber Reference in which to return the minor number for the device ++ * @return ++ * - \ref NVML_SUCCESS if the minor number is successfully retrieved ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a minorNumber is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetMinorNumber(nvmlDevice_t device, unsigned int *minorNumber); ++ ++/** ++ * Retrieves the the device board part number which is programmed into the board's InfoROM ++ * ++ * For all products. ++ * ++ * @param device Identifier of the target device ++ * @param partNumber Reference to the buffer to return ++ * @param length Length of the buffer reference ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a partNumber has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the needed VBIOS fields have not been filled ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a serial is NULL ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetBoardPartNumber(nvmlDevice_t device, char* partNumber, unsigned int length); ++ ++/** ++ * Retrieves the version information for the device's infoROM object. ++ * ++ * For all products with an inforom. ++ * ++ * Fermi and higher parts have non-volatile on-board memory for persisting device info, such as aggregate ++ * ECC counts. The version of the data structures in this memory may change from time to time. It will not ++ * exceed 16 characters in length (including the NULL terminator). ++ * See \ref nvmlConstants::NVML_DEVICE_INFOROM_VERSION_BUFFER_SIZE. ++ * ++ * See \ref nvmlInforomObject_t for details on the available infoROM objects. ++ * ++ * @param device The identifier of the target device ++ * @param object The target infoROM object ++ * @param version Reference in which to return the infoROM version ++ * @param length The maximum allowed length of the string returned in \a version ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a version has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a version is NULL ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not have an infoROM ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetInforomImageVersion ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetInforomVersion(nvmlDevice_t device, nvmlInforomObject_t object, char *version, unsigned int length); ++ ++/** ++ * Retrieves the global infoROM image version ++ * ++ * For all products with an inforom. ++ * ++ * Image version just like VBIOS version uniquely describes the exact version of the infoROM flashed on the board ++ * in contrast to infoROM object version which is only an indicator of supported features. ++ * Version string will not exceed 16 characters in length (including the NULL terminator). ++ * See \ref nvmlConstants::NVML_DEVICE_INFOROM_VERSION_BUFFER_SIZE. ++ * ++ * @param device The identifier of the target device ++ * @param version Reference in which to return the infoROM image version ++ * @param length The maximum allowed length of the string returned in \a version ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a version has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a version is NULL ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not have an infoROM ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetInforomVersion ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetInforomImageVersion(nvmlDevice_t device, char *version, unsigned int length); ++ ++/** ++ * Retrieves the checksum of the configuration stored in the device's infoROM. ++ * ++ * For all products with an inforom. ++ * ++ * Can be used to make sure that two GPUs have the exact same configuration. ++ * Current checksum takes into account configuration stored in PWR and ECC infoROM objects. ++ * Checksum can change between driver releases or when user changes configuration (e.g. disable/enable ECC) ++ * ++ * @param device The identifier of the target device ++ * @param checksum Reference in which to return the infoROM configuration checksum ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a checksum has been set ++ * - \ref NVML_ERROR_CORRUPTED_INFOROM if the device's checksum couldn't be retrieved due to infoROM corruption ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a checksum is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetInforomConfigurationChecksum(nvmlDevice_t device, unsigned int *checksum); ++ ++/** ++ * Reads the infoROM from the flash and verifies the checksums. ++ * ++ * For all products with an inforom. ++ * ++ * @param device The identifier of the target device ++ * ++ * @return ++ * - \ref NVML_SUCCESS if infoROM is not corrupted ++ * - \ref NVML_ERROR_CORRUPTED_INFOROM if the device's infoROM is corrupted ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceValidateInforom(nvmlDevice_t device); ++ ++/** ++ * Retrieves the display mode for the device. ++ * ++ * For all products. ++ * ++ * This method indicates whether a physical display (e.g. monitor) is currently connected to ++ * any of the device's connectors. ++ * ++ * See \ref nvmlEnableState_t for details on allowed modes. ++ * ++ * @param device The identifier of the target device ++ * @param display Reference in which to return the display mode ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a display has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a display is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetDisplayMode(nvmlDevice_t device, nvmlEnableState_t *display); ++ ++/** ++ * Retrieves the display active state for the device. ++ * ++ * For all products. ++ * ++ * This method indicates whether a display is initialized on the device. ++ * For example whether X Server is attached to this device and has allocated memory for the screen. ++ * ++ * Display can be active even when no monitor is physically attached. ++ * ++ * See \ref nvmlEnableState_t for details on allowed modes. ++ * ++ * @param device The identifier of the target device ++ * @param isActive Reference in which to return the display active state ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a isActive has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a isActive is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetDisplayActive(nvmlDevice_t device, nvmlEnableState_t *isActive); ++ ++/** ++ * Retrieves the persistence mode associated with this device. ++ * ++ * For all products. ++ * For Linux only. ++ * ++ * When driver persistence mode is enabled the driver software state is not torn down when the last ++ * client disconnects. By default this feature is disabled. ++ * ++ * See \ref nvmlEnableState_t for details on allowed modes. ++ * ++ * @param device The identifier of the target device ++ * @param mode Reference in which to return the current driver persistence mode ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a mode has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceSetPersistenceMode() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPersistenceMode(nvmlDevice_t device, nvmlEnableState_t *mode); ++ ++/** ++ * Retrieves the PCI attributes of this device. ++ * ++ * For all products. ++ * ++ * See \ref nvmlPciInfo_t for details on the available PCI info. ++ * ++ * @param device The identifier of the target device ++ * @param pci Reference in which to return the PCI info ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a pci has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a pci is NULL ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPciInfo(nvmlDevice_t device, nvmlPciInfo_t *pci); ++ ++/** ++ * Retrieves the maximum PCIe link generation possible with this device and system ++ * ++ * I.E. for a generation 2 PCIe device attached to a generation 1 PCIe bus the max link generation this function will ++ * report is generation 1. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param maxLinkGen Reference in which to return the max PCIe link generation ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a maxLinkGen has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a maxLinkGen is null ++ * - \ref NVML_ERROR_NOT_SUPPORTED if PCIe link information is not available ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetMaxPcieLinkGeneration(nvmlDevice_t device, unsigned int *maxLinkGen); ++ ++/** ++ * Retrieves the maximum PCIe link width possible with this device and system ++ * ++ * I.E. for a device with a 16x PCIe bus width attached to a 8x PCIe system bus this function will report ++ * a max link width of 8. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param maxLinkWidth Reference in which to return the max PCIe link generation ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a maxLinkWidth has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a maxLinkWidth is null ++ * - \ref NVML_ERROR_NOT_SUPPORTED if PCIe link information is not available ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetMaxPcieLinkWidth(nvmlDevice_t device, unsigned int *maxLinkWidth); ++ ++/** ++ * Retrieves the current PCIe link generation ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param currLinkGen Reference in which to return the current PCIe link generation ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a currLinkGen has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a currLinkGen is null ++ * - \ref NVML_ERROR_NOT_SUPPORTED if PCIe link information is not available ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetCurrPcieLinkGeneration(nvmlDevice_t device, unsigned int *currLinkGen); ++ ++/** ++ * Retrieves the current PCIe link width ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param currLinkWidth Reference in which to return the current PCIe link generation ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a currLinkWidth has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a currLinkWidth is null ++ * - \ref NVML_ERROR_NOT_SUPPORTED if PCIe link information is not available ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetCurrPcieLinkWidth(nvmlDevice_t device, unsigned int *currLinkWidth); ++ ++/** ++ * Retrieve PCIe utilization information. ++ * This function is querying a byte counter over a 20ms interval and thus is the ++ * PCIe throughput over that interval. ++ * ++ * For Maxwell &tm; or newer fully supported devices. ++ * ++ * This method is not supported on virtualized GPU environments. ++ * ++ * @param device The identifier of the target device ++ * @param counter The specific counter that should be queried \ref nvmlPcieUtilCounter_t ++ * @param value Reference in which to return throughput in KB/s ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a value has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a counter is invalid, or \a value is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPcieThroughput(nvmlDevice_t device, nvmlPcieUtilCounter_t counter, unsigned int *value); ++ ++/** ++ * Retrieve the PCIe replay counter. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param value Reference in which to return the counter's value ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a value and \a rollover have been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a value or \a rollover are NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPcieReplayCounter(nvmlDevice_t device, unsigned int *value); ++ ++/** ++ * Retrieves the current clock speeds for the device. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * See \ref nvmlClockType_t for details on available clock information. ++ * ++ * @param device The identifier of the target device ++ * @param type Identify which clock domain to query ++ * @param clock Reference in which to return the clock speed in MHz ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a clock has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clock is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device cannot report the specified clock ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetClockInfo(nvmlDevice_t device, nvmlClockType_t type, unsigned int *clock); ++ ++/** ++ * Retrieves the maximum clock speeds for the device. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * See \ref nvmlClockType_t for details on available clock information. ++ * ++ * \note On GPUs from Fermi family current P0 clocks (reported by \ref nvmlDeviceGetClockInfo) can differ from max clocks ++ * by few MHz. ++ * ++ * @param device The identifier of the target device ++ * @param type Identify which clock domain to query ++ * @param clock Reference in which to return the clock speed in MHz ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a clock has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clock is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device cannot report the specified clock ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetMaxClockInfo(nvmlDevice_t device, nvmlClockType_t type, unsigned int *clock); ++ ++/** ++ * Retrieves the current setting of a clock that applications will use unless an overspec situation occurs. ++ * Can be changed using \ref nvmlDeviceSetApplicationsClocks. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param clockType Identify which clock domain to query ++ * @param clockMHz Reference in which to return the clock in MHz ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a clockMHz has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clockMHz is NULL or \a clockType is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetApplicationsClock(nvmlDevice_t device, nvmlClockType_t clockType, unsigned int *clockMHz); ++ ++/** ++ * Retrieves the default applications clock that GPU boots with or ++ * defaults to after \ref nvmlDeviceResetApplicationsClocks call. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param clockType Identify which clock domain to query ++ * @param clockMHz Reference in which to return the default clock in MHz ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a clockMHz has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clockMHz is NULL or \a clockType is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * \see nvmlDeviceGetApplicationsClock ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetDefaultApplicationsClock(nvmlDevice_t device, nvmlClockType_t clockType, unsigned int *clockMHz); ++ ++/** ++ * Resets the application clock to the default value ++ * ++ * This is the applications clock that will be used after system reboot or driver reload. ++ * Default value is constant, but the current value an be changed using \ref nvmlDeviceSetApplicationsClocks. ++ * ++ * On Pascal and newer hardware, if clocks were previously locked with \ref nvmlDeviceSetApplicationsClocks, ++ * this call will unlock clocks. This returns clocks their default behavior ofautomatically boosting above ++ * base clocks as thermal limits allow. ++ * ++ * @see nvmlDeviceGetApplicationsClock ++ * @see nvmlDeviceSetApplicationsClocks ++ * ++ * For Fermi &tm; or newer non-GeForce fully supported devices and Maxwell or newer GeForce devices. ++ * ++ * @param device The identifier of the target device ++ * ++ * @return ++ * - \ref NVML_SUCCESS if new settings were successfully set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceResetApplicationsClocks(nvmlDevice_t device); ++ ++/** ++ * Retrieves the clock speed for the clock specified by the clock type and clock ID. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param clockType Identify which clock domain to query ++ * @param clockId Identify which clock in the domain to query ++ * @param clockMHz Reference in which to return the clock in MHz ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a clockMHz has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clockMHz is NULL or \a clockType is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetClock(nvmlDevice_t device, nvmlClockType_t clockType, nvmlClockId_t clockId, unsigned int *clockMHz); ++ ++/** ++ * Retrieves the customer defined maximum boost clock speed specified by the given clock type. ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param clockType Identify which clock domain to query ++ * @param clockMHz Reference in which to return the clock in MHz ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a clockMHz has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clockMHz is NULL or \a clockType is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device or the \a clockType on this device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetMaxCustomerBoostClock(nvmlDevice_t device, nvmlClockType_t clockType, unsigned int *clockMHz); ++ ++/** ++ * Retrieves the list of possible memory clocks that can be used as an argument for \ref nvmlDeviceSetApplicationsClocks. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param count Reference in which to provide the \a clocksMHz array size, and ++ * to return the number of elements ++ * @param clocksMHz Reference in which to return the clock in MHz ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a count and \a clocksMHz have been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a count is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a count is too small (\a count is set to the number of ++ * required elements) ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceSetApplicationsClocks ++ * @see nvmlDeviceGetSupportedGraphicsClocks ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetSupportedMemoryClocks(nvmlDevice_t device, unsigned int *count, unsigned int *clocksMHz); ++ ++/** ++ * Retrieves the list of possible graphics clocks that can be used as an argument for \ref nvmlDeviceSetApplicationsClocks. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param memoryClockMHz Memory clock for which to return possible graphics clocks ++ * @param count Reference in which to provide the \a clocksMHz array size, and ++ * to return the number of elements ++ * @param clocksMHz Reference in which to return the clocks in MHz ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a count and \a clocksMHz have been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_NOT_FOUND if the specified \a memoryClockMHz is not a supported frequency ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clock is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a count is too small ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceSetApplicationsClocks ++ * @see nvmlDeviceGetSupportedMemoryClocks ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetSupportedGraphicsClocks(nvmlDevice_t device, unsigned int memoryClockMHz, unsigned int *count, unsigned int *clocksMHz); ++ ++/** ++ * Retrieve the current state of Auto Boosted clocks on a device and store it in \a isEnabled ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * Auto Boosted clocks are enabled by default on some hardware, allowing the GPU to run at higher clock rates ++ * to maximize performance as thermal limits allow. ++ * ++ * On Pascal and newer hardware, Auto Aoosted clocks are controlled through application clocks. ++ * Use \ref nvmlDeviceSetApplicationsClocks and \ref nvmlDeviceResetApplicationsClocks to control Auto Boost ++ * behavior. ++ * ++ * @param device The identifier of the target device ++ * @param isEnabled Where to store the current state of Auto Boosted clocks of the target device ++ * @param defaultIsEnabled Where to store the default Auto Boosted clocks behavior of the target device that the device will ++ * revert to when no applications are using the GPU ++ * ++ * @return ++ * - \ref NVML_SUCCESS If \a isEnabled has been been set with the Auto Boosted clocks state of \a device ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a isEnabled is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support Auto Boosted clocks ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetAutoBoostedClocksEnabled(nvmlDevice_t device, nvmlEnableState_t *isEnabled, nvmlEnableState_t *defaultIsEnabled); ++ ++/** ++ * Try to set the current state of Auto Boosted clocks on a device. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * Auto Boosted clocks are enabled by default on some hardware, allowing the GPU to run at higher clock rates ++ * to maximize performance as thermal limits allow. Auto Boosted clocks should be disabled if fixed clock ++ * rates are desired. ++ * ++ * Non-root users may use this API by default but can be restricted by root from using this API by calling ++ * \ref nvmlDeviceSetAPIRestriction with apiType=NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS. ++ * Note: Persistence Mode is required to modify current Auto Boost settings, therefore, it must be enabled. ++ * ++ * On Pascal and newer hardware, Auto Boosted clocks are controlled through application clocks. ++ * Use \ref nvmlDeviceSetApplicationsClocks and \ref nvmlDeviceResetApplicationsClocks to control Auto Boost ++ * behavior. ++ * ++ * @param device The identifier of the target device ++ * @param enabled What state to try to set Auto Boosted clocks of the target device to ++ * ++ * @return ++ * - \ref NVML_SUCCESS If the Auto Boosted clocks were successfully set to the state specified by \a enabled ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support Auto Boosted clocks ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetAutoBoostedClocksEnabled(nvmlDevice_t device, nvmlEnableState_t enabled); ++ ++/** ++ * Try to set the default state of Auto Boosted clocks on a device. This is the default state that Auto Boosted clocks will ++ * return to when no compute running processes (e.g. CUDA application which have an active context) are running ++ * ++ * For Kepler &tm; or newer non-GeForce fully supported devices and Maxwell or newer GeForce devices. ++ * Requires root/admin permissions. ++ * ++ * Auto Boosted clocks are enabled by default on some hardware, allowing the GPU to run at higher clock rates ++ * to maximize performance as thermal limits allow. Auto Boosted clocks should be disabled if fixed clock ++ * rates are desired. ++ * ++ * On Pascal and newer hardware, Auto Boosted clocks are controlled through application clocks. ++ * Use \ref nvmlDeviceSetApplicationsClocks and \ref nvmlDeviceResetApplicationsClocks to control Auto Boost ++ * behavior. ++ * ++ * @param device The identifier of the target device ++ * @param enabled What state to try to set default Auto Boosted clocks of the target device to ++ * @param flags Flags that change the default behavior. Currently Unused. ++ * ++ * @return ++ * - \ref NVML_SUCCESS If the Auto Boosted clock's default state was successfully set to the state specified by \a enabled ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_NO_PERMISSION If the calling user does not have permission to change Auto Boosted clock's default state. ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support Auto Boosted clocks ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetDefaultAutoBoostedClocksEnabled(nvmlDevice_t device, nvmlEnableState_t enabled, unsigned int flags); ++ ++ ++/** ++ * Retrieves the intended operating speed of the device's fan. ++ * ++ * Note: The reported speed is the intended fan speed. If the fan is physically blocked and unable to spin, the ++ * output will not match the actual fan speed. ++ * ++ * For all discrete products with dedicated fans. ++ * ++ * The fan speed is expressed as a percent of the maximum, i.e. full speed is 100%. ++ * ++ * @param device The identifier of the target device ++ * @param speed Reference in which to return the fan speed percentage ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a speed has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a speed is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not have a fan ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetFanSpeed(nvmlDevice_t device, unsigned int *speed); ++ ++/** ++ * Retrieves the current temperature readings for the device, in degrees C. ++ * ++ * For all products. ++ * ++ * See \ref nvmlTemperatureSensors_t for details on available temperature sensors. ++ * ++ * @param device The identifier of the target device ++ * @param sensorType Flag that indicates which sensor reading to retrieve ++ * @param temp Reference in which to return the temperature reading ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a temp has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a sensorType is invalid or \a temp is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not have the specified sensor ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetTemperature(nvmlDevice_t device, nvmlTemperatureSensors_t sensorType, unsigned int *temp); ++ ++/** ++ * Retrieves the temperature threshold for the GPU with the specified threshold type in degrees C. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * See \ref nvmlTemperatureThresholds_t for details on available temperature thresholds. ++ * ++ * @param device The identifier of the target device ++ * @param thresholdType The type of threshold value queried ++ * @param temp Reference in which to return the temperature reading ++ * @return ++ * - \ref NVML_SUCCESS if \a temp has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a thresholdType is invalid or \a temp is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not have a temperature sensor or is unsupported ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetTemperatureThreshold(nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, unsigned int *temp); ++ ++/** ++ * Retrieves the current performance state for the device. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * See \ref nvmlPstates_t for details on allowed performance states. ++ * ++ * @param device The identifier of the target device ++ * @param pState Reference in which to return the performance state reading ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a pState has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a pState is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPerformanceState(nvmlDevice_t device, nvmlPstates_t *pState); ++ ++/** ++ * Retrieves current clocks throttling reasons. ++ * ++ * For all fully supported products. ++ * ++ * \note More than one bit can be enabled at the same time. Multiple reasons can be affecting clocks at once. ++ * ++ * @param device The identifier of the target device ++ * @param clocksThrottleReasons Reference in which to return bitmask of active clocks throttle ++ * reasons ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a clocksThrottleReasons has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clocksThrottleReasons is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlClocksThrottleReasons ++ * @see nvmlDeviceGetSupportedClocksThrottleReasons ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetCurrentClocksThrottleReasons(nvmlDevice_t device, unsigned long long *clocksThrottleReasons); ++ ++/** ++ * Retrieves bitmask of supported clocks throttle reasons that can be returned by ++ * \ref nvmlDeviceGetCurrentClocksThrottleReasons ++ * ++ * For all fully supported products. ++ * ++ * This method is not supported on virtualized GPU environments. ++ * ++ * @param device The identifier of the target device ++ * @param supportedClocksThrottleReasons Reference in which to return bitmask of supported ++ * clocks throttle reasons ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a supportedClocksThrottleReasons has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a supportedClocksThrottleReasons is NULL ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlClocksThrottleReasons ++ * @see nvmlDeviceGetCurrentClocksThrottleReasons ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetSupportedClocksThrottleReasons(nvmlDevice_t device, unsigned long long *supportedClocksThrottleReasons); ++ ++/** ++ * Deprecated: Use \ref nvmlDeviceGetPerformanceState. This function exposes an incorrect generalization. ++ * ++ * Retrieve the current performance state for the device. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * See \ref nvmlPstates_t for details on allowed performance states. ++ * ++ * @param device The identifier of the target device ++ * @param pState Reference in which to return the performance state reading ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a pState has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a pState is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPowerState(nvmlDevice_t device, nvmlPstates_t *pState); ++ ++/** ++ * This API has been deprecated. ++ * ++ * Retrieves the power management mode associated with this device. ++ * ++ * For products from the Fermi family. ++ * - Requires \a NVML_INFOROM_POWER version 3.0 or higher. ++ * ++ * For from the Kepler or newer families. ++ * - Does not require \a NVML_INFOROM_POWER object. ++ * ++ * This flag indicates whether any power management algorithm is currently active on the device. An ++ * enabled state does not necessarily mean the device is being actively throttled -- only that ++ * that the driver will do so if the appropriate conditions are met. ++ * ++ * See \ref nvmlEnableState_t for details on allowed modes. ++ * ++ * @param device The identifier of the target device ++ * @param mode Reference in which to return the current power management mode ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a mode has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPowerManagementMode(nvmlDevice_t device, nvmlEnableState_t *mode); ++ ++/** ++ * Retrieves the power management limit associated with this device. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * The power limit defines the upper boundary for the card's power draw. If ++ * the card's total power draw reaches this limit the power management algorithm kicks in. ++ * ++ * This reading is only available if power management mode is supported. ++ * See \ref nvmlDeviceGetPowerManagementMode. ++ * ++ * @param device The identifier of the target device ++ * @param limit Reference in which to return the power management limit in milliwatts ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a limit has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a limit is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPowerManagementLimit(nvmlDevice_t device, unsigned int *limit); ++ ++/** ++ * Retrieves information about possible values of power management limits on this device. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param minLimit Reference in which to return the minimum power management limit in milliwatts ++ * @param maxLimit Reference in which to return the maximum power management limit in milliwatts ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a minLimit and \a maxLimit have been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a minLimit or \a maxLimit is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceSetPowerManagementLimit ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPowerManagementLimitConstraints(nvmlDevice_t device, unsigned int *minLimit, unsigned int *maxLimit); ++ ++/** ++ * Retrieves default power management limit on this device, in milliwatts. ++ * Default power management limit is a power management limit that the device boots with. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param defaultLimit Reference in which to return the default power management limit in milliwatts ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a defaultLimit has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a defaultLimit is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPowerManagementDefaultLimit(nvmlDevice_t device, unsigned int *defaultLimit); ++ ++/** ++ * Retrieves power usage for this GPU in milliwatts and its associated circuitry (e.g. memory) ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * On Fermi and Kepler GPUs the reading is accurate to within +/- 5% of current power draw. ++ * ++ * It is only available if power management mode is supported. See \ref nvmlDeviceGetPowerManagementMode. ++ * ++ * @param device The identifier of the target device ++ * @param power Reference in which to return the power usage information ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a power has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a power is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support power readings ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetPowerUsage(nvmlDevice_t device, unsigned int *power); ++ ++/** ++ * Get the effective power limit that the driver enforces after taking into account all limiters ++ * ++ * Note: This can be different from the \ref nvmlDeviceGetPowerManagementLimit if other limits are set elsewhere ++ * This includes the out of band power limit interface ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The device to communicate with ++ * @param limit Reference in which to return the power management limit in milliwatts ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a limit has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a limit is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetEnforcedPowerLimit(nvmlDevice_t device, unsigned int *limit); ++ ++/** ++ * Retrieves the current GOM and pending GOM (the one that GPU will switch to after reboot). ++ * ++ * For GK110 M-class and X-class Tesla &tm; products from the Kepler family. ++ * Modes \ref NVML_GOM_LOW_DP and \ref NVML_GOM_ALL_ON are supported on fully supported GeForce products. ++ * Not supported on Quadro ® and Tesla &tm; C-class products. ++ * ++ * @param device The identifier of the target device ++ * @param current Reference in which to return the current GOM ++ * @param pending Reference in which to return the pending GOM ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a mode has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a current or \a pending is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlGpuOperationMode_t ++ * @see nvmlDeviceSetGpuOperationMode ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetGpuOperationMode(nvmlDevice_t device, nvmlGpuOperationMode_t *current, nvmlGpuOperationMode_t *pending); ++ ++/** ++ * Retrieves the amount of used, free and total memory available on the device, in bytes. ++ * ++ * For all products. ++ * ++ * Enabling ECC reduces the amount of total available memory, due to the extra required parity bits. ++ * Under WDDM most device memory is allocated and managed on startup by Windows. ++ * ++ * Under Linux and Windows TCC, the reported amount of used memory is equal to the sum of memory allocated ++ * by all active channels on the device. ++ * ++ * See \ref nvmlMemory_t for details on available memory info. ++ * ++ * @param device The identifier of the target device ++ * @param memory Reference in which to return the memory information ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a memory has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a memory is NULL ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetMemoryInfo(nvmlDevice_t device, nvmlMemory_t *memory); ++ ++/** ++ * Retrieves the current compute mode for the device. ++ * ++ * For all products. ++ * ++ * See \ref nvmlComputeMode_t for details on allowed compute modes. ++ * ++ * @param device The identifier of the target device ++ * @param mode Reference in which to return the current compute mode ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a mode has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceSetComputeMode() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetComputeMode(nvmlDevice_t device, nvmlComputeMode_t *mode); ++ ++/** ++ * Retrieves the current and pending ECC modes for the device. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * Only applicable to devices with ECC. ++ * Requires \a NVML_INFOROM_ECC version 1.0 or higher. ++ * ++ * Changing ECC modes requires a reboot. The "pending" ECC mode refers to the target mode following ++ * the next reboot. ++ * ++ * See \ref nvmlEnableState_t for details on allowed modes. ++ * ++ * @param device The identifier of the target device ++ * @param current Reference in which to return the current ECC mode ++ * @param pending Reference in which to return the pending ECC mode ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a current and \a pending have been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or either \a current or \a pending is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceSetEccMode() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetEccMode(nvmlDevice_t device, nvmlEnableState_t *current, nvmlEnableState_t *pending); ++ ++/** ++ * Retrieves the device boardId from 0-N. ++ * Devices with the same boardId indicate GPUs connected to the same PLX. Use in conjunction with ++ * \ref nvmlDeviceGetMultiGpuBoard() to decide if they are on the same board as well. ++ * The boardId returned is a unique ID for the current configuration. Uniqueness and ordering across ++ * reboots and system configurations is not guaranteed (i.e. if a Tesla K40c returns 0x100 and ++ * the two GPUs on a Tesla K10 in the same system returns 0x200 it is not guaranteed they will ++ * always return those values but they will always be different from each other). ++ * ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param boardId Reference in which to return the device's board ID ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a boardId has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a boardId is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetBoardId(nvmlDevice_t device, unsigned int *boardId); ++ ++/** ++ * Retrieves whether the device is on a Multi-GPU Board ++ * Devices that are on multi-GPU boards will set \a multiGpuBool to a non-zero value. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param multiGpuBool Reference in which to return a zero or non-zero value ++ * to indicate whether the device is on a multi GPU board ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a multiGpuBool has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a multiGpuBool is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetMultiGpuBoard(nvmlDevice_t device, unsigned int *multiGpuBool); ++ ++/** ++ * Retrieves the total ECC error counts for the device. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * Only applicable to devices with ECC. ++ * Requires \a NVML_INFOROM_ECC version 1.0 or higher. ++ * Requires ECC Mode to be enabled. ++ * ++ * The total error count is the sum of errors across each of the separate memory systems, i.e. the total set of ++ * errors across the entire device. ++ * ++ * See \ref nvmlMemoryErrorType_t for a description of available error types.\n ++ * See \ref nvmlEccCounterType_t for a description of available counter types. ++ * ++ * @param device The identifier of the target device ++ * @param errorType Flag that specifies the type of the errors. ++ * @param counterType Flag that specifies the counter-type of the errors. ++ * @param eccCounts Reference in which to return the specified ECC errors ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a eccCounts has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a errorType or \a counterType is invalid, or \a eccCounts is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceClearEccErrorCounts() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetTotalEccErrors(nvmlDevice_t device, nvmlMemoryErrorType_t errorType, nvmlEccCounterType_t counterType, unsigned long long *eccCounts); ++ ++/** ++ * Retrieves the detailed ECC error counts for the device. ++ * ++ * @deprecated This API supports only a fixed set of ECC error locations ++ * On different GPU architectures different locations are supported ++ * See \ref nvmlDeviceGetMemoryErrorCounter ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * Only applicable to devices with ECC. ++ * Requires \a NVML_INFOROM_ECC version 2.0 or higher to report aggregate location-based ECC counts. ++ * Requires \a NVML_INFOROM_ECC version 1.0 or higher to report all other ECC counts. ++ * Requires ECC Mode to be enabled. ++ * ++ * Detailed errors provide separate ECC counts for specific parts of the memory system. ++ * ++ * Reports zero for unsupported ECC error counters when a subset of ECC error counters are supported. ++ * ++ * See \ref nvmlMemoryErrorType_t for a description of available bit types.\n ++ * See \ref nvmlEccCounterType_t for a description of available counter types.\n ++ * See \ref nvmlEccErrorCounts_t for a description of provided detailed ECC counts. ++ * ++ * @param device The identifier of the target device ++ * @param errorType Flag that specifies the type of the errors. ++ * @param counterType Flag that specifies the counter-type of the errors. ++ * @param eccCounts Reference in which to return the specified ECC errors ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a eccCounts has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a errorType or \a counterType is invalid, or \a eccCounts is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceClearEccErrorCounts() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetDetailedEccErrors(nvmlDevice_t device, nvmlMemoryErrorType_t errorType, nvmlEccCounterType_t counterType, nvmlEccErrorCounts_t *eccCounts); ++ ++/** ++ * Retrieves the requested memory error counter for the device. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * Requires \a NVML_INFOROM_ECC version 2.0 or higher to report aggregate location-based memory error counts. ++ * Requires \a NVML_INFOROM_ECC version 1.0 or higher to report all other memory error counts. ++ * ++ * Only applicable to devices with ECC. ++ * ++ * Requires ECC Mode to be enabled. ++ * ++ * See \ref nvmlMemoryErrorType_t for a description of available memory error types.\n ++ * See \ref nvmlEccCounterType_t for a description of available counter types.\n ++ * See \ref nvmlMemoryLocation_t for a description of available counter locations.\n ++ * ++ * @param device The identifier of the target device ++ * @param errorType Flag that specifies the type of error. ++ * @param counterType Flag that specifies the counter-type of the errors. ++ * @param locationType Specifies the location of the counter. ++ * @param count Reference in which to return the ECC counter ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a count has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a bitTyp,e \a counterType or \a locationType is ++ * invalid, or \a count is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support ECC error reporting in the specified memory ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetMemoryErrorCounter(nvmlDevice_t device, nvmlMemoryErrorType_t errorType, ++ nvmlEccCounterType_t counterType, ++ nvmlMemoryLocation_t locationType, unsigned long long *count); ++ ++/** ++ * Retrieves the current utilization rates for the device's major subsystems. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * See \ref nvmlUtilization_t for details on available utilization rates. ++ * ++ * \note During driver initialization when ECC is enabled one can see high GPU and Memory Utilization readings. ++ * This is caused by ECC Memory Scrubbing mechanism that is performed during driver initialization. ++ * ++ * @param device The identifier of the target device ++ * @param utilization Reference in which to return the utilization information ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a utilization has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a utilization is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetUtilizationRates(nvmlDevice_t device, nvmlUtilization_t *utilization); ++ ++/** ++ * Retrieves the current utilization and sampling size in microseconds for the Encoder ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param utilization Reference to an unsigned int for encoder utilization info ++ * @param samplingPeriodUs Reference to an unsigned int for the sampling period in US ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a utilization has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a utilization is NULL, or \a samplingPeriodUs is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetEncoderUtilization(nvmlDevice_t device, unsigned int *utilization, unsigned int *samplingPeriodUs); ++ ++/** ++ * Retrieves the current utilization and sampling size in microseconds for the Decoder ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param utilization Reference to an unsigned int for decoder utilization info ++ * @param samplingPeriodUs Reference to an unsigned int for the sampling period in US ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a utilization has been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a utilization is NULL, or \a samplingPeriodUs is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetDecoderUtilization(nvmlDevice_t device, unsigned int *utilization, unsigned int *samplingPeriodUs); ++ ++/** ++ * Retrieves the current and pending driver model for the device. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * For windows only. ++ * ++ * On Windows platforms the device driver can run in either WDDM or WDM (TCC) mode. If a display is attached ++ * to the device it must run in WDDM mode. TCC mode is preferred if a display is not attached. ++ * ++ * See \ref nvmlDriverModel_t for details on available driver models. ++ * ++ * @param device The identifier of the target device ++ * @param current Reference in which to return the current driver model ++ * @param pending Reference in which to return the pending driver model ++ * ++ * @return ++ * - \ref NVML_SUCCESS if either \a current and/or \a pending have been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or both \a current and \a pending are NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the platform is not windows ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceSetDriverModel() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetDriverModel(nvmlDevice_t device, nvmlDriverModel_t *current, nvmlDriverModel_t *pending); ++ ++/** ++ * Get VBIOS version of the device. ++ * ++ * For all products. ++ * ++ * The VBIOS version may change from time to time. It will not exceed 32 characters in length ++ * (including the NULL terminator). See \ref nvmlConstants::NVML_DEVICE_VBIOS_VERSION_BUFFER_SIZE. ++ * ++ * @param device The identifier of the target device ++ * @param version Reference to which to return the VBIOS version ++ * @param length The maximum allowed length of the string returned in \a version ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a version has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a version is NULL ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetVbiosVersion(nvmlDevice_t device, char *version, unsigned int length); ++ ++/** ++ * Get Bridge Chip Information for all the bridge chips on the board. ++ * ++ * For all fully supported products. ++ * Only applicable to multi-GPU products. ++ * ++ * @param device The identifier of the target device ++ * @param bridgeHierarchy Reference to the returned bridge chip Hierarchy ++ * ++ * @return ++ * - \ref NVML_SUCCESS if bridge chip exists ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a bridgeInfo is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if bridge chip not supported on the device ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetBridgeChipInfo(nvmlDevice_t device, nvmlBridgeChipHierarchy_t *bridgeHierarchy); ++ ++/** ++ * Get information about processes with a compute context on a device ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * This function returns information only about compute running processes (e.g. CUDA application which have ++ * active context). Any graphics applications (e.g. using OpenGL, DirectX) won't be listed by this function. ++ * ++ * To query the current number of running compute processes, call this function with *infoCount = 0. The ++ * return code will be NVML_ERROR_INSUFFICIENT_SIZE, or NVML_SUCCESS if none are running. For this call ++ * \a infos is allowed to be NULL. ++ * ++ * The usedGpuMemory field returned is all of the memory used by the application. ++ * ++ * Keep in mind that information returned by this call is dynamic and the number of elements might change in ++ * time. Allocate more space for \a infos table in case new compute processes are spawned. ++ * ++ * @param device The identifier of the target device ++ * @param infoCount Reference in which to provide the \a infos array size, and ++ * to return the number of returned elements ++ * @param infos Reference in which to return the process information ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a infoCount and \a infos have been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a infoCount indicates that the \a infos array is too small ++ * \a infoCount will contain minimal amount of space necessary for ++ * the call to complete ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, either of \a infoCount or \a infos is NULL ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see \ref nvmlSystemGetProcessName ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetComputeRunningProcesses(nvmlDevice_t device, unsigned int *infoCount, nvmlProcessInfo_t *infos); ++ ++/** ++ * Get information about processes with a graphics context on a device ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * This function returns information only about graphics based processes ++ * (eg. applications using OpenGL, DirectX) ++ * ++ * To query the current number of running graphics processes, call this function with *infoCount = 0. The ++ * return code will be NVML_ERROR_INSUFFICIENT_SIZE, or NVML_SUCCESS if none are running. For this call ++ * \a infos is allowed to be NULL. ++ * ++ * The usedGpuMemory field returned is all of the memory used by the application. ++ * ++ * Keep in mind that information returned by this call is dynamic and the number of elements might change in ++ * time. Allocate more space for \a infos table in case new graphics processes are spawned. ++ * ++ * @param device The identifier of the target device ++ * @param infoCount Reference in which to provide the \a infos array size, and ++ * to return the number of returned elements ++ * @param infos Reference in which to return the process information ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a infoCount and \a infos have been populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a infoCount indicates that the \a infos array is too small ++ * \a infoCount will contain minimal amount of space necessary for ++ * the call to complete ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, either of \a infoCount or \a infos is NULL ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see \ref nvmlSystemGetProcessName ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetGraphicsRunningProcesses(nvmlDevice_t device, unsigned int *infoCount, nvmlProcessInfo_t *infos); ++ ++/** ++ * Check if the GPU devices are on the same physical board. ++ * ++ * For all fully supported products. ++ * ++ * @param device1 The first GPU device ++ * @param device2 The second GPU device ++ * @param onSameBoard Reference in which to return the status. ++ * Non-zero indicates that the GPUs are on the same board. ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a onSameBoard has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a dev1 or \a dev2 are invalid or \a onSameBoard is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this check is not supported by the device ++ * - \ref NVML_ERROR_GPU_IS_LOST if the either GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceOnSameBoard(nvmlDevice_t device1, nvmlDevice_t device2, int *onSameBoard); ++ ++/** ++ * Retrieves the root/admin permissions on the target API. See \a nvmlRestrictedAPI_t for the list of supported APIs. ++ * If an API is restricted only root users can call that API. See \a nvmlDeviceSetAPIRestriction to change current permissions. ++ * ++ * For all fully supported products. ++ * ++ * @param device The identifier of the target device ++ * @param apiType Target API type for this operation ++ * @param isRestricted Reference in which to return the current restriction ++ * NVML_FEATURE_ENABLED indicates that the API is root-only ++ * NVML_FEATURE_DISABLED indicates that the API is accessible to all users ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a isRestricted has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a apiType incorrect or \a isRestricted is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device or the device does not support ++ * the feature that is being queried (E.G. Enabling/disabling Auto Boosted clocks is ++ * not supported by the device) ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlRestrictedAPI_t ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetAPIRestriction(nvmlDevice_t device, nvmlRestrictedAPI_t apiType, nvmlEnableState_t *isRestricted); ++ ++/** ++ * Gets recent samples for the GPU. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * Based on type, this method can be used to fetch the power, utilization or clock samples maintained in the buffer by ++ * the driver. ++ * ++ * Power, Utilization and Clock samples are returned as type "unsigned int" for the union nvmlValue_t. ++ * ++ * To get the size of samples that user needs to allocate, the method is invoked with samples set to NULL. ++ * The returned samplesCount will provide the number of samples that can be queried. The user needs to ++ * allocate the buffer with size as samplesCount * sizeof(nvmlSample_t). ++ * ++ * lastSeenTimeStamp represents CPU timestamp in microseconds. Set it to 0 to fetch all the samples maintained by the ++ * underlying buffer. Set lastSeenTimeStamp to one of the timeStamps retrieved from the date of the previous query ++ * to get more recent samples. ++ * ++ * This method fetches the number of entries which can be accommodated in the provided samples array, and the ++ * reference samplesCount is updated to indicate how many samples were actually retrieved. The advantage of using this ++ * method for samples in contrast to polling via existing methods is to get get higher frequency data at lower polling cost. ++ * ++ * @param device The identifier for the target device ++ * @param type Type of sampling event ++ * @param lastSeenTimeStamp Return only samples with timestamp greater than lastSeenTimeStamp. ++ * @param sampleValType Output parameter to represent the type of sample value as described in nvmlSampleVal_t ++ * @param sampleCount Reference to provide the number of elements which can be queried in samples array ++ * @param samples Reference in which samples are returned ++ ++ * @return ++ * - \ref NVML_SUCCESS if samples are successfully retrieved ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a samplesCount is NULL or ++ * reference to \a sampleCount is 0 for non null \a samples ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_NOT_FOUND if sample entries are not found ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetSamples(nvmlDevice_t device, nvmlSamplingType_t type, unsigned long long lastSeenTimeStamp, ++ nvmlValueType_t *sampleValType, unsigned int *sampleCount, nvmlSample_t *samples); ++ ++/** ++ * Gets Total, Available and Used size of BAR1 memory. ++ * ++ * BAR1 is used to map the FB (device memory) so that it can be directly accessed by the CPU or by 3rd party ++ * devices (peer-to-peer on the PCIE bus). ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param bar1Memory Reference in which BAR1 memory ++ * information is returned. ++ * ++ * @return ++ * - \ref NVML_SUCCESS if BAR1 memory is successfully retrieved ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a bar1Memory is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetBAR1MemoryInfo(nvmlDevice_t device, nvmlBAR1Memory_t *bar1Memory); ++ ++ ++/** ++ * Gets the duration of time during which the device was throttled (lower than requested clocks) due to power ++ * or thermal constraints. ++ * ++ * The method is important to users who are tying to understand if their GPUs throttle at any point during their applications. The ++ * difference in violation times at two different reference times gives the indication of GPU throttling event. ++ * ++ * Violation for thermal capping is not supported at this time. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param perfPolicyType Represents Performance policy which can trigger GPU throttling ++ * @param violTime Reference to which violation time related information is returned ++ * ++ * ++ * @return ++ * - \ref NVML_SUCCESS if violation time is successfully retrieved ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a perfPolicyType is invalid, or \a violTime is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetViolationStatus(nvmlDevice_t device, nvmlPerfPolicyType_t perfPolicyType, nvmlViolationTime_t *violTime); ++ ++/** ++ * @} ++ */ ++ ++/** @addtogroup nvmlAccountingStats ++ * @{ ++ */ ++ ++/** ++ * Queries the state of per process accounting mode. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * See \ref nvmlDeviceGetAccountingStats for more details. ++ * See \ref nvmlDeviceSetAccountingMode ++ * ++ * @param device The identifier of the target device ++ * @param mode Reference in which to return the current accounting mode ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the mode has been successfully retrieved ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode are NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetAccountingMode(nvmlDevice_t device, nvmlEnableState_t *mode); ++ ++/** ++ * Queries process's accounting stats. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * Accounting stats capture GPU utilization and other statistics across the lifetime of a process. ++ * Accounting stats can be queried during life time of the process and after its termination. ++ * The time field in \ref nvmlAccountingStats_t is reported as 0 during the lifetime of the process and ++ * updated to actual running time after its termination. ++ * Accounting stats are kept in a circular buffer, newly created processes overwrite information about old ++ * processes. ++ * ++ * See \ref nvmlAccountingStats_t for description of each returned metric. ++ * List of processes that can be queried can be retrieved from \ref nvmlDeviceGetAccountingPids. ++ * ++ * @note Accounting Mode needs to be on. See \ref nvmlDeviceGetAccountingMode. ++ * @note Only compute and graphics applications stats can be queried. Monitoring applications stats can't be ++ * queried since they don't contribute to GPU utilization. ++ * @note In case of pid collision stats of only the latest process (that terminated last) will be reported ++ * ++ * @warning On Kepler devices per process statistics are accurate only if there's one process running on a GPU. ++ * ++ * @param device The identifier of the target device ++ * @param pid Process Id of the target process to query stats for ++ * @param stats Reference in which to return the process's accounting stats ++ * ++ * @return ++ * - \ref NVML_SUCCESS if stats have been successfully retrieved ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a stats are NULL ++ * - \ref NVML_ERROR_NOT_FOUND if process stats were not found ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature or accounting mode is disabled ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetAccountingBufferSize ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetAccountingStats(nvmlDevice_t device, unsigned int pid, nvmlAccountingStats_t *stats); ++ ++/** ++ * Queries list of processes that can be queried for accounting stats. The list of processes returned ++ * can be in running or terminated state. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * To just query the number of processes ready to be queried, call this function with *count = 0 and ++ * pids=NULL. The return code will be NVML_ERROR_INSUFFICIENT_SIZE, or NVML_SUCCESS if list is empty. ++ * ++ * For more details see \ref nvmlDeviceGetAccountingStats. ++ * ++ * @note In case of PID collision some processes might not be accessible before the circular buffer is full. ++ * ++ * @param device The identifier of the target device ++ * @param count Reference in which to provide the \a pids array size, and ++ * to return the number of elements ready to be queried ++ * @param pids Reference in which to return list of process ids ++ * ++ * @return ++ * - \ref NVML_SUCCESS if pids were successfully retrieved ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a count is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature or accounting mode is disabled ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a count is too small (\a count is set to ++ * expected value) ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetAccountingBufferSize ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetAccountingPids(nvmlDevice_t device, unsigned int *count, unsigned int *pids); ++ ++/** ++ * Returns the number of processes that the circular buffer with accounting pids can hold. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * This is the maximum number of processes that accounting information will be stored for before information ++ * about oldest processes will get overwritten by information about new processes. ++ * ++ * @param device The identifier of the target device ++ * @param bufferSize Reference in which to provide the size (in number of elements) ++ * of the circular buffer for accounting stats. ++ * ++ * @return ++ * - \ref NVML_SUCCESS if buffer size was successfully retrieved ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a bufferSize is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature or accounting mode is disabled ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetAccountingStats ++ * @see nvmlDeviceGetAccountingPids ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetAccountingBufferSize(nvmlDevice_t device, unsigned int *bufferSize); ++ ++/** @} */ ++ ++/** @addtogroup nvmlDeviceQueries ++ * @{ ++ */ ++ ++/** ++ * Returns the list of retired pages by source, including pages that are pending retirement ++ * The address information provided from this API is the hardware address of the page that was retired. Note ++ * that this does not match the virtual address used in CUDA, but will match the address information in XID 63 ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param cause Filter page addresses by cause of retirement ++ * @param pageCount Reference in which to provide the \a addresses buffer size, and ++ * to return the number of retired pages that match \a cause ++ * Set to 0 to query the size without allocating an \a addresses buffer ++ * @param addresses Buffer to write the page addresses into ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a pageCount was populated and \a addresses was filled ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a pageCount indicates the buffer is not large enough to store all the ++ * matching page addresses. \a pageCount is set to the needed size. ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a pageCount is NULL, \a cause is invalid, or ++ * \a addresses is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetRetiredPages(nvmlDevice_t device, nvmlPageRetirementCause_t cause, ++ unsigned int *pageCount, unsigned long long *addresses); ++ ++/** ++ * Check if any pages are pending retirement and need a reboot to fully retire. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param isPending Reference in which to return the pending status ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a isPending was populated ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a isPending is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetRetiredPagesPendingStatus(nvmlDevice_t device, nvmlEnableState_t *isPending); ++ ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlUnitCommands Unit Commands ++ * This chapter describes NVML operations that change the state of the unit. For S-class products. ++ * Each of these requires root/admin access. Non-admin users will see an NVML_ERROR_NO_PERMISSION ++ * error code when invoking any of these methods. ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Set the LED state for the unit. The LED can be either green (0) or amber (1). ++ * ++ * For S-class products. ++ * Requires root/admin permissions. ++ * ++ * This operation takes effect immediately. ++ * ++ * ++ * Current S-Class products don't provide unique LEDs for each unit. As such, both front ++ * and back LEDs will be toggled in unison regardless of which unit is specified with this command. ++ * ++ * See \ref nvmlLedColor_t for available colors. ++ * ++ * @param unit The identifier of the target unit ++ * @param color The target LED color ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the LED color has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit or \a color is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if this is not an S-class product ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlUnitGetLedState() ++ */ ++nvmlReturn_t DECLDIR nvmlUnitSetLedState(nvmlUnit_t unit, nvmlLedColor_t color); ++ ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlDeviceCommands Device Commands ++ * This chapter describes NVML operations that change the state of the device. ++ * Each of these requires root/admin access. Non-admin users will see an NVML_ERROR_NO_PERMISSION ++ * error code when invoking any of these methods. ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Set the persistence mode for the device. ++ * ++ * For all products. ++ * For Linux only. ++ * Requires root/admin permissions. ++ * ++ * The persistence mode determines whether the GPU driver software is torn down after the last client ++ * exits. ++ * ++ * This operation takes effect immediately. It is not persistent across reboots. After each reboot the ++ * persistence mode is reset to "Disabled". ++ * ++ * See \ref nvmlEnableState_t for available modes. ++ * ++ * @param device The identifier of the target device ++ * @param mode The target persistence mode ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the persistence mode was set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetPersistenceMode() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetPersistenceMode(nvmlDevice_t device, nvmlEnableState_t mode); ++ ++/** ++ * Set the compute mode for the device. ++ * ++ * For all products. ++ * Requires root/admin permissions. ++ * ++ * The compute mode determines whether a GPU can be used for compute operations and whether it can ++ * be shared across contexts. ++ * ++ * This operation takes effect immediately. Under Linux it is not persistent across reboots and ++ * always resets to "Default". Under windows it is persistent. ++ * ++ * Under windows compute mode may only be set to DEFAULT when running in WDDM ++ * ++ * See \ref nvmlComputeMode_t for details on available compute modes. ++ * ++ * @param device The identifier of the target device ++ * @param mode The target compute mode ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the compute mode was set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetComputeMode() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetComputeMode(nvmlDevice_t device, nvmlComputeMode_t mode); ++ ++/** ++ * Set the ECC mode for the device. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * Only applicable to devices with ECC. ++ * Requires \a NVML_INFOROM_ECC version 1.0 or higher. ++ * Requires root/admin permissions. ++ * ++ * The ECC mode determines whether the GPU enables its ECC support. ++ * ++ * This operation takes effect after the next reboot. ++ * ++ * See \ref nvmlEnableState_t for details on available modes. ++ * ++ * @param device The identifier of the target device ++ * @param ecc The target ECC mode ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the ECC mode was set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a ecc is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetEccMode() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetEccMode(nvmlDevice_t device, nvmlEnableState_t ecc); ++ ++/** ++ * Clear the ECC error and other memory error counts for the device. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * Only applicable to devices with ECC. ++ * Requires \a NVML_INFOROM_ECC version 2.0 or higher to clear aggregate location-based ECC counts. ++ * Requires \a NVML_INFOROM_ECC version 1.0 or higher to clear all other ECC counts. ++ * Requires root/admin permissions. ++ * Requires ECC Mode to be enabled. ++ * ++ * Sets all of the specified ECC counters to 0, including both detailed and total counts. ++ * ++ * This operation takes effect immediately. ++ * ++ * See \ref nvmlMemoryErrorType_t for details on available counter types. ++ * ++ * @param device The identifier of the target device ++ * @param counterType Flag that indicates which type of errors should be cleared. ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the error counts were cleared ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a counterType is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see ++ * - nvmlDeviceGetDetailedEccErrors() ++ * - nvmlDeviceGetTotalEccErrors() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceClearEccErrorCounts(nvmlDevice_t device, nvmlEccCounterType_t counterType); ++ ++/** ++ * Set the driver model for the device. ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * For windows only. ++ * Requires root/admin permissions. ++ * ++ * On Windows platforms the device driver can run in either WDDM or WDM (TCC) mode. If a display is attached ++ * to the device it must run in WDDM mode. ++ * ++ * It is possible to force the change to WDM (TCC) while the display is still attached with a force flag (nvmlFlagForce). ++ * This should only be done if the host is subsequently powered down and the display is detached from the device ++ * before the next reboot. ++ * ++ * This operation takes effect after the next reboot. ++ * ++ * Windows driver model may only be set to WDDM when running in DEFAULT compute mode. ++ * ++ * Change driver model to WDDM is not supported when GPU doesn't support graphics acceleration or ++ * will not support it after reboot. See \ref nvmlDeviceSetGpuOperationMode. ++ * ++ * See \ref nvmlDriverModel_t for details on available driver models. ++ * See \ref nvmlFlagDefault and \ref nvmlFlagForce ++ * ++ * @param device The identifier of the target device ++ * @param driverModel The target driver model ++ * @param flags Flags that change the default behavior ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the driver model has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a driverModel is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the platform is not windows or the device does not support this feature ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetDriverModel() ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetDriverModel(nvmlDevice_t device, nvmlDriverModel_t driverModel, unsigned int flags); ++ ++/** ++ * Set clocks that applications will lock to. ++ * ++ * Sets the clocks that compute and graphics applications will be running at. ++ * e.g. CUDA driver requests these clocks during context creation which means this property ++ * defines clocks at which CUDA applications will be running unless some overspec event ++ * occurs (e.g. over power, over thermal or external HW brake). ++ * ++ * Can be used as a setting to request constant performance. ++ * ++ * On Pascal and newer hardware, this will automatically disable automatic boosting of clocks. ++ * ++ * On K80 and newer Kepler and Maxwell GPUs, users desiring fixed performance should also call ++ * \ref nvmlDeviceSetAutoBoostedClocksEnabled to prevent clocks from automatically boosting ++ * above the clock value being set. ++ * ++ * For Kepler &tm; or newer non-GeForce fully supported devices and Maxwell or newer GeForce devices. ++ * Requires root/admin permissions. ++ * ++ * See \ref nvmlDeviceGetSupportedMemoryClocks and \ref nvmlDeviceGetSupportedGraphicsClocks ++ * for details on how to list available clocks combinations. ++ * ++ * After system reboot or driver reload applications clocks go back to their default value. ++ * See \ref nvmlDeviceResetApplicationsClocks. ++ * ++ * @param device The identifier of the target device ++ * @param memClockMHz Requested memory clock in MHz ++ * @param graphicsClockMHz Requested graphics clock in MHz ++ * ++ * @return ++ * - \ref NVML_SUCCESS if new settings were successfully set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a memClockMHz and \a graphicsClockMHz ++ * is not a valid clock combination ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetApplicationsClocks(nvmlDevice_t device, unsigned int memClockMHz, unsigned int graphicsClockMHz); ++ ++/** ++ * Set new power limit of this device. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * Requires root/admin permissions. ++ * ++ * See \ref nvmlDeviceGetPowerManagementLimitConstraints to check the allowed ranges of values. ++ * ++ * \note Limit is not persistent across reboots or driver unloads. ++ * Enable persistent mode to prevent driver from unloading when no application is using the device. ++ * ++ * @param device The identifier of the target device ++ * @param limit Power management limit in milliwatts to set ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a limit has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a defaultLimit is out of range ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceGetPowerManagementLimitConstraints ++ * @see nvmlDeviceGetPowerManagementDefaultLimit ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetPowerManagementLimit(nvmlDevice_t device, unsigned int limit); ++ ++/** ++ * Sets new GOM. See \a nvmlGpuOperationMode_t for details. ++ * ++ * For GK110 M-class and X-class Tesla &tm; products from the Kepler family. ++ * Modes \ref NVML_GOM_LOW_DP and \ref NVML_GOM_ALL_ON are supported on fully supported GeForce products. ++ * Not supported on Quadro ® and Tesla &tm; C-class products. ++ * Requires root/admin permissions. ++ * ++ * Changing GOMs requires a reboot. ++ * The reboot requirement might be removed in the future. ++ * ++ * Compute only GOMs don't support graphics acceleration. Under windows switching to these GOMs when ++ * pending driver model is WDDM is not supported. See \ref nvmlDeviceSetDriverModel. ++ * ++ * @param device The identifier of the target device ++ * @param mode Target GOM ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a mode has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode incorrect ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support GOM or specific mode ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlGpuOperationMode_t ++ * @see nvmlDeviceGetGpuOperationMode ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetGpuOperationMode(nvmlDevice_t device, nvmlGpuOperationMode_t mode); ++ ++/** ++ * Changes the root/admin restructions on certain APIs. See \a nvmlRestrictedAPI_t for the list of supported APIs. ++ * This method can be used by a root/admin user to give non-root/admin access to certain otherwise-restricted APIs. ++ * The new setting lasts for the lifetime of the NVIDIA driver; it is not persistent. See \a nvmlDeviceGetAPIRestriction ++ * to query the current restriction settings. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * Requires root/admin permissions. ++ * ++ * @param device The identifier of the target device ++ * @param apiType Target API type for this operation ++ * @param isRestricted The target restriction ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a isRestricted has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a apiType incorrect ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support changing API restrictions or the device does not support ++ * the feature that api restrictions are being set for (E.G. Enabling/disabling auto ++ * boosted clocks is not supported by the device) ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlRestrictedAPI_t ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetAPIRestriction(nvmlDevice_t device, nvmlRestrictedAPI_t apiType, nvmlEnableState_t isRestricted); ++ ++/** ++ * @} ++ */ ++ ++/** @addtogroup nvmlAccountingStats ++ * @{ ++ */ ++ ++/** ++ * Enables or disables per process accounting. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * Requires root/admin permissions. ++ * ++ * @note This setting is not persistent and will default to disabled after driver unloads. ++ * Enable persistence mode to be sure the setting doesn't switch off to disabled. ++ * ++ * @note Enabling accounting mode has no negative impact on the GPU performance. ++ * ++ * @note Disabling accounting clears all accounting pids information. ++ * ++ * See \ref nvmlDeviceGetAccountingMode ++ * See \ref nvmlDeviceGetAccountingStats ++ * See \ref nvmlDeviceClearAccountingPids ++ * ++ * @param device The identifier of the target device ++ * @param mode The target accounting mode ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the new mode has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a mode are invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetAccountingMode(nvmlDevice_t device, nvmlEnableState_t mode); ++ ++/** ++ * Clears accounting information about all processes that have already terminated. ++ * ++ * For Kepler &tm; or newer fully supported devices. ++ * Requires root/admin permissions. ++ * ++ * See \ref nvmlDeviceGetAccountingMode ++ * See \ref nvmlDeviceGetAccountingStats ++ * See \ref nvmlDeviceSetAccountingMode ++ * ++ * @param device The identifier of the target device ++ * ++ * @return ++ * - \ref NVML_SUCCESS if accounting information has been cleared ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device are invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceClearAccountingPids(nvmlDevice_t device); ++ ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup NvLink NvLink Methods ++ * This chapter describes methods that NVML can perform on NVLINK enabled devices. ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Retrieves the state of the device's NvLink for the link specified ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param link Specifies the NvLink link to be queried ++ * @param isActive \a nvmlEnableState_t where NVML_FEATURE_ENABLED indicates that ++ * the link is active and NVML_FEATURE_DISABLED indicates it ++ * is inactive ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a isActive has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a link is invalid or \a isActive is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkState(nvmlDevice_t device, unsigned int link, nvmlEnableState_t *isActive); ++ ++/** ++ * Retrieves the version of the device's NvLink for the link specified ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param link Specifies the NvLink link to be queried ++ * @param version Requested NvLink version ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a version has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a link is invalid or \a version is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkVersion(nvmlDevice_t device, unsigned int link, unsigned int *version); ++ ++/** ++ * Retrieves the requested capability from the device's NvLink for the link specified ++ * Please refer to the \a nvmlNvLinkCapability_t structure for the specific caps that can be queried ++ * The return value should be treated as a boolean. ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param link Specifies the NvLink link to be queried ++ * @param capability Specifies the \a nvmlNvLinkCapability_t to be queried ++ * @param capResult A boolean for the queried capability indicating that feature is available ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a capResult has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a link, or \a capability is invalid or \a capResult is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkCapability(nvmlDevice_t device, unsigned int link, ++ nvmlNvLinkCapability_t capability, unsigned int *capResult); ++ ++/** ++ * Retrieves the PCI information for the remote node on a NvLink link ++ * Note: pciSubSystemId is not filled in this function and is indeterminate ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param link Specifies the NvLink link to be queried ++ * @param pci \a nvmlPciInfo_t of the remote node for the specified link ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a pci has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a link is invalid or \a pci is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkRemotePciInfo(nvmlDevice_t device, unsigned int link, nvmlPciInfo_t *pci); ++ ++/** ++ * Retrieves the specified error counter value ++ * Please refer to \a nvmlNvLinkErrorCounter_t for error counters that are available ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param link Specifies the NvLink link to be queried ++ * @param counter Specifies the NvLink counter to be queried ++ * @param counterValue Returned counter value ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a counter has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a link, or \a counter is invalid or \a counterValue is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkErrorCounter(nvmlDevice_t device, unsigned int link, ++ nvmlNvLinkErrorCounter_t counter, unsigned long long *counterValue); ++ ++/** ++ * Resets all error counters to zero ++ * Please refer to \a nvmlNvLinkErrorCounter_t for the list of error counters that are reset ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param link Specifies the NvLink link to be queried ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the reset is successful ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a link is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceResetNvLinkErrorCounters(nvmlDevice_t device, unsigned int link); ++ ++/** ++ * Set the NVLINK utilization counter control information for the specified counter, 0 or 1. ++ * Please refer to \a nvmlNvLinkUtilizationControl_t for the structure definition. Performs a reset ++ * of the counters if the reset parameter is non-zero. ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param counter Specifies the counter that should be set (0 or 1). ++ * @param link Specifies the NvLink link to be queried ++ * @param control A reference to the \a nvmlNvLinkUtilizationControl_t to set ++ * @param reset Resets the counters on set if non-zero ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the control has been set successfully ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a counter, \a link, or \a control is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceSetNvLinkUtilizationControl(nvmlDevice_t device, unsigned int link, unsigned int counter, ++ nvmlNvLinkUtilizationControl_t *control, unsigned int reset); ++ ++/** ++ * Get the NVLINK utilization counter control information for the specified counter, 0 or 1. ++ * Please refer to \a nvmlNvLinkUtilizationControl_t for the structure definition ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param counter Specifies the counter that should be set (0 or 1). ++ * @param link Specifies the NvLink link to be queried ++ * @param control A reference to the \a nvmlNvLinkUtilizationControl_t to place information ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the control has been set successfully ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a counter, \a link, or \a control is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkUtilizationControl(nvmlDevice_t device, unsigned int link, unsigned int counter, ++ nvmlNvLinkUtilizationControl_t *control); ++ ++ ++/** ++ * Retrieve the NVLINK utilization counter based on the current control for a specified counter. ++ * In general it is good practice to use \a nvmlDeviceSetNvLinkUtilizationControl ++ * before reading the utilization counters as they have no default state ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param link Specifies the NvLink link to be queried ++ * @param counter Specifies the counter that should be read (0 or 1). ++ * @param rxcounter Receive counter return value ++ * @param txcounter Transmit counter return value ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a rxcounter and \a txcounter have been successfully set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a counter, or \a link is invalid or \a rxcounter or \a txcounter are NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkUtilizationCounter(nvmlDevice_t device, unsigned int link, unsigned int counter, ++ unsigned long long *rxcounter, unsigned long long *txcounter); ++ ++/** ++ * Freeze the NVLINK utilization counters ++ * Both the receive and transmit counters are operated on by this function ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param link Specifies the NvLink link to be queried ++ * @param counter Specifies the counter that should be frozen (0 or 1). ++ * @param freeze NVML_FEATURE_ENABLED = freeze the receive and transmit counters ++ * NVML_FEATURE_DISABLED = unfreeze the receive and transmit counters ++ * ++ * @return ++ * - \ref NVML_SUCCESS if counters were successfully frozen or unfrozen ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a link, \a counter, or \a freeze is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceFreezeNvLinkUtilizationCounter (nvmlDevice_t device, unsigned int link, ++ unsigned int counter, nvmlEnableState_t freeze); ++ ++/** ++ * Reset the NVLINK utilization counters ++ * Both the receive and transmit counters are operated on by this function ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * ++ * @param device The identifier of the target device ++ * @param link Specifies the NvLink link to be reset ++ * @param counter Specifies the counter that should be reset (0 or 1) ++ * ++ * @return ++ * - \ref NVML_SUCCESS if counters were successfully reset ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a link, or \a counter is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceResetNvLinkUtilizationCounter (nvmlDevice_t device, unsigned int link, unsigned int counter); ++ ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlEvents Event Handling Methods ++ * This chapter describes methods that NVML can perform against each device to register and wait for ++ * some event to occur. ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Create an empty set of events. ++ * Event set should be freed by \ref nvmlEventSetFree ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * @param set Reference in which to return the event handle ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the event has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a set is NULL ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlEventSetFree ++ */ ++nvmlReturn_t DECLDIR nvmlEventSetCreate(nvmlEventSet_t *set); ++ ++/** ++ * Starts recording of events on a specified devices and add the events to specified \ref nvmlEventSet_t ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * Ecc events are available only on ECC enabled devices (see \ref nvmlDeviceGetTotalEccErrors) ++ * Power capping events are available only on Power Management enabled devices (see \ref nvmlDeviceGetPowerManagementMode) ++ * ++ * For Linux only. ++ * ++ * \b IMPORTANT: Operations on \a set are not thread safe ++ * ++ * This call starts recording of events on specific device. ++ * All events that occurred before this call are not recorded. ++ * Checking if some event occurred can be done with \ref nvmlEventSetWait ++ * ++ * If function reports NVML_ERROR_UNKNOWN, event set is in undefined state and should be freed. ++ * If function reports NVML_ERROR_NOT_SUPPORTED, event set can still be used. None of the requested eventTypes ++ * are registered in that case. ++ * ++ * @param device The identifier of the target device ++ * @param eventTypes Bitmask of \ref nvmlEventType to record ++ * @param set Set to which add new event types ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the event has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a eventTypes is invalid or \a set is NULL ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the platform does not support this feature or some of requested event types ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlEventType ++ * @see nvmlDeviceGetSupportedEventTypes ++ * @see nvmlEventSetWait ++ * @see nvmlEventSetFree ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceRegisterEvents(nvmlDevice_t device, unsigned long long eventTypes, nvmlEventSet_t set); ++ ++/** ++ * Returns information about events supported on device ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * Events are not supported on Windows. So this function returns an empty mask in \a eventTypes on Windows. ++ * ++ * @param device The identifier of the target device ++ * @param eventTypes Reference in which to return bitmask of supported events ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the eventTypes has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a eventType is NULL ++ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlEventType ++ * @see nvmlDeviceRegisterEvents ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceGetSupportedEventTypes(nvmlDevice_t device, unsigned long long *eventTypes); ++ ++/** ++ * Waits on events and delivers events ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * If some events are ready to be delivered at the time of the call, function returns immediately. ++ * If there are no events ready to be delivered, function sleeps till event arrives ++ * but not longer than specified timeout. This function in certain conditions can return before ++ * specified timeout passes (e.g. when interrupt arrives) ++ * ++ * In case of xid error, the function returns the most recent xid error type seen by the system. If there are multiple ++ * xid errors generated before nvmlEventSetWait is invoked then the last seen xid error type is returned for all ++ * xid error events. ++ * ++ * @param set Reference to set of events to wait on ++ * @param data Reference in which to return event data ++ * @param timeoutms Maximum amount of wait time in milliseconds for registered event ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the data has been set ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a data is NULL ++ * - \ref NVML_ERROR_TIMEOUT if no event arrived in specified timeout or interrupt arrived ++ * - \ref NVML_ERROR_GPU_IS_LOST if a GPU has fallen off the bus or is otherwise inaccessible ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlEventType ++ * @see nvmlDeviceRegisterEvents ++ */ ++nvmlReturn_t DECLDIR nvmlEventSetWait(nvmlEventSet_t set, nvmlEventData_t * data, unsigned int timeoutms); ++ ++/** ++ * Releases events in the set ++ * ++ * For Fermi &tm; or newer fully supported devices. ++ * ++ * @param set Reference to events to be released ++ * ++ * @return ++ * - \ref NVML_SUCCESS if the event has been successfully released ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * ++ * @see nvmlDeviceRegisterEvents ++ */ ++nvmlReturn_t DECLDIR nvmlEventSetFree(nvmlEventSet_t set); ++ ++/** @} */ ++ ++/***************************************************************************************************/ ++/** @defgroup nvmlZPI Drain states ++ * This chapter describes methods that NVML can perform against each device to control their drain state ++ * and recognition by NVML and NVIDIA kernel driver. These methods can be used with out-of-band tools to ++ * power on/off GPUs, enable robust reset scenarios, etc. ++ * @{ ++ */ ++/***************************************************************************************************/ ++ ++/** ++ * Modify the drain state of a GPU. This method forces a GPU to no longer accept new incoming requests. ++ * Any new NVML process will no longer see this GPU. Persistence mode for this GPU must be turned off before ++ * this call is made. ++ * Must be called as administrator. ++ * For Linux only. ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * Some Kepler devices supported. ++ * ++ * @param pciInfo The PCI address of the GPU drain state to be modified ++ * @param newState The drain state that should be entered, see \ref nvmlEnableState_t ++ * ++ * @return ++ * - \ref NVML_SUCCESS if counters were successfully reset ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a nvmlIndex or \a newState is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_NO_PERMISSION if the calling process has insufficient permissions to perform operation ++ * - \ref NVML_ERROR_IN_USE if the device has persistence mode turned on ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceModifyDrainState (nvmlPciInfo_t *pciInfo, nvmlEnableState_t newState); ++ ++/** ++ * Query the drain state of a GPU. This method is used to check if a GPU is in a currently draining ++ * state. ++ * For Linux only. ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * Some Kepler devices supported. ++ * ++ * @param pciInfo The PCI address of the GPU drain state to be queried ++ * @param currentState The current drain state for this GPU, see \ref nvmlEnableState_t ++ * ++ * @return ++ * - \ref NVML_SUCCESS if counters were successfully reset ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a nvmlIndex or \a currentState is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceQueryDrainState (nvmlPciInfo_t *pciInfo, nvmlEnableState_t *currentState); ++ ++/** ++ * This method will remove the specified GPU from the view of both NVML and the NVIDIA kernel driver ++ * as long as no other processes are attached. If other processes are attached, this call will return ++ * NVML_ERROR_IN_USE and the GPU will be returned to its original "draining" state. Note: the ++ * only situation where a process can still be attached after nvmlDeviceModifyDrainState() is called ++ * to initiate the draining state is if that process was using, and is still using, a GPU before the ++ * call was made. Also note, persistence mode counts as an attachment to the GPU thus it must be disabled ++ * prior to this call. ++ * ++ * For long-running NVML processes please note that this will change the enumeration of current GPUs. ++ * For example, if there are four GPUs present and GPU1 is removed, the new enumeration will be 0-2. ++ * Also, device handles after the removed GPU will not be valid and must be re-established. ++ * Must be run as administrator. ++ * For Linux only. ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * Some Kepler devices supported. ++ * ++ * @param pciInfo The PCI address of the GPU to be removed ++ * ++ * @return ++ * - \ref NVML_SUCCESS if counters were successfully reset ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a nvmlIndex is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature ++ * - \ref NVML_ERROR_IN_USE if the device is still in use and cannot be removed ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceRemoveGpu (nvmlPciInfo_t *pciInfo); ++ ++/** ++ * Request the OS and the NVIDIA kernel driver to rediscover a portion of the PCI subsystem looking for GPUs that ++ * were previously removed. The portion of the PCI tree can be narrowed by specifying a domain, bus, and device. ++ * If all are zeroes then the entire PCI tree will be searched. Please note that for long-running NVML processes ++ * the enumeration will change based on how many GPUs are discovered and where they are inserted in bus order. ++ * ++ * In addition, all newly discovered GPUs will be initialized and their ECC scrubbed which may take several seconds ++ * per GPU. Also, all device handles are no longer guaranteed to be valid post discovery. ++ * ++ * Must be run as administrator. ++ * For Linux only. ++ * ++ * For newer than Maxwell &tm; fully supported devices. ++ * Some Kepler devices supported. ++ * ++ * @param pciInfo The PCI tree to be searched. Only the domain, bus, and device ++ * fields are used in this call. ++ * ++ * @return ++ * - \ref NVML_SUCCESS if counters were successfully reset ++ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a pciInfo is invalid ++ * - \ref NVML_ERROR_NOT_SUPPORTED if the operating system does not support this feature ++ * - \ref NVML_ERROR_OPERATING_SYSTEM if the operating system is denying this feature ++ * - \ref NVML_ERROR_NO_PERMISSION if the calling process has insufficient permissions to perform operation ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ */ ++nvmlReturn_t DECLDIR nvmlDeviceDiscoverGpus (nvmlPciInfo_t *pciInfo); ++ ++/** @} */ ++ ++/** ++ * NVML API versioning support ++ */ ++#if defined(__NVML_API_VERSION_INTERNAL) ++#undef nvmlDeviceGetPciInfo ++#undef nvmlDeviceGetCount ++#undef nvmlDeviceGetHandleByIndex ++#undef nvmlDeviceGetHandleByPciBusId ++#undef nvmlInit ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +-- +2.21.0 + diff --git a/SOURCES/0001-smartcard-Cancel-cancellable-when-stopping.patch b/SOURCES/0001-smartcard-Cancel-cancellable-when-stopping.patch new file mode 100644 index 0000000..4ddcdef --- /dev/null +++ b/SOURCES/0001-smartcard-Cancel-cancellable-when-stopping.patch @@ -0,0 +1,58 @@ +From a1c2685bc6b255f22b6ce4645c001d428cb67907 Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: Wed, 22 May 2019 14:56:42 +0200 +Subject: [PATCH] smartcard: Cancel cancellable when stopping + +self->cancellable in GsdSmartcardManager is not cancelled +at gsd_smartcard_manager_stop() and hence some callbacks are +still called after unload_nss() which clears SECMODListLock +which is used by SECMOD_GetReadLock() / SECMOD_ReleaseReadLock(). + +This leads to crashes in NSSRWLock_LockRead_Util() and +NSSRWLock_UnlockRead_Util() probably. + +Also check for return value of g_cancellable_connect() +and initialize pointer to PK11SlotInfo. + +See https://bugzilla.redhat.com/show_bug.cgi?id=1646359, +https://bugzilla.redhat.com/show_bug.cgi?id=1688791 and +their duplicates for additional info. +--- + plugins/smartcard/gsd-smartcard-manager.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletion(-) + +diff --git a/plugins/smartcard/gsd-smartcard-manager.c b/plugins/smartcard/gsd-smartcard-manager.c +index 014c17be..da1e0d6d 100644 +--- a/plugins/smartcard/gsd-smartcard-manager.c ++++ b/plugins/smartcard/gsd-smartcard-manager.c +@@ -184,7 +184,7 @@ + GError **error) + { + GsdSmartcardManagerPrivate *priv = self->priv; +- PK11SlotInfo *card, *old_card; ++ PK11SlotInfo *card = NULL, *old_card; + CK_SLOT_ID slot_id; + gulong handler_id; + int old_slot_series = -1, slot_series; +@@ -190,7 +190,8 @@ watch_one_event_from_driver (GsdSmartcardManager *self, + operation, + NULL); + +- card = SECMOD_WaitForAnyTokenEvent (operation->driver, 0, PR_SecondsToInterval (1)); ++ if (handler_id != 0) ++ card = SECMOD_WaitForAnyTokenEvent (operation->driver, 0, PR_SecondsToInterval (1)); + + g_cancellable_disconnect (cancellable, handler_id); + +@@ -773,6 +774,8 @@ gsd_smartcard_manager_stop (GsdSmartcardManager *self) + + g_debug ("Stopping smartcard manager"); + ++ g_cancellable_cancel (priv->cancellable); ++ + unload_nss (self); + + g_clear_object (&priv->settings); +-- +2.23.0 + diff --git a/SOURCES/0001-xsettings-Add-an-entry-for-the-overlay-scrolling-set.patch b/SOURCES/0001-xsettings-Add-an-entry-for-the-overlay-scrolling-set.patch new file mode 100644 index 0000000..0ec6921 --- /dev/null +++ b/SOURCES/0001-xsettings-Add-an-entry-for-the-overlay-scrolling-set.patch @@ -0,0 +1,25 @@ +From 6e790966c2b6e1db8dd2c145119d3fdd19e0c18f Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Wed, 22 May 2019 16:04:42 -0400 +Subject: [PATCH] xsettings: Add an entry for the overlay scrolling setting + +This will be used by GTK. +--- + plugins/xsettings/gsd-xsettings-manager.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c +index c3ac7892..4164de40 100644 +--- a/plugins/xsettings/gsd-xsettings-manager.c ++++ b/plugins/xsettings/gsd-xsettings-manager.c +@@ -478,6 +478,7 @@ static TranslationEntry translations [] = { + { "org.gnome.desktop.interface", "icon-theme", "Net/IconThemeName", translate_string_string }, + { "org.gnome.desktop.interface", "cursor-theme", "Gtk/CursorThemeName", translate_string_string }, + { "org.gnome.desktop.interface", "gtk-enable-primary-paste", "Gtk/EnablePrimaryPaste", translate_bool_int }, ++ { "org.gnome.desktop.interface", "overlay-scrolling", "Gtk/OverlayScrolling", translate_bool_int }, + /* cursor-size is handled via the Xft side as it needs the scaling factor */ + + { "org.gnome.desktop.sound", "theme-name", "Net/SoundThemeName", translate_string_string }, +-- +2.23.0 + diff --git a/SOURCES/0002-account-reshow-the-notification-when-screen-unlocks.patch b/SOURCES/0002-account-reshow-the-notification-when-screen-unlocks.patch new file mode 100644 index 0000000..858b737 --- /dev/null +++ b/SOURCES/0002-account-reshow-the-notification-when-screen-unlocks.patch @@ -0,0 +1,271 @@ +From ad0fd6c905011b7bb9eac9fa8cb91f58d71e4a29 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Mon, 6 Nov 2017 15:49:58 -0500 +Subject: [PATCH 2/4] account: reshow the notification when screen unlocks + +--- + plugins/account/gsd-account-manager.c | 48 ++++++++++++++++++++++++--- + 1 file changed, 43 insertions(+), 5 deletions(-) + +diff --git a/plugins/account/gsd-account-manager.c b/plugins/account/gsd-account-manager.c +index 40b91cb6..cb37f466 100644 +--- a/plugins/account/gsd-account-manager.c ++++ b/plugins/account/gsd-account-manager.c +@@ -11,72 +11,75 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + */ + + #include "config.h" + + #include + #include + #include + #include + #include + #include + #include + + #include + + #include + #include + #include + + #include + #include + #include + + #include "gnome-settings-profile.h" ++#include "gnome-settings-bus.h" + #include "gsd-account-manager.h" + #include "org.freedesktop.Accounts.h" + #include "org.freedesktop.Accounts.User.h" + + #define GSD_ACCOUNT_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_ACCOUNT_MANAGER, GsdAccountManagerPrivate)) + + struct GsdAccountManagerPrivate + { + GsdAccounts *accounts_proxy; + GsdAccountsUser *accounts_user_proxy; + GCancellable *cancellable; + ++ GsdScreenSaver *screensaver_proxy; ++ + gint64 expiration_time; + gint64 last_change_time; + gint64 min_days_between_changes; + gint64 max_days_between_changes; + gint64 days_to_warn; + gint64 days_after_expiration_until_lock; + + NotifyNotification *notification; + }; + + static void gsd_account_manager_class_init (GsdAccountManagerClass *klass); + static void gsd_account_manager_init (GsdAccountManager *account_manager); + static void gsd_account_manager_finalize (GObject *object); + + G_DEFINE_TYPE (GsdAccountManager, gsd_account_manager, G_TYPE_OBJECT) + + static gpointer manager_object = NULL; + + static void + on_notification_closed (NotifyNotification *notification, + gpointer user_data) + { + GsdAccountManager *manager = user_data; + + g_clear_object (&manager->priv->notification); + } + + static void + hide_notification (GsdAccountManager *manager) + { +@@ -221,77 +224,111 @@ on_got_password_expiration_policy (GsdAccountsUser *accounts_user_proxy, + gint64 days_after_expiration_until_lock; + + gnome_settings_profile_start (NULL); + succeeded = gsd_accounts_user_call_get_password_expiration_policy_finish (accounts_user_proxy, + &expiration_time, + &last_change_time, + &min_days_between_changes, + &max_days_between_changes, + &days_to_warn, + &days_after_expiration_until_lock, + res, + &error); + + if (!succeeded) { + g_warning ("Failed to get password expiration policy for user: %s", error->message); + goto out; + } + + set_policy_number (&manager->priv->expiration_time, expiration_time); + set_policy_number (&manager->priv->last_change_time, last_change_time); + set_policy_number (&manager->priv->min_days_between_changes, min_days_between_changes); + set_policy_number (&manager->priv->max_days_between_changes, max_days_between_changes); + set_policy_number (&manager->priv->days_to_warn, days_to_warn); + set_policy_number (&manager->priv->days_after_expiration_until_lock, days_after_expiration_until_lock); + + update_password_notification (manager); + out: + gnome_settings_profile_end (NULL); + } + ++static void ++fetch_password_expiration_policy (GsdAccountManager *manager) ++{ ++ gsd_accounts_user_call_get_password_expiration_policy (manager->priv->accounts_user_proxy, ++ manager->priv->cancellable, ++ (GAsyncReadyCallback) ++ on_got_password_expiration_policy, ++ manager); ++} ++ ++static void ++on_screensaver_signal (GDBusProxy *proxy, ++ const gchar *sender_name, ++ const gchar *signal_name, ++ GVariant *parameters, ++ gpointer user_data) ++{ ++ GsdAccountManager *manager = user_data; ++ ++ if (g_strcmp0 (signal_name, "ActiveChanged") == 0) { ++ gboolean active; ++ ++ g_variant_get (parameters, "(b)", &active); ++ ++ if (!active) { ++ fetch_password_expiration_policy (manager); ++ } ++ } ++} ++ + static void + on_got_accounts_user_proxy (GObject *source_object, + GAsyncResult *res, + gpointer user_data) + { + GsdAccountManager *manager = user_data; + g_autoptr(GError) error = NULL; + + gnome_settings_profile_start (NULL); + manager->priv->accounts_user_proxy = gsd_accounts_user_proxy_new_finish (res, &error); + + if (manager->priv->accounts_user_proxy != NULL) { +- gsd_accounts_user_call_get_password_expiration_policy (manager->priv->accounts_user_proxy, +- manager->priv->cancellable, +- (GAsyncReadyCallback) +- on_got_password_expiration_policy, +- manager); ++ fetch_password_expiration_policy (manager); ++ ++ manager->priv->screensaver_proxy = gnome_settings_bus_get_screen_saver_proxy (); ++ ++ g_signal_connect (manager->priv->screensaver_proxy, ++ "g-signal", ++ G_CALLBACK (on_screensaver_signal), ++ manager); ++ + } else { + g_warning ("Failed to get user proxy to accounts service: %s", error->message); + goto out; + } + + out: + gnome_settings_profile_end (NULL); + } + + static void + on_got_user_object_path (GsdAccounts *accounts_proxy, + GAsyncResult *res, + gpointer user_data) + { + GsdAccountManager *manager = user_data; + g_autoptr(GError) error = NULL; + gboolean succeeded; + gchar *object_path; + GDBusConnection *connection; + + gnome_settings_profile_start (NULL); + + succeeded = gsd_accounts_call_find_user_by_id_finish (accounts_proxy, + &object_path, + res, + &error); + + if (!succeeded) { + g_warning ("Unable to find current user in accounts service: %s", + error->message); +@@ -343,60 +380,61 @@ gsd_account_manager_start (GsdAccountManager *manager, + g_debug ("Starting accounts manager"); + + gnome_settings_profile_start (NULL); + manager->priv->cancellable = g_cancellable_new (); + gsd_accounts_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + "org.freedesktop.Accounts", + "/org/freedesktop/Accounts", + manager->priv->cancellable, + (GAsyncReadyCallback) + on_got_accounts_proxy, + manager); + gnome_settings_profile_end (NULL); + + return TRUE; + } + + void + gsd_account_manager_stop (GsdAccountManager *manager) + { + g_debug ("Stopping accounts manager"); + + if (manager->priv->cancellable != NULL) { + g_cancellable_cancel (manager->priv->cancellable); + g_clear_object (&manager->priv->cancellable); + } + + g_clear_object (&manager->priv->accounts_proxy); + g_clear_object (&manager->priv->accounts_user_proxy); + g_clear_object (&manager->priv->notification); ++ g_clear_object (&manager->priv->screensaver_proxy); + } + + static void + gsd_account_manager_class_init (GsdAccountManagerClass *klass) + { + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = gsd_account_manager_finalize; + + notify_init ("gnome-settings-daemon"); + + g_type_class_add_private (klass, sizeof (GsdAccountManagerPrivate)); + } + + static void + gsd_account_manager_init (GsdAccountManager *manager) + { + manager->priv = GSD_ACCOUNT_MANAGER_GET_PRIVATE (manager); + } + + static void + gsd_account_manager_finalize (GObject *object) + { + GsdAccountManager *manager; + + g_return_if_fail (object != NULL); + g_return_if_fail (GSD_IS_ACCOUNT_MANAGER (object)); + + manager = GSD_ACCOUNT_MANAGER (object); + +-- +2.21.0 + diff --git a/SOURCES/0003-account-display-nag-screen-periodically.patch b/SOURCES/0003-account-display-nag-screen-periodically.patch new file mode 100644 index 0000000..c7a13fb --- /dev/null +++ b/SOURCES/0003-account-display-nag-screen-periodically.patch @@ -0,0 +1,451 @@ +From 31844edad70876e26ab995179bc67fb3b23a1793 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Mon, 6 Nov 2017 16:39:55 -0500 +Subject: [PATCH 3/4] account: display nag screen periodically + +This is configurable via a gsettings key. +--- + data/meson.build | 1 + + ...ings-daemon.plugins.account.gschema.xml.in | 9 +++ + plugins/account/gsd-account-manager.c | 55 +++++++++++++++++++ + 3 files changed, 65 insertions(+) + create mode 100644 data/org.gnome.settings-daemon.plugins.account.gschema.xml.in + +diff --git a/data/meson.build b/data/meson.build +index e93ba641..5a2cd5a7 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -1,36 +1,37 @@ + data_inc = include_directories('.') + + schemas = [ + 'org.gnome.settings-daemon.peripherals.gschema.xml', + 'org.gnome.settings-daemon.peripherals.wacom.gschema.xml', + 'org.gnome.settings-daemon.plugins.gschema.xml', ++ 'org.gnome.settings-daemon.plugins.account.gschema.xml', + 'org.gnome.settings-daemon.plugins.color.gschema.xml', + 'org.gnome.settings-daemon.plugins.housekeeping.gschema.xml', + 'org.gnome.settings-daemon.plugins.media-keys.gschema.xml', + 'org.gnome.settings-daemon.plugins.power.gschema.xml', + 'org.gnome.settings-daemon.plugins.sharing.gschema.xml', + 'org.gnome.settings-daemon.plugins.xsettings.gschema.xml' + ] + + schema_conf = configuration_data() + schema_conf.set('GETTEXT_PACKAGE', meson.project_name()) + + schemas_xml = [] + foreach schema: schemas + schemas_xml += [configure_file( + input: schema + '.in', + output: schema, + configuration: schema_conf, + install: true, + install_dir: gsd_schemadir + )] + endforeach + + enums_header = files('gsd-enums.h') + + mkenums = gnome.mkenums( + 'org.gnome.settings-daemon.enums.xml', + sources: enums_header, + comments: '', + fhead: '', + vhead: ' <@type@ id="org.gnome.settings-daemon.@EnumName@">', +diff --git a/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in b/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in +new file mode 100644 +index 00000000..f3d59e81 +--- /dev/null ++++ b/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in +@@ -0,0 +1,9 @@ ++ ++ ++ ++ 1440 ++ Time before repeated warning about account password expiration ++ If a user's account is expiring, a notification will get displayed periodically after the specified number of minutes ++ ++ ++ +diff --git a/plugins/account/gsd-account-manager.c b/plugins/account/gsd-account-manager.c +index cb37f466..ff054edd 100644 +--- a/plugins/account/gsd-account-manager.c ++++ b/plugins/account/gsd-account-manager.c +@@ -20,126 +20,135 @@ + #include "config.h" + + #include + #include + #include + #include + #include + #include + #include + + #include + + #include + #include + #include + + #include + #include + #include + + #include "gnome-settings-profile.h" + #include "gnome-settings-bus.h" + #include "gsd-account-manager.h" + #include "org.freedesktop.Accounts.h" + #include "org.freedesktop.Accounts.User.h" + + #define GSD_ACCOUNT_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_ACCOUNT_MANAGER, GsdAccountManagerPrivate)) + + struct GsdAccountManagerPrivate + { ++ GSettings *settings; ++ + GsdAccounts *accounts_proxy; + GsdAccountsUser *accounts_user_proxy; + GCancellable *cancellable; + + GsdScreenSaver *screensaver_proxy; + + gint64 expiration_time; + gint64 last_change_time; + gint64 min_days_between_changes; + gint64 max_days_between_changes; + gint64 days_to_warn; + gint64 days_after_expiration_until_lock; + + NotifyNotification *notification; ++ ++ gint64 last_notify_time; ++ int notify_period; ++ guint notify_period_timeout_id; + }; + + static void gsd_account_manager_class_init (GsdAccountManagerClass *klass); + static void gsd_account_manager_init (GsdAccountManager *account_manager); + static void gsd_account_manager_finalize (GObject *object); ++static void fetch_password_expiration_policy (GsdAccountManager *manager); + + G_DEFINE_TYPE (GsdAccountManager, gsd_account_manager, G_TYPE_OBJECT) + + static gpointer manager_object = NULL; + + static void + on_notification_closed (NotifyNotification *notification, + gpointer user_data) + { + GsdAccountManager *manager = user_data; + + g_clear_object (&manager->priv->notification); + } + + static void + hide_notification (GsdAccountManager *manager) + { + if (manager->priv->notification == NULL) + return; + + notify_notification_close (manager->priv->notification, NULL); + g_clear_object (&manager->priv->notification); + } + + static void + show_notification (GsdAccountManager *manager, + const char *primary_text, + const char *secondary_text) + { + g_assert (manager->priv->notification == NULL); + + manager->priv->notification = notify_notification_new (primary_text, + secondary_text, + "avatar-default-symbolic"); + notify_notification_set_app_name (manager->priv->notification, _("User Account")); + notify_notification_set_hint (manager->priv->notification, + "resident", + g_variant_new_boolean (TRUE)); + notify_notification_set_timeout (manager->priv->notification, + NOTIFY_EXPIRES_NEVER); + + g_signal_connect (manager->priv->notification, + "closed", + G_CALLBACK (on_notification_closed), + manager); + + notify_notification_show (manager->priv->notification, NULL); ++ ++ manager->priv->last_notify_time = g_get_monotonic_time (); + } + + static void + update_password_notification (GsdAccountManager *manager) + { + gint64 days_since_epoch; + gint64 days_until_expiration = -1; + gint64 days_since_last_change = -1; + gint64 days_left = -1; + g_autofree char *primary_text = NULL; + g_autofree char *secondary_text = NULL; + gboolean password_already_expired = FALSE; + + hide_notification (manager); + + days_since_epoch = g_get_real_time () / G_USEC_PER_SEC / 60 / 60 / 24; + + if (manager->priv->expiration_time > 0) { + days_until_expiration = manager->priv->expiration_time - days_since_epoch; + + if (days_until_expiration <= 0) { + password_already_expired = TRUE; + goto out; + } + } + + if (manager->priv->last_change_time == 0) { + password_already_expired = TRUE; + goto out; + } +@@ -181,99 +190,127 @@ out: + primary_text = g_strdup_printf (_("Password Expired")); + secondary_text = g_strdup_printf (_("Your password is expired. Please update it.")); + } else if (days_left >= 0) { + primary_text = g_strdup_printf (_("Password Expiring Soon")); + if (days_left == 0) + secondary_text = g_strdup_printf (_("Your password is expiring today.")); + else if (days_left == 1) + secondary_text = g_strdup_printf (_("Your password is expiring in a day.")); + else + secondary_text = g_strdup_printf (_("Your password is expiring in %ld days."), + days_left); + } + + if (primary_text != NULL && secondary_text != NULL) + show_notification (manager, + primary_text, + secondary_text); + } + + static gboolean + set_policy_number (gint64 *destination, + gint64 source) + { + if (*destination == source) + return FALSE; + + *destination = source; + return TRUE; + } + ++static gboolean ++on_notify_period_elapsed (GsdAccountManager *manager) ++{ ++ manager->priv->notify_period_timeout_id = 0; ++ fetch_password_expiration_policy (manager); ++ return G_SOURCE_REMOVE; ++} ++ ++static void ++queue_periodic_timeout (GsdAccountManager *manager) ++{ ++ if (manager->priv->notify_period_timeout_id != 0) { ++ g_source_remove (manager->priv->notify_period_timeout_id); ++ manager->priv->notify_period_timeout_id = 0; ++ } ++ ++ if (manager->priv->notify_period > 0) { ++ gint64 already_elapsed_time; ++ ++ already_elapsed_time = MAX (0, (g_get_monotonic_time () - manager->priv->last_notify_time) / G_USEC_PER_SEC); ++ ++ manager->priv->notify_period_timeout_id = g_timeout_add_seconds (MAX (0, manager->priv->notify_period * 60 - already_elapsed_time), ++ (GSourceFunc) on_notify_period_elapsed, ++ manager); ++ } ++} ++ + static void + on_got_password_expiration_policy (GsdAccountsUser *accounts_user_proxy, + GAsyncResult *res, + gpointer user_data) + { + GsdAccountManager *manager = user_data; + g_autoptr(GError) error = NULL; + gboolean succeeded; + gint64 expiration_time; + gint64 last_change_time; + gint64 min_days_between_changes; + gint64 max_days_between_changes; + gint64 days_to_warn; + gint64 days_after_expiration_until_lock; + + gnome_settings_profile_start (NULL); + succeeded = gsd_accounts_user_call_get_password_expiration_policy_finish (accounts_user_proxy, + &expiration_time, + &last_change_time, + &min_days_between_changes, + &max_days_between_changes, + &days_to_warn, + &days_after_expiration_until_lock, + res, + &error); + + if (!succeeded) { + g_warning ("Failed to get password expiration policy for user: %s", error->message); + goto out; + } + + set_policy_number (&manager->priv->expiration_time, expiration_time); + set_policy_number (&manager->priv->last_change_time, last_change_time); + set_policy_number (&manager->priv->min_days_between_changes, min_days_between_changes); + set_policy_number (&manager->priv->max_days_between_changes, max_days_between_changes); + set_policy_number (&manager->priv->days_to_warn, days_to_warn); + set_policy_number (&manager->priv->days_after_expiration_until_lock, days_after_expiration_until_lock); + + update_password_notification (manager); ++ queue_periodic_timeout (manager); + out: + gnome_settings_profile_end (NULL); + } + + static void + fetch_password_expiration_policy (GsdAccountManager *manager) + { + gsd_accounts_user_call_get_password_expiration_policy (manager->priv->accounts_user_proxy, + manager->priv->cancellable, + (GAsyncReadyCallback) + on_got_password_expiration_policy, + manager); + } + + static void + on_screensaver_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters, + gpointer user_data) + { + GsdAccountManager *manager = user_data; + + if (g_strcmp0 (signal_name, "ActiveChanged") == 0) { + gboolean active; + + g_variant_get (parameters, "(b)", &active); + + if (!active) { + fetch_password_expiration_policy (manager); +@@ -346,91 +383,109 @@ on_got_user_object_path (GsdAccounts *accounts_proxy, + manager); + + out: + gnome_settings_profile_end (NULL); + } + + static void + on_got_accounts_proxy (GObject *source_object, + GAsyncResult *res, + gpointer user_data) + { + GsdAccountManager *manager = user_data; + g_autoptr(GError) error = NULL; + + gnome_settings_profile_start (NULL); + manager->priv->accounts_proxy = gsd_accounts_proxy_new_for_bus_finish (res, &error); + + if (manager->priv->accounts_proxy != NULL) { + gsd_accounts_call_find_user_by_id (manager->priv->accounts_proxy, + getuid (), + manager->priv->cancellable, + (GAsyncReadyCallback) + on_got_user_object_path, + manager); + } else { + g_warning ("Failed to get proxy to accounts service: %s", error->message); + } + gnome_settings_profile_end (NULL); + } + ++static void ++on_notify_period_changed (GsdAccountManager *manager) ++{ ++ manager->priv->notify_period = g_settings_get_int (manager->priv->settings, "notify-period"); ++ ++ queue_periodic_timeout (manager); ++} ++ + gboolean + gsd_account_manager_start (GsdAccountManager *manager, + GError **error) + { + g_debug ("Starting accounts manager"); + + gnome_settings_profile_start (NULL); + manager->priv->cancellable = g_cancellable_new (); ++ manager->priv->settings = g_settings_new ("org.gnome.settings-daemon.plugins.account"); ++ ++ manager->priv->notify_period = g_settings_get_int (manager->priv->settings, "notify-period"); ++ g_signal_connect_object (G_OBJECT (manager->priv->settings), ++ "changed::notify-period", ++ G_CALLBACK (on_notify_period_changed), ++ manager, ++ G_CONNECT_SWAPPED); ++ + gsd_accounts_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + "org.freedesktop.Accounts", + "/org/freedesktop/Accounts", + manager->priv->cancellable, + (GAsyncReadyCallback) + on_got_accounts_proxy, + manager); + gnome_settings_profile_end (NULL); + + return TRUE; + } + + void + gsd_account_manager_stop (GsdAccountManager *manager) + { + g_debug ("Stopping accounts manager"); + + if (manager->priv->cancellable != NULL) { + g_cancellable_cancel (manager->priv->cancellable); + g_clear_object (&manager->priv->cancellable); + } + ++ g_clear_object (&manager->priv->settings); + g_clear_object (&manager->priv->accounts_proxy); + g_clear_object (&manager->priv->accounts_user_proxy); + g_clear_object (&manager->priv->notification); + g_clear_object (&manager->priv->screensaver_proxy); + } + + static void + gsd_account_manager_class_init (GsdAccountManagerClass *klass) + { + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = gsd_account_manager_finalize; + + notify_init ("gnome-settings-daemon"); + + g_type_class_add_private (klass, sizeof (GsdAccountManagerPrivate)); + } + + static void + gsd_account_manager_init (GsdAccountManager *manager) + { + manager->priv = GSD_ACCOUNT_MANAGER_GET_PRIVATE (manager); + } + + static void + gsd_account_manager_finalize (GObject *object) + { + GsdAccountManager *manager; + + g_return_if_fail (object != NULL); +-- +2.21.0 + diff --git a/SOURCES/0004-account-don-t-poll-more-frequently-than-notification.patch b/SOURCES/0004-account-don-t-poll-more-frequently-than-notification.patch new file mode 100644 index 0000000..48708dd --- /dev/null +++ b/SOURCES/0004-account-don-t-poll-more-frequently-than-notification.patch @@ -0,0 +1,110 @@ +From ff98c03c88e53041dcc861de3b3a3351d55297fe Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Fri, 9 Nov 2018 10:39:11 -0500 +Subject: [PATCH 4/4] account: don't poll more frequently than notification + period + +At the moment, if an account has no reason to receive a notification, +the account plugin ends up polling continuously, desperately, +and unsuccessfully trying to find a reason to notify. That leads +to unnecessary CPU utilization. + +The reason is an apparent think-o in the code. The code tracks +the last time a notification was shown, so it knows when to show +the next notification later, even if the notification period, or +account policy is updated by the admin in the interim. + +The problem is that it's wrong to look at the last notification +time if there's no reason to show a notification. In that case +the wakeup is merely to poll updates on the account policy. + +This commit addresses the problem by only looking at the previous +notification time, if it was within the current notification period. +--- + plugins/account/gsd-account-manager.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/plugins/account/gsd-account-manager.c b/plugins/account/gsd-account-manager.c +index ff054edd..b48c0fe8 100644 +--- a/plugins/account/gsd-account-manager.c ++++ b/plugins/account/gsd-account-manager.c +@@ -207,65 +207,73 @@ out: + } + + static gboolean + set_policy_number (gint64 *destination, + gint64 source) + { + if (*destination == source) + return FALSE; + + *destination = source; + return TRUE; + } + + static gboolean + on_notify_period_elapsed (GsdAccountManager *manager) + { + manager->priv->notify_period_timeout_id = 0; + fetch_password_expiration_policy (manager); + return G_SOURCE_REMOVE; + } + + static void + queue_periodic_timeout (GsdAccountManager *manager) + { + if (manager->priv->notify_period_timeout_id != 0) { + g_source_remove (manager->priv->notify_period_timeout_id); + manager->priv->notify_period_timeout_id = 0; + } + + if (manager->priv->notify_period > 0) { +- gint64 already_elapsed_time; ++ gint64 seconds_since_last_notification; ++ guint seconds_between_notifications; ++ guint seconds_until_next_notification; + +- already_elapsed_time = MAX (0, (g_get_monotonic_time () - manager->priv->last_notify_time) / G_USEC_PER_SEC); ++ seconds_since_last_notification = MAX (0, (g_get_monotonic_time () - manager->priv->last_notify_time) / G_USEC_PER_SEC); ++ seconds_between_notifications = manager->priv->notify_period * 60; + +- manager->priv->notify_period_timeout_id = g_timeout_add_seconds (MAX (0, manager->priv->notify_period * 60 - already_elapsed_time), ++ if (seconds_since_last_notification > seconds_between_notifications) ++ seconds_until_next_notification = seconds_between_notifications; ++ else ++ seconds_until_next_notification = seconds_between_notifications - seconds_since_last_notification; ++ ++ manager->priv->notify_period_timeout_id = g_timeout_add_seconds (seconds_until_next_notification, + (GSourceFunc) on_notify_period_elapsed, + manager); + } + } + + static void + on_got_password_expiration_policy (GsdAccountsUser *accounts_user_proxy, + GAsyncResult *res, + gpointer user_data) + { + GsdAccountManager *manager = user_data; + g_autoptr(GError) error = NULL; + gboolean succeeded; + gint64 expiration_time; + gint64 last_change_time; + gint64 min_days_between_changes; + gint64 max_days_between_changes; + gint64 days_to_warn; + gint64 days_after_expiration_until_lock; + + gnome_settings_profile_start (NULL); + succeeded = gsd_accounts_user_call_get_password_expiration_policy_finish (accounts_user_proxy, + &expiration_time, + &last_change_time, + &min_days_between_changes, + &max_days_between_changes, + &days_to_warn, + &days_after_expiration_until_lock, + res, + &error); +-- +2.21.0 + diff --git a/SOURCES/org.gnome.settings-daemon.plugins.power.gschema.override b/SOURCES/org.gnome.settings-daemon.plugins.power.gschema.override new file mode 100644 index 0000000..17c223f --- /dev/null +++ b/SOURCES/org.gnome.settings-daemon.plugins.power.gschema.override @@ -0,0 +1,3 @@ +[org.gnome.settings-daemon.plugins.power] +sleep-inactive-ac-timeout=0 +sleep-inactive-battery-timeout=0 diff --git a/SPECS/gnome-settings-daemon.spec b/SPECS/gnome-settings-daemon.spec new file mode 100644 index 0000000..c389739 --- /dev/null +++ b/SPECS/gnome-settings-daemon.spec @@ -0,0 +1,1422 @@ +%global glib2_version 2.56 +%global geocode_glib_version 3.10.0 +%global gnome_desktop_version 3.27.90 +%global gsettings_desktop_schemas_version 3.32.0-4 +%global gtk3_version 3.15.3 +%global libgweather_version 3.9.5 +%global geoclue_version 2.3.1 + +Name: gnome-settings-daemon +Version: 3.32.0 +Release: 11%{?dist} +Summary: The daemon sharing settings from GNOME to GTK+/KDE applications + +License: GPLv2+ +URL: https://download.gnome.org/sources/%{name} +Source0: https://download.gnome.org/sources/%{name}/3.32/%{name}-%{version}.tar.xz +Source1: org.gnome.settings-daemon.plugins.power.gschema.override + +BuildRequires: meson >= 0.44.0 +BuildRequires: gcc +BuildRequires: cups-devel +BuildRequires: gettext +BuildRequires: perl-interpreter +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(colord) >= 1.0.2 +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(geoclue-2.0) >= %{geoclue_version} +BuildRequires: pkgconfig(geocode-glib-1.0) >= %{geocode_glib_version} +BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(gnome-desktop-3.0) >= %{gnome_desktop_version} +BuildRequires: pkgconfig(gsettings-desktop-schemas) >= %{gsettings_desktop_schemas_version} +BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version} +BuildRequires: pkgconfig(gudev-1.0) +BuildRequires: pkgconfig(gweather-3.0) >= %{libgweather_version} +BuildRequires: pkgconfig(lcms2) >= 2.2 +BuildRequires: pkgconfig(libcanberra-gtk3) +BuildRequires: pkgconfig(libgeoclue-2.0) +BuildRequires: pkgconfig(libnm) +BuildRequires: pkgconfig(libnotify) +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(libpulse-mainloop-glib) +BuildRequires: pkgconfig(librsvg-2.0) +BuildRequires: pkgconfig(nss) +BuildRequires: pkgconfig(polkit-gobject-1) +BuildRequires: pkgconfig(upower-glib) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xi) +BuildRequires: pkgconfig(wayland-client) +%ifnarch s390 s390x +BuildRequires: pkgconfig(libwacom) >= 0.7 +BuildRequires: pkgconfig(xorg-wacom) +%endif + +Requires: colord +Requires: iio-sensor-proxy +Requires: geoclue2 >= %{geoclue_version} +Requires: geocode-glib%{?_isa} >= %{geocode_glib_version} +Requires: glib2%{?_isa} >= %{glib2_version} +Requires: gnome-desktop3%{?_isa} >= %{gnome_desktop_version} +Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas_version} +Requires: gtk3%{?_isa} >= %{gtk3_version} +Requires: libgweather%{?_isa} >= %{libgweather_version} + +Obsoletes: %{name}-updates < 3.13.1 +Obsoletes: drwright < 3.5.0-3 +Obsoletes: gnome-settings-daemon-devel < 3.23.1 + +# The "org.gnome.SettingsDaemon.A11yKeyboard" has been been removed, now +# handled in gnome-shell/mutter instead; this conflict here makes sure not to +# break older gdm and gnome-session releases that expect the functionality +Conflicts: gdm < 1:3.27.90 +Conflicts: gnome-session < 3.27.90 +# The orientation and xrandr plugins were removed in 3.25.4 and their +# functionality was moved to mutter; this conflict here makes sure not to break +# older gdm, gnome-session and gnome-shell releases that expect the functionality +Conflicts: gnome-shell < 3.25.4 + +Patch00001: 0001-account-first-cut-at-account-plugin.patch +Patch00002: 0002-account-reshow-the-notification-when-screen-unlocks.patch +Patch00003: 0003-account-display-nag-screen-periodically.patch +Patch00004: 0004-account-don-t-poll-more-frequently-than-notification.patch +Patch00005: 0001-smartcard-Cancel-cancellable-when-stopping.patch +Patch00006: 0001-xsettings-Add-an-entry-for-the-overlay-scrolling-set.patch + +Patch10001: 0001-housekeeping-Add-a-GPU-memory-usage-notification.patch + +%description +A daemon to share settings from GNOME to other applications. It also +handles global keybindings, as well as a number of desktop-wide settings. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%setup -q + +%patch00001 -p 1 +%patch00002 -p 1 +%patch00003 -p 1 +%patch00004 -p 1 +%patch00005 -p 1 +%patch00006 -p 1 + +%patch10001 -p 1 + + +%build +%meson +%meson_build + +%install +%meson_install + +cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas + +%find_lang %{name} --with-gnome + +mkdir $RPM_BUILD_ROOT%{_libdir}/gnome-settings-daemon-3.0/gtk-modules + +%files -f %{name}.lang +%license COPYING +%doc AUTHORS NEWS + +# list daemons explicitly, so we notice if one goes missing +# some of these don't have a separate gschema +%{_libexecdir}/gsd-account +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Account.desktop +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.account.gschema.xml + +%{_libexecdir}/gsd-clipboard +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Clipboard.desktop + +%{_libexecdir}/gsd-datetime +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Datetime.desktop + +%{_libexecdir}/gsd-dummy + +%{_libexecdir}/gsd-housekeeping +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Housekeeping.desktop +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.housekeeping.gschema.xml + +%{_libexecdir}/gsd-keyboard +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Keyboard.desktop + +%{_libexecdir}/gsd-media-keys +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.MediaKeys.desktop +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.media-keys.gschema.xml + +%{_libexecdir}/gsd-mouse +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Mouse.desktop +%{_libexecdir}/gsd-locate-pointer + +%{_libexecdir}/gsd-backlight-helper +%{_datadir}/polkit-1/actions/org.gnome.settings-daemon.plugins.power.policy +%{_libexecdir}/gsd-power +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Power.desktop +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.override + +%{_libexecdir}/gsd-print-notifications +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.PrintNotifications.desktop +%{_libexecdir}/gsd-printer + +%{_libexecdir}/gsd-rfkill +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Rfkill.desktop + +%{_libexecdir}/gsd-screensaver-proxy +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.ScreensaverProxy.desktop + +%{_libexecdir}/gsd-smartcard +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Smartcard.desktop + +%{_libexecdir}/gsd-sound +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Sound.desktop + +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.peripherals.gschema.xml +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.peripherals.wacom.gschema.xml +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Wacom.desktop + +%ifnarch s390 s390x +%{_libexecdir}/gsd-wacom +%{_libexecdir}/gsd-wacom-led-helper +%{_libexecdir}/gsd-wacom-oled-helper +%{_datadir}/polkit-1/actions/org.gnome.settings-daemon.plugins.wacom.policy +%endif + +%{_libexecdir}/gsd-xsettings +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.XSettings.desktop +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.xsettings.gschema.xml + +%{_libexecdir}/gsd-a11y-settings +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.A11ySettings.desktop + +%{_libexecdir}/gsd-color +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Color.desktop +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.color.gschema.xml + +%{_libexecdir}/gsd-sharing +%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Sharing.desktop +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.sharing.gschema.xml + +%{_libdir}/gnome-settings-daemon-3.0/libgsd.so + +/usr/lib/udev/rules.d/*.rules +%{_datadir}/gnome-settings-daemon/ +%{_datadir}/GConf/gsettings/gnome-settings-daemon.convert + +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.enums.xml +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.gschema.xml + +%files devel +%{_includedir}/gnome-settings-daemon-3.0 +%{_libdir}/pkgconfig/gnome-settings-daemon.pc + +%changelog +* Wed Sep 02 2020 Ray Strode - 3.32.0-11 +- Remove subman plugin for now + Resolves: #1872457 + +* Thu Aug 13 2020 Carl George - 3.32.0-10 +- Disable subman plugin on CentOS + Resolves: #1827030 + +* Fri Nov 22 2019 Benjamin Otte - 3.32.0-9 +- Update gsettings-deskto-schemas dependency for new setting + Resolves: #1775683, #1723462 + +* Thu Nov 21 2019 Benjamin Otte - 3.32.0-8 +- Add upstream setting for overlay scrolling + Resolves: #1723462 + +* Mon Nov 18 2019 Kalev Lember - 3.32.0-7 +- Add a new plugin to provide system subscription information +- Resolves: #1720249 + +* Mon Nov 04 2019 Marek Kasik - 3.32.0-6 +- Initialize a variable from previous commit. +- Previous commit made it possible to use uninitialized variable. +- Detected by Coverity. +- Related: #1742710 + +* Mon Nov 04 2019 Marek Kasik - 3.32.0-5 +- Cancel cancellable when stopping smartcard plugin to avoid crash +- Resolves: #1742710 + +* Tue Jul 09 2019 Richard Hughes - 3.32.0-4 +- Remove the subman plugin -- move to a 8.2 feature instead. +- Resolves: #1720249 + +* Mon Jun 17 2019 Richard Hughes - 3.32.0-3 +- Add a new plugin to provide system subscription information +- Resolves: #1720249 + +* Mon Jun 10 2019 Ray Strode - 3.32.0-2 +- Add dropped patches + Related: #1674382 + +* Thu May 23 2019 Florian Müllner - 3.32.0-1 +- Update to 3.32.0 + Resolves: #1698929 + +* Mon Jan 14 2019 Carlos Garnacho - 3.28.1-2 +- Enable IBus for OSK purposes, necessary for focus tracking + Resolves: #1626105 + +* Thu Apr 12 2018 Kalev Lember - 3.28.1-1 +- Update to 3.28.1 + +* Tue Apr 10 2018 Michael Catanzaro - 3.28.0-2 +- Disable automatic suspend + +* Mon Mar 12 2018 Kalev Lember - 3.28.0-1 +- Update to 3.28.0 + +* Mon Mar 05 2018 Kalev Lember - 3.27.92-1 +- Update to 3.27.92 + +* Fri Mar 02 2018 Kalev Lember - 3.27.91-1 +- Update to 3.27.91 + +* Sat Feb 10 2018 Bastien Nocera - 3.27.90-4 ++ gnome-settings-daemon-3.27.90-4 +- Rebuild against newer gnome-desktop3 package + +* Fri Feb 09 2018 Bastien Nocera - 3.27.90-3 ++ gnome-settings-daemon-3.27.90-3 +- Really fix gsd-* helper linkage +- Build fix for highly parallel builds + +* Wed Feb 07 2018 Kalev Lember - 3.27.90-2 +- Fix missing libcommon.so library + +* Tue Feb 06 2018 Kalev Lember - 3.27.90-1 +- Update to 3.27.90 +- Switch to meson build system + +* Mon Feb 05 2018 Kalev Lember - 3.26.2-5 +- Rebuilt for libgweather soname bump + +* Sat Jan 20 2018 Björn Esser - 3.26.2-4 +- Rebuilt for switch to libxcrypt + +* Fri Jan 12 2018 Bastien Nocera - 3.26.2-3 +- Fix gdm session trying to change the backlight, resulting in a lot + of spurious error messages (#1322588) + +* Fri Jan 05 2018 Igor Gnatenko - 3.26.2-2 +- Remove obsolete scriptlets + +* Thu Nov 02 2017 Kalev Lember - 3.26.2-1 +- Update to 3.26.2 + +* Sun Oct 08 2017 Kalev Lember - 3.26.1-1 +- Update to 3.26.1 + +* Wed Sep 13 2017 Kalev Lember - 3.26.0-1 +- Update to 3.26.0 + +* Tue Sep 05 2017 Kalev Lember - 3.25.92-1 +- Update to 3.25.92 + +* Thu Aug 24 2017 Kalev Lember - 3.25.91-1 +- Update to 3.25.91 + +* Tue Aug 15 2017 Kalev Lember - 3.25.90-1 +- Update to 3.25.90 + +* Mon Jul 31 2017 Kalev Lember - 3.25.4-2 +- Add explicit conflicts to not break older gdm, gnome-session and gnome-shell + +* Mon Jul 31 2017 Kalev Lember - 3.25.4-1 +- Update to 3.25.4 + +* Wed Jul 26 2017 Fedora Release Engineering - 3.25.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jun 12 2017 Kalev Lember - 3.25.2-1 +- Update to 3.25.2 + +* Wed May 10 2017 Kalev Lember - 3.24.2-1 +- Update to 3.24.2 + +* Wed Apr 12 2017 Kalev Lember - 3.24.1-1 +- Update to 3.24.1 + +* Tue Mar 21 2017 Kalev Lember - 3.24.0-1 +- Update to 3.24.0 + +* Thu Mar 16 2017 Kalev Lember - 3.23.92-1 +- Update to 3.23.92 + +* Wed Feb 15 2017 Richard Hughes - 3.23.90-1 +- Update to 3.23.90 + +* Fri Feb 10 2017 Fedora Release Engineering - 3.23.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 12 2017 Bastien Nocera - 3.23.3-1 ++ gnome-settings-daemon-3.23.3-1 +- Update to 3.23.3 + +* Tue Oct 11 2016 Bastien Nocera - 3.23.2-1 ++ gnome-settings-daemon-3.23.2-1 +- Update to 3.23.2 + +* Thu Sep 22 2016 Kalev Lember - 3.22.0-1 +- Update to 3.22.0 + +* Wed Sep 14 2016 Kalev Lember - 3.21.92.1-1 +- Update to 3.21.92.1 + +* Wed Sep 14 2016 Kalev Lember - 3.21.92-1 +- Update to 3.21.92 +- Don't set group tags + +* Fri Aug 26 2016 Kalev Lember - 3.21.90-1 +- Update to 3.21.90 + +* Sun Apr 17 2016 Bastien Nocera - 3.20.1-3 +- Fix crasher in newly enabled audio device selection dialogue + +* Sun Apr 17 2016 Bastien Nocera - 3.20.1-2 +- Require alsa to enable the audio device selection dialogue + +* Wed Apr 13 2016 Kalev Lember - 3.20.1-1 +- Update to 3.20.1 + +* Tue Mar 22 2016 Kalev Lember - 3.20.0-1 +- Update to 3.20.0 + +* Thu Mar 17 2016 Kalev Lember - 3.19.92-1 +- Update to 3.19.92 + +* Fri Mar 04 2016 Kalev Lember - 3.19.91-1 +- Update to 3.19.91 + +* Wed Feb 17 2016 Richard Hughes - 3.19.90-1 +- Update to 3.19.90 + +* Wed Feb 03 2016 Fedora Release Engineering - 3.19.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jan 20 2016 Kalev Lember - 3.19.5-1 +- Update to 3.19.5 + +* Thu Dec 17 2015 Kalev Lember - 3.19.4-1 +- Update to 3.19.4 + +* Tue Dec 15 2015 Kalev Lember - 3.19.3-1 +- Update to 3.19.3 + +* Tue Nov 10 2015 Kalev Lember - 3.18.2-1 +- Update to 3.18.2 + +* Mon Oct 12 2015 Kalev Lember - 3.18.1-1 +- Update to 3.18.1 + +* Mon Sep 21 2015 Kalev Lember - 3.18.0-1 +- Update to 3.18.0 + +* Mon Sep 14 2015 Kalev Lember - 3.17.92-1 +- Update to 3.17.92 + +* Mon Aug 17 2015 Kalev Lember - 3.17.90-1 +- Update to 3.17.90 +- Use make_install macro + +* Wed Jul 22 2015 David King - 3.17.3-1 +- Update to 3.17.3 +- Use pkgconfig for BuildRequires + +* Wed Jun 17 2015 Fedora Release Engineering - 3.17.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Jun 11 2015 Richard Hughes - 3.17.2-2 +- Add runtime dep on iio-sensor-proxy for the ambient light sensor + +* Fri Jun 05 2015 Kalev Lember - 3.17.2-1 +- Update to 3.17.2 + +* Tue May 12 2015 Kalev Lember - 3.16.2-1 +- Update to 3.16.2 + +* Tue Apr 14 2015 Kalev Lember - 3.16.1-1 +- Update to 3.16.1 + +* Mon Mar 23 2015 Kalev Lember - 3.16.0-1 +- Update to 3.16.0 + +* Tue Mar 17 2015 Kalev Lember - 3.15.92-1 +- Update to 3.15.92 + +* Tue Mar 03 2015 Kalev Lember - 3.15.91-1 +- Update to 3.15.91 +- Use the %%license macro for the COPYING file + +* Tue Feb 17 2015 Richard Hughes - 3.15.90-1 +- Update to 3.15.90 + +* Thu Jan 22 2015 Richard Hughes - 3.15.4-1 +- Update to 3.15.4 + +* Thu Nov 27 2014 Kalev Lember - 3.15.1-1 +- Update to 3.15.1 + +* Tue Nov 11 2014 Kalev Lember - 3.14.2-1 +- Update to 3.14.2 + +* Sat Nov 01 2014 Richard Hughes - 3.14.1-3 +- Fix compile on RHEL + +* Sun Oct 26 2014 Kalev Lember - 3.14.1-2 +- Obsolete drwright + +* Tue Oct 14 2014 Rui Matos - 3.14.1-1 +- Update to 3.14.1 + +* Mon Sep 22 2014 Kalev Lember - 3.14.0-1 +- Update to 3.14.0 + +* Tue Sep 16 2014 Kalev Lember - 3.13.92-1 +- Update to 3.13.92 + +* Wed Sep 03 2014 Kalev Lember - 3.13.91-1 +- Update to 3.13.91 + +* Mon Aug 18 2014 Kalev Lember - 3.13.90-1 +- Update to 3.13.90 + +* Sat Aug 16 2014 Fedora Release Engineering - 3.13.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Jul 23 2014 Kalev Lember - 3.13.4-1 +- Update to 3.13.4 + +* Thu Jun 26 2014 Richard Hughes - 3.13.3-1 +- Update to 3.13.3 + +* Wed Jun 25 2014 Richard Hughes - 3.13.2-1 +- Update to 3.13.2 + +* Sat Jun 07 2014 Fedora Release Engineering - 3.13.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu May 01 2014 Kalev Lember - 3.13.1-1 +- Update to 3.13.1 +- Remove and obsolete the updates plugin + +* Wed Apr 16 2014 Kalev Lember - 3.12.1-1 +- Update to 3.12.1 +- Tighten subpackage deps + +* Mon Apr 14 2014 Kalev Lember - 3.12.0.1-3 +- Drop control-center-filesystem dependency + +* Sat Apr 05 2014 Kalev Lember - 3.12.0.1-2 +- Update dep versions + +* Wed Mar 26 2014 Richard Hughes - 3.12.0.1-1 +- Update to 3.12.0.1 + +* Mon Mar 24 2014 Richard Hughes - 3.12.0-1 +- Update to 3.12.0 + +* Tue Mar 18 2014 Richard Hughes - 3.11.92-1 +- Update to 3.11.92 + +* Tue Mar 04 2014 Richard Hughes - 3.11.91-1 +- Update to 3.11.91 + +* Wed Feb 19 2014 Richard Hughes - 3.11.90-2 +- Rebuilt for gnome-desktop soname bump + +* Tue Feb 18 2014 Richard Hughes - 3.11.90-1 +- Update to 3.11.90 + +* Tue Feb 04 2014 Richard Hughes - 3.11.5-1 +- Update to 3.11.5 + +* Thu Jan 30 2014 Richard Hughes - 3.11.3-2 +- Rebuild for libpackagekit-glib soname bump + +* Tue Dec 17 2013 Richard Hughes - 3.11.3-1 +- Update to 3.11.3 + +* Mon Nov 25 2013 Richard Hughes - 3.11.2-1 +- Update to 3.11.2 + +* Thu Oct 31 2013 Florian Müllner - 3.11.1-1 +- Update to 3.11.1 + +* Mon Oct 28 2013 Richard Hughes - 3.10.1-1 +- Update to 3.10.1 + +* Fri Oct 11 2013 Richard Hughes - 3.10.0-3 +- Apply the previous patch on Fedora too. + +* Fri Oct 11 2013 Richard Hughes - 3.10.0-2 +- Grab a patch from upstream to fix the multiple notifications about updates. +- Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1009132 + +* Tue Sep 24 2013 Kalev Lember - 3.10.0-1 +- Update to 3.10.0 + +* Wed Sep 18 2013 Kalev Lember - 3.9.92-1 +- Update to 3.9.92 + +* Tue Sep 17 2013 Richard Hughes - 3.9.91.1-2 +- Grab a patch from upstream so that the offline updates feature can + actually work when reboot returns with success. + +* Tue Sep 03 2013 Matthias Clasen - 3.9.91.1-1 +- Update to 3.9.91.1 + +* Tue Sep 03 2013 Kalev Lember - 3.9.91-1 +- Update to 3.9.91 +- Include the new datetime plugin + +* Fri Aug 23 2013 Kalev Lember - 3.9.90-2 +- Keep middle click paste enabled for now + +* Thu Aug 22 2013 Kalev Lember - 3.9.90-1 +- Update to 3.9.90 + +* Fri Aug 09 2013 Kalev Lember - 3.9.5-1 +- Update to 3.9.5 +- Remove empty /etc/gnome-settings-daemon directory +- Install new rfkill plugin and add back the smartcard plugin + +* Tue Jul 30 2013 Richard Hughes - 3.9.3-3 +- Rebuild for colord soname bump + +* Mon Jul 22 2013 Bastien Nocera 3.9.3-2 +- Remove obsolete GStreamer 0.10 BRs + +* Thu Jun 20 2013 Kalev Lember - 3.9.3-1 +- Update to 3.9.3 + +* Sun Jun 02 2013 Kalev Lember - 3.9.2-1 +- Update to 3.9.2 +- Drop the ibus-kkc-libpinyin patch; the hardcoded input sources + list is gone from g-s-d +- Set the minimum required gnome-desktop3 version + +* Tue May 14 2013 Richard Hughes - 3.8.2-1 +- Update to 3.8.2 + +* Thu May 9 2013 Jens Petersen - 3.8.1-2 +- default ibus engine in Fedora is now kkc for Japanese + and libpinyin for Chinese (#948117) + +* Tue Apr 16 2013 Richard Hughes - 3.8.1-1 +- Update to 3.8.1 + +* Tue Mar 26 2013 Richard Hughes - 3.8.0-1 +- Update to 3.8.0 + +* Tue Mar 19 2013 Matthias Clasen - 3.7.92-1 +- Update to 3.7.92 + +* Tue Mar 5 2013 Matthias Clasen - 3.7.91-1 +- Update to 3.7.91 + +* Wed Feb 20 2013 Richard Hughes - 3.7.90-1 +- Update to 3.7.90 + +* Thu Feb 07 2013 Richard Hughes - 3.7.5.1-1 +- Update to 3.7.5.1 + +* Wed Feb 06 2013 Debarshi Ray - 3.7.5-2 +- Bump the gtk3 BuildRequires + +* Tue Feb 05 2013 Richard Hughes - 3.7.5-1 +- Update to 3.7.5 + +* Wed Jan 16 2013 Richard Hughes - 3.7.4-1 +- Update to 3.7.4 + +* Mon Dec 31 2012 Dan Horák - 3.7.3-2 +- fix filelist for s390(x) (and ppc/ppc64 in RHEL) + +* Thu Dec 20 2012 Kalev Lember - 3.7.3-1 +- Update to 3.7.3 +- Adjust the spec file for the (temporarly) disabled smartcard plugin + +* Tue Nov 20 2012 Richard Hughes - 3.7.1-1 +- Update to 3.7.1 +- Remove upstreamed patches + +* Wed Nov 14 2012 Kalev Lember - 3.6.3-1 +- Update to 3.6.3 +- Drop the static man page patch and BR docbook-style-xsl instead + +* Thu Nov 08 2012 Bastien Nocera 3.6.2-1 +- Update to 3.6.2 + +* Thu Oct 18 2012 Matthias Clasen - 3.6.1-3 +- Fix a typo in the suspend patch (#858259) + +* Mon Oct 08 2012 Dan Horák - 3.6.1-2 +- fix build on s390(x) + +* Mon Oct 08 2012 Bastien Nocera 3.6.1-1 +- Update to 3.6.1 + +* Fri Oct 5 2012 Olivier Fourdan - 3.6.0-5 +- Adds Wacom OSD window from upstream bug #679062 + +* Wed Oct 3 2012 Matthias Clasen - 3.6.0-4 +- Fix an inhibitor leak in the previous patch + +* Tue Oct 2 2012 Matthias Clasen - 3.6.0-3 +- Fix lid close handling with new systemd + +* Fri Sep 28 2012 Peter Robinson - 3.6.0-2 +- Split out PackageKit into a sub package. Fixes #699348 + +* Tue Sep 25 2012 Richard Hughes - 3.6.0-1 +- Update to 3.6.0 + +* Wed Sep 19 2012 Richard Hughes - 3.5.92-1 +- Update to 3.5.92 + +* Wed Sep 05 2012 Cosimo Cecchi - 3.5.91-1 +- Update to 3.5.91 + +* Wed Aug 22 2012 Richard Hughes - 3.5.90-1 +- Update to 3.5.90 + +* Tue Aug 21 2012 Richard Hughes - 3.5.6-1 +- Update to 3.5.6 + +* Fri Jul 27 2012 Fedora Release Engineering - 3.5.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 24 2012 Dan Horák - 3.5.5-3 +- fix build without wacom + +* Thu Jul 19 2012 Matthias Clasen - 3.5.5-2 +- Fix the updates plugin to load + +* Thu Jul 19 2012 Matthias Clasen - 3.5.5-1 +- Update to 3.5.5 + +* Tue Jul 17 2012 Dan Horák - 3.5.4-3 +- fix build on s390(x) - cherry-picked from f17 branch +- allow build without wacom on ppc/ppc64 + +* Tue Jul 17 2012 Matthias Clasen - 3.5.4-2 +- Rebuild against new PackageKit + +* Wed Jun 27 2012 Richard Hughes - 3.5.4-1 +- Update to 3.5.4 + +* Tue Jun 26 2012 Richard Hughes - 3.5.3-1 +- Update to 3.5.3 + +* Thu Jun 14 2012 Matthias Clasen - 3.5.2-4 +- Drop calculator patch, no longer needed + +* Thu Jun 07 2012 Matthias Clasen - 3.5.2-3 +- Fix file lists + +* Thu Jun 07 2012 Richard Hughes - 3.5.2-2 +- Add missing BR + +* Wed Jun 06 2012 Richard Hughes - 3.5.2-1 +- Update to 3.5.2 + +* Fri May 18 2012 Richard Hughes - 3.4.2-1 +- Update to 3.4.2 + +* Mon Apr 16 2012 Richard Hughes - 3.4.1-1 +- Update to 3.4.1 + +* Mon Mar 26 2012 Richard Hughes - 3.4.0-1 +- New upstream version. + +* Tue Mar 20 2012 Richard Hughes 3.3.92-1 +- Update to 3.3.92 + +* Mon Mar 05 2012 Bastien Nocera 3.3.91-1 +- Update to 3.3.91 + +* Wed Feb 22 2012 Bastien Nocera 3.3.90.1-1 +- Update to 3.3.90.1 + +* Thu Feb 9 2012 Matthias Clasen 3.3.5-2 +- Use systemd for session tracking + +* Tue Feb 7 2012 Matthias Clasen 3.3.5-1 +- Update to 3.3.5 + +* Fri Jan 20 2012 Matthias Clasen 3.3.4-2 +- Some crash fixes + +* Tue Jan 17 2012 Bastien Nocera 3.3.4-1 +- Update to 3.3.4 + +* Fri Jan 13 2012 Fedora Release Engineering - 3.3.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Dec 27 2011 Matthias Clasen - 3.3.3.1-2 +- Fix a path problem in the gnome-settings-daemon autostart file + +* Fri Dec 23 2011 Matthias Clasen - 3.3.3.1-1 +- Update to 3.3.3.1 + +* Wed Dec 21 2011 Matthias Clasen - 3.3.3-1 +- Update to 3.3.3 + +* Wed Nov 23 2011 Matthias Clasen - 3.3.2-1 +- Update to 3.3.2 + +* Fri Nov 11 2011 Bastien Nocera 3.2.2-1 +- Update to 3.2.2 + +* Wed Oct 26 2011 Fedora Release Engineering - 3.2.1-4 +- Rebuilt for glibc bug#747377 + +* Tue Oct 25 2011 Marek Kasik - 3.2.1-3 +- Fix a typo in registration of an object on DBus (#747318) + +* Mon Oct 24 2011 Matthias Clasen - 3.2.1-2 +- Fix calculator keybinding (#745367) + +* Mon Oct 17 2011 Bastien Nocera 3.2.1-1 +- Update to 3.2.1 + +* Wed Oct 12 2011 Adam Williamson - 3.2.0-2 +- backport some greatest hits from git to stop the same bugs being + reported over and over (all will be in 3.2.1) + +* Tue Sep 27 2011 Ray - 3.2.0-1 +- Update to 3.2.0 + +* Tue Sep 20 2011 Matthias Clasen - 3.1.92-1 +- Update to 3.1.92 + +* Tue Sep 6 2011 Matthias Clasen - 3.1.91-1 +- Update to 3.1.91 + +* Tue Jul 26 2011 Cosimo Cecchi - 3.1.4-2 +- Add a patch to make the fallback mounter to build correctly +- Include the new power plugin + +* Mon Jul 25 2011 Matthias Clasen - 3.1.4-1 +- Update to 3.1.4 + +* Fri Jul 22 2011 Tomas Bzatek - 3.1.3-2 +- Add support for chrony (#723212) + +* Mon Jul 04 2011 Bastien Nocera 3.1.3-1 +- Update to 3.1.3 + +* Tue Jun 21 2011 Tomas Bzatek - 3.1.2-2 +- Fix fortify fail in gsd-color-manager.c (#714625) + +* Wed Jun 15 2011 Tomas Bzatek - 3.1.2-1 +- Update to 3.1.2 + +* Wed Jun 15 2011 Bastien Nocera 3.1.1-3 +- Rebuild for new gnome-desktop3 libs + +* Mon Jun 13 2011 Marek Kasik 3.1.1-2 +- Remove requirement of system-config-printer-udev (#704381) + +* Wed May 11 2011 Tomas Bzatek - 3.1.1-1 +- Update to 3.1.1 + +* Sat May 07 2011 Christopher Aillon - 3.0.1-5 +- Update gsettings schema scriptlet + +* Mon May 2 2011 Matthias Clasen 3.0.1-4 +- Try to fix a crash (#698533) + +* Thu Apr 28 2011 Bastien Nocera 3.0.1-2 +- Fix setting ntpd usage with SystemD + +* Tue Apr 26 2011 Bastien Nocera 3.0.1-1 +- Update to 3.0.1 + +* Wed Apr 06 2011 Bastien Nocera 3.0.0.1-1 +- Update to 3.0.0.1 + +* Mon Apr 04 2011 Bastien Nocera 3.0.0-1 +- Update to 3.0.0 + +* Wed Mar 30 2011 Marek Kasik 2.91.93-2 +- Make CUPS' subscriptions expirable + +* Fri Mar 25 2011 Bastien Nocera 2.91.93-1 +- Update to 2.91.93 + +* Mon Mar 21 2011 Matthias Clasen 2.91.92-1 +- Update 2.91.92 + +* Wed Mar 16 2011 Richard Hughes 2.91.91-3 +- Add a patch from upstream to fix the updates plugin. + +* Fri Mar 11 2011 Bastien Nocera 2.91.91-2 +- Add libXxf86misc-devel requires so that key repeat/delay works + +* Tue Mar 08 2011 Bastien Nocera 2.91.91-1 +- Update to 2.91.91 + +* Fri Feb 25 2011 Matthias Clasen - 2.91.90-4 +- Fix undefined symbols in the updates plugin + +* Wed Feb 23 2011 Matthias Clasen - 2.91.90-3 +- BR PackageKit and cups +- Explicitly list plugins so we notice if they go missing + +* Wed Feb 23 2011 Cosimo Cecchi - 2.91.90-2 +- Include an upstream patch to fix a possible crasher + +* Tue Feb 22 2011 Matthias Clasen 2.91.90-1 +- Update to 2.91.90 + +* Wed Feb 16 2011 Bastien Nocera 2.91.9-6 +- Fix crasher when media keys GSettings value changes + +* Sun Feb 13 2011 Christopher Aillon - 2.91.9-5 +- Rebuild for new libxklavier + +* Fri Feb 11 2011 Matthias Clasen 2.91.9-4 +- Rebuild against newer gtk + +* Tue Feb 08 2011 Fedora Release Engineering - 2.91.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Feb 08 2011 Bastien Nocera 2.91.9-2 +- Fix setting timezones in the date & time panel (#674999) + +* Wed Feb 2 2011 Matthias Clasen 2.91.9-1 +- 2.91.9 + +* Tue Jan 11 2011 Matthias Clasen 2.91.8-1 +- 2.91.8 + +* Tue Jan 11 2011 Matthias Clasen 2.91.7-2 +- Own %%{_libdir}/gnome-settings-daemon-3.0/gtk-modules + +* Mon Jan 10 2011 Matthias Clasen 2.91.7-1 +- Update to 2.91.7 + +* Sat Jan 8 2011 Matthias Clasen 2.91.6.2-1 +- Update to 2.91.6.2 + +* Fri Dec 3 2010 Matthias Clasen 2.91.5.1-1 +- Update to 2.91.5.1 + +* Thu Dec 2 2010 Dan Williams - 2.91.5-4 +- Re-add patch handling org.gnome.media-handling gsettings schema rename + +* Wed Dec 1 2010 Dan Williams - 2.91.5-3 +- Fix various cases of forgetting to draw the background + +* Tue Nov 30 2010 Owen Taylor - 2.91.5-2 +- Add a patch handling org.gnome.media-handling gsettings schema rename + +* Tue Nov 30 2010 Tomas Bzatek 2.91.5-1 +- Update to 2.91.5 + +* Fri Nov 26 2010 Bastien Nocera 2.91.4-2 +- Fix crasher on startup + +* Thu Nov 25 2010 Bastien Nocera 2.91.4-1 +- Update to 2.91.4 + +* Wed Nov 17 2010 Richard Hughes 2.91.3-1 +- Update to 2.91.3 + +* Wed Nov 10 2010 Bastien Nocera 2.91.2.1-0.4. +- Update to 2.91.2.1 + +* Wed Nov 3 2010 Matthias Clasen 2.91.2-0.4.20101102 +- Rebuild against new libnotify + +* Tue Nov 2 2010 Matthias Clasen 2.91.2-0.3.20101102 +- Make theme changing work + +* Tue Nov 02 2010 Richard Hughes 2.91.2-0.2.20101102 +- Add BR gsettings-desktop-schemas-devel + +* Tue Nov 02 2010 Richard Hughes 2.91.2-0.1.20101102 +- Update to a git snapshot to fix rawhide. + +* Wed Oct 06 2010 Richard Hughes 2.91.0-3 +- Fix the pkgconfig file manually + +* Wed Oct 06 2010 Richard Hughes 2.91.0-2 +- Rebuild against the new libgnomekbd library + +* Mon Oct 4 2010 Matthias Clasen - 2.91.0-1 +- Update to 2.91.0 + +* Wed Sep 29 2010 jkeating - 2.90.1-2 +- Rebuilt for gcc bug 634757 + +* Wed Sep 22 2010 Bastien Nocera 2.90.1-1 +- Update to 2.90.1 + +* Tue Aug 31 2010 Matthias Clasen 2.31.91-1 +- Update to 2.31.91 + +* Fri Aug 27 2010 Matthias Clasen 2.31.6-2 +- Fix a problem with warning bubbles in virtual machines (#624624) + +* Tue Aug 3 2010 Matthias Clasen 2.31.6-1 +- Update to 2.31.6 + +* Tue Jul 13 2010 Matthias Clasen 2.31.5.1-1 +- Update to 2.31.5.1 + +* Mon Jul 12 2010 Matthias Clasen 2.31.5-1 +- Update to 2.31.5 + +* Wed Jun 30 2010 Matthias Clasen 2.31.4.2-1 +- Update to 2.31.4.2 + +* Tue Jun 29 2010 Matthias Clasen 2.31.4.1-1 +- Update to 2.31.4.1 + +* Tue Jun 29 2010 Matthias Clasen 2.31.4-1 +- Update to 2.31.4 + +* Mon Jun 28 2010 Bastien Nocera 2.31.3-3 +- Don't remove the sound plugin if we want the caches to be + updated + +* Tue Jun 8 2010 Matthias Clasen 2.31.3-1 +- Update to 2.31.3 + +* Thu May 27 2010 Matthias Clasen 2.31.2-1 +- Update to 2.31.2 + +* Sun May 16 2010 Matthias Clasen 2.31.1-1 +- Update to 2.31.1 + +* Fri Apr 30 2010 Matthias Clasen 2.30.1-4 +- Waah, one more mistake in these macros + +* Tue Apr 27 2010 Matthias Clasen 2.30.1-3 +- Nobody understands macro processors... + +* Tue Apr 27 2010 Matthias Clasen 2.30.1-2 +- Fix a typo + +* Mon Apr 26 2010 Matthias Clasen 2.30.1-1 +- Update to 2.30.1 +- Spec file cleanups + +* Mon Mar 29 2010 Matthias Clasen 2.30.0-1 +- Update to 2.30.0 + +* Mon Mar 22 2010 Bastien Nocera 2.29.92-3 +- Disable the font plugin by default + +* Wed Mar 10 2010 Bastien Nocera 2.29.92-2 +- Remove unneeded icons, already upstream + +* Tue Mar 09 2010 Bastien Nocera 2.29.92-1 +- Update to 2.29.92 + +* Sat Feb 27 2010 Matthias Clasen 2.29.91.1-2 +- Fix Fn-F8 OSD icon +- Modernize scriptlets + +* Wed Feb 24 2010 Matthias Clasen 2.29.91.1-1 +- Update to 2.29.91.1 + +* Wed Feb 17 2010 Matthias Clasen 2.29.90-2 +- Set a name for the keyboard statusicon + +* Wed Feb 10 2010 Tomas Bzatek 2.29.90-1 +- Update to 2.29.90 + +* Tue Jan 26 2010 Matthias Clasen 2.29.6-1 +- Update to 2.29.6 + +* Fri Dec 18 2009 Matthias Clasen 2.28.1-10 +- Avoid warning messages from the OSD code + +* Tue Dec 15 2009 Matthias Clasen 2.28.1-9 +- Survive when running without XKB (#547780) + +* Thu Nov 12 2009 Matthias Clasen 2.28.1-8 +- Avoid a 'whitespace leak' around the display statusicon (gnome #601696) + +* Mon Nov 9 2009 Matthias Clasen 2.28.1-7 +- React to screen changes when showing the background (gnome #601203) + +* Thu Nov 05 2009 Bastien Nocera 2.28.1-6 +- Fix the volume going over 100% in the OSD + +* Wed Oct 28 2009 Bastien Nocera 2.28.1-5 +- Update OSD code again + +* Tue Oct 27 2009 Bastien Nocera 2.28.1-4 +- Fix bluriness in OSD + +* Mon Oct 26 2009 Matthias Clasen - 2.28.1-3 +- Change default font rendering to use slight hinting + +* Mon Oct 26 2009 Peter Hutterer 2.28.1-2 +- left-handed-touchpad.patch: change physical touchpad buttons to + left-handed, not tapping though (#498249) + +* Mon Oct 19 2009 Matthias Clasen - 2.28.1-1 +- Update to 2.28.1 + +* Thu Oct 1 2009 Matthias Clasen - 2.28.0-4 +- Fix keyboard variant handling + +* Fri Sep 25 2009 Matthias Clasen - 2.28.0-3 +- Align the OSD visuals with the notification theme + +* Tue Sep 22 2009 Adam Jackson 2.28.0-2 +- BuildRequires: libcanberra-devel + +* Mon Sep 21 2009 Matthias Clasen - 2.28.0-1 +- Update to 2.28.0 + +* Wed Sep 09 2009 Bastien Nocera 2.27.92-2 +- Update left-hand touchpad patch + +* Mon Sep 7 2009 Matthias Clasen - 2.27.92-1 +- Update to 2.27.92 + +* Sun Aug 30 2009 Matthias Clasen - 2.27.91-3 +- Make 'Locate Pointer' work with metacity again + +* Wed Aug 26 2009 Peter Hutterer 2.27.91-2 +- buttonmapping.patch: Don't check for IsXExtensionDevice, only skip button + mappings for core devices instead (#502129). + +* Mon Aug 24 2009 Bastien Nocera 2.27.91-1 +- Update to 2.27.91 + +* Fri Aug 14 2009 Bastien Nocera 2.27.90-2 +- Update gnome-volume-control code + +* Fri Aug 14 2009 Bastien Nocera 2.27.90-1 +- Update to 2.27.90 + +* Tue Jul 28 2009 Matthias Clasen 2.27.5-1 +- Update to 2.27.5 + +* Fri Jul 24 2009 Fedora Release Engineering - 2.27.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Jul 21 2009 Matthias Clasen 2.27.4-3 +- Make locate-pointer not interfere with media keys + +* Wed Jul 15 2009 Matthias Clasen 2.27.4-2 +- Rebuild against new libgnomekbd + +* Tue Jul 14 2009 Matthias Clasen 2.27.4-1 +- Update ot 2.27.4 + +* Tue Jun 30 2009 Matthias Clasen 2.27.3-2 +- Rebuild against new libxklavier + +* Tue Jun 16 2009 Matthias Clasen 2.27.3-1 +- Update to 2.27.3 + +* Mon Jun 8 2009 Matthias Clasen 2.27.1-2 +- Make the 'locate pointer' effect cope with changing compositing + managers + +* Sat May 16 2009 Matthias Clasen 2.27.1-1 +- Update to 2.27.1 + +* Fri May 08 2009 Bastien Nocera 2.26.1-4 +- Remove useless patch, see: +http://bugzilla.gnome.org/show_bug.cgi?id=580761 for details + +* Wed Apr 29 2009 Bastien Nocera 2.26.1-3 +- Don't set touchpads to be left-handed, otherwise the tap + behaves like the 2nd mouse button (#483639) + +* Mon Apr 27 2009 Matthias Clasen - 2.26.1-2 +- Don't drop schemas translations from po files + +* Tue Apr 14 2009 Matthias Clasen - 2.26.1-1 +- Update to 2.26.1 + +* Wed Apr 8 2009 Matthias Clasen - 2.26.0-2 +- Support touchpads + +* Mon Mar 16 2009 Matthias Clasen - 2.26.0-1 +- Update to 2.26.0 + +* Mon Mar 2 2009 Matthias Clasen - 2.25.92-1 +- Update to 2.25.92 + +* Tue Feb 24 2009 Fedora Release Engineering - 2.25.90-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Feb 5 2009 Matthias Clasen - 2.25.90-2 +- Fix a warning (#484132) + +* Wed Feb 4 2009 Matthias Clasen - 2.25.90-1 +- Update to 2.25.90 + +* Mon Jan 19 2009 - Ray Strode - 2.25.3-4 +- Update fade patch for new gnome-desktop release + +* Thu Dec 18 2008 - Bastien Nocera - 2.25.3-3 +- Rebuild + +* Thu Dec 18 2008 - Ray Strode - 2.25.3-2 +- Drop touchpad patch for now + +* Thu Dec 18 2008 - Bastien Nocera - 2.25.3-1 +- Update to 2.25.3 + +* Thu Dec 18 2008 - Bastien Nocera - 2.25.2-11 +- Fix touchpad patches + +* Wed Dec 17 2008 Matthias Clasen - 2.25.2-10 +- Rebuild against new gnome-desktop + +* Wed Dec 10 2008 Ray Strode - 2.25.2-9 +- Don't call SetPointerMapping when using Xinput since + it duplicates effort but gets touchpads wrong (bug 324721) + +* Wed Dec 10 2008 Ray Strode - 2.25.2-8 +- Shutdown cleanly when bus goes away (bug 445898 again) + +* Wed Dec 10 2008 Ray Strode - 2.25.2-7 +- Don't map touch pad tap to right-click for left-handed + users (bug 324721) + +* Wed Dec 10 2008 Ray Strode - 2.25.2-6 +- Listen for DeviceAdded signals when configuring mouse + (in addition to DeviceEnabled). This may help with + bug 474758. + +* Tue Dec 9 2008 Ray Strode - 2.25.2-5 +- Shutdown cleanly on TERM signal (bug 445898) + +* Sun Dec 7 2008 Behdad Esfahbod - 2.25.2-4 +- Add gnome-settings-daemon-2.24.1-umask.patch + +* Thu Dec 4 2008 Ray Strode - 2.25.2-2 +- Rebase fade patch to apply with Behdad's updates to + g-s-d + +* Wed Dec 3 2008 Matthias Clasen - 2.25.2-1 +- Ypdate to 2.25.2 + +* Thu Nov 13 2008 Matthias Clasen - 2.25.1-4 +- Rebuild + +* Wed Nov 12 2008 Matthias Clasen - 2.25.1-2 +- Update to 2.25.1 + +* Fri Oct 24 2008 Ray Strode - 2.24.0-14 +- At fontconfig-devel buildrequires (bug 468304) + +* Wed Oct 15 2008 Matthias Clasen - 2.24.0-13 +- Save some space + +* Tue Oct 14 2008 Ray Strode - 2.24.0-12 +- Hold off on settings-daemon fade if nautilus is going to do + it anyway. + +* Tue Oct 14 2008 Matthias Clasen - 2.24.0-11 +- Show the shutdown dialog when the power button is pressed + +* Tue Oct 14 2008 Matthias Clasen - 2.24.0-9 +- Drop a patch that is no longer needed with the evdev ruleset + in xkeyboard-config + +* Sun Oct 12 2008 Matthias Clasen - 2.24.0-7 +- Try harder not to override peoples configured keyboard layouts + +* Sun Oct 12 2008 Ray Strode - 2.24.0-6 +- Update fade patch to skip crossfade when changing frames in + slideshow background. + +* Fri Oct 10 2008 Matthias Clasen - 2.24.0-5 +- Fix the picking up of the gdm keyboard layout even more + +* Tue Sep 30 2008 Matthias Clasen - 2.24.0-3 +- Fix the picking up of the gdm keyboard layout + +* Sun Sep 28 2008 Ray Strode - 2.24.0-2 +- Don't draw background twice at startup + +* Tue Sep 23 2008 Matthias Clasen - 2.24.0-1 +- Update to 2.24.0 + +* Thu Sep 18 2008 Ray Strode - 2.23.92-3 +- When switching desktop backgrounds fade between them + +* Thu Sep 11 2008 Soren Sandmann - 2.23.92-2 +- Fix various bugs in the fn-F7 support + +* Mon Sep 8 2008 Matthias Clasen - 2.23.92-1 +- Update to 2.23.92 + +* Fri Sep 5 2008 Matthias Clasen - 2.23.91-5 +- Try harder to use the keyboard layout that gdm tells us + +* Thu Sep 04 2008 Soren Sandmann - 2.23.91-4 +- Use the fn-F7 key, not the F7 key. + +* Wed Sep 03 2008 Soren Sandmann - 2.23.91-3 +- Bump gnome-desktop requirement + +* Wed Sep 03 2008 Soren Sandmann - 2.23.91-2 +- Add patch to do fn-f7 cycling + +* Mon Sep 01 2008 - Bastien Nocera - 2.23.91-1 +- Update to 2.23.91 + +* Thu Aug 28 2008 Jon McCann - 2.23.91-0.2008.08.28.2 +- BuildRequires libnotify-devel + +* Thu Aug 28 2008 Jon McCann - 2.23.91-0.2008.08.28.1 +- Update to snapshot + +* Fri Aug 22 2008 Matthias Clasen - 2.23.90-1 +- Update to 2.23.90 + +* Thu Aug 14 2008 Lennart Poettering - 2.23.6-3 +- Rerun autotools after patching configure.ac + +* Thu Aug 14 2008 Lennart Poettering - 2.23.6-2 +- Apply patch from gnome bug 545386. This hasn't been accepted in this form yet + by upstream, will however very likely be merged in a similar form. +- Disable esd/sounds module since we don't need it to start PA anymore + +* Tue Aug 5 2008 Matthias Clasen - 2.23.6-1 +- Update to 2.23.6 + +* Fri Jul 25 2008 Matthias Clasen - 2.23.5-3 +- Use standard icon names in the volume OSD + +* Fri Jul 25 2008 - Bastien Nocera - 2.23.5-2 +- Fix build, call gtk-update-icon-cache as required + +* Thu Jul 24 2008 Soren Sandmann - 2.23.5-1 +- Update to 2.23.5 + +* Wed Jun 18 2008 Matthias Clasen - 2.23.4-1 +- Update to 2.23.4 + +* Tue Jun 17 2008 Colin Walters - 2.23.3-2 +- Add (now upstreamed) patch to legacy ESD preference; see + http://bugzilla.gnome.org/show_bug.cgi?id=533198 + https://bugzilla.redhat.com/show_bug.cgi?id=430624 + +* Wed Jun 4 2008 Matthias Clasen - 2.23.3-1 +- Update to 2.23.3 + +* Wed May 14 2008 Matthias Clasen - 2.23.2-0.2008.05.14.2 +- Fix BuildRequires + +* Wed May 14 2008 Jon McCann - 2.23.2-0.2008.05.14.1 +- Build snapshot + +* Tue May 13 2008 Matthias Clasen - 2.23.1-1-5 +- Rebuild + +* Mon May 5 2008 Matthias Clasen - 2.23.1-1-4 +- Pick up the keyboard layout from the login screen + +* Mon May 5 2008 Matthias Clasen - 2.23.1-1-3 +- Fix background drawing without nautilus + +* Tue Apr 29 2008 - Bastien Nocera - 2.23.1.1-2 +- Add patch from upstream to avoid the Stop button triggering an Eject (#346201) + +* Fri Apr 25 2008 Matthias Clasen - 2.23.1.1-1 +- Update to 2.23.1.1 + +* Tue Apr 22 2008 Matthias Clasen - 2.22.1-2008.03.26.6 +- Make the xrandr plugin survive the absence of Xrandr + +* Sat Apr 5 2008 - Soren Sandmann - 2.22.1-2008.03.26.5 +- Update randr plugin + +* Mon Mar 31 2008 - Ray Strode - 2.22.1-0.2008.03.26.4 +- Over the releases we've accumulated default.png, default-wide.png default-5_4.png + and default.jpg. We haven't been able to drop them because it would leave some + users with white backgrounds on upgrade. This patch just falls back to the + default image if the user's background doesn't exist. + +* Wed Mar 26 2008 - Bastien Nocera - 2.22.1-0.2008.03.26.3 +- Add patch for the mouse plugin not to eat multimedia key events (#438942) + +* Wed Mar 26 2008 Jon McCann - 2.22.1-0.2008.03.26.2 +- Rebuild + +* Wed Mar 26 2008 Jon McCann - 2.22.1-0.2008.03.26.1 +- Update to snapshot +- Enable profiling + +* Wed Mar 26 2008 - Bastien Nocera - 2.22.0-3 +- apps_gnome_settings_daemon_default_editor.schemas is obsolete (#438937) + +* Thu Mar 20 2008 Matthias Clasen 2.22.0-2 +- Fix interaction between "Locate Pointer" and volume keys + +* Mon Mar 10 2008 Matthias Clasen 2.22.0-1 +- Update to 2.22.0 + +* Sun Mar 9 2008 Ray Strode - 2.21.92-3 +- Don't set keyboard model on startup from gconf if evdev is being used. + Evdev needs to use its own keyboard model to work right. + +* Sun Mar 2 2008 Soren Sandmann - 2.21.92-2 +- Update randr patch to handle video key + +* Fri Feb 29 2008 Jon McCann - 2.21.92-1 +- Update to 2.21.92 + +* Tue Feb 12 2008 Soren Sandmann - 2.21.91-3 +- Add patch to make the xrandr plugin listen for client messages from + the control panel and reread the configuration file. + +* Mon Feb 11 2008 Matthias Clasen - 2.21.91-2 +- Remove obsolete control-center translations + +* Mon Feb 11 2008 - Bastien Nocera - 2.21.91-1 +- Update to 2.21.91 +- Remove obsolete patches + +* Thu Feb 7 2008 Matthias Clasen - 2.21.90.1-3 +- Load xkb settings initially + +* Thu Jan 31 2008 - Bastien Nocera - 2.21.90.1-2 +- Fix the path for g-s-d, from upstream patch + +* Tue Jan 29 2008 - Bastien Nocera - 2.21.90.1-1 +- Update to 2.21.90.1 + +* Tue Jan 29 2008 - Bastien Nocera - 2.21.90-1 +- Update to 2.21.90 + +* Tue Jan 15 2008 Matthias Clasen - 2.21.5.2-2 +- Incorporate review feedback (#428833) + +* Tue Jan 15 2008 Matthias Clasen - 2.21.5.2-1 +- Update to 2.21.5.2 + +* Tue Jan 15 2008 Matthias Clasen - 2.21.5.1-1 +- Update to 2.21.5.1 +- Fix up BuildRequires + +* Thu Dec 06 2007 - Bastien Nocera - 2.21.5-1 +- First package +