From 236abac6fb5f46d1280d73d9ce89ff0948b18aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 7 Feb 2025 00:32:55 +0100 Subject: [PATCH] gio/powerprofilemonitordbus: Use newer DBus API Since some time the power-profiles-daemon project has been moved under the upower umbrella and renamed its API to follow that. While the legacy name is still supported, there are plans to not support it anymore in future [2]. So let's update GLib code to use the current main name instead. [1] https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/148 [2] https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/166 --- docs/reference/gio/overview.md | 4 ++-- gio/gpowerprofilemonitordbus.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/reference/gio/overview.md b/docs/reference/gio/overview.md index 89859f490..f8c03863a 100644 --- a/docs/reference/gio/overview.md +++ b/docs/reference/gio/overview.md @@ -445,5 +445,5 @@ The following extension points are currently defined by GIO: implementations for power usage monitoring. Implementations of this extension point must implement the [iface@Gio.PowerProfileMonitor] interface. GIO contains implementations of this extension point that use the - `net.hadess.PowerProfiles` D-Bus interface and the desktop portal for - this functionality. + `org.freedesktop.UPower.PowerProfiles` D-Bus interface and the desktop portal + for this functionality. diff --git a/gio/gpowerprofilemonitordbus.c b/gio/gpowerprofilemonitordbus.c index ac6f8a88c..7357d9e57 100644 --- a/gio/gpowerprofilemonitordbus.c +++ b/gio/gpowerprofilemonitordbus.c @@ -54,9 +54,9 @@ typedef enum PROP_POWER_SAVER_ENABLED = 1, } GPowerProfileMonitorDBusProperty; -#define POWERPROFILES_DBUS_NAME "net.hadess.PowerProfiles" -#define POWERPROFILES_DBUS_IFACE "net.hadess.PowerProfiles" -#define POWERPROFILES_DBUS_PATH "/net/hadess/PowerProfiles" +#define POWERPROFILES_DBUS_NAME "org.freedesktop.UPower.PowerProfiles" +#define POWERPROFILES_DBUS_IFACE "org.freedesktop.UPower.PowerProfiles" +#define POWERPROFILES_DBUS_PATH "/org/freedesktop/UPower/PowerProfiles" G_DEFINE_TYPE_WITH_CODE (GPowerProfileMonitorDBus, g_power_profile_monitor_dbus, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,