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
This commit is contained in:
Marco Trevisan (Treviño) 2025-02-07 00:32:55 +01:00
parent f5eb3fd716
commit 236abac6fb
2 changed files with 5 additions and 5 deletions

View File

@ -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.

View File

@ -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,