[vlc-commits] dbus_screensaver: correct service name for o.fd.PowerManagement.Inhibit
Rémi Denis-Courmont
git at videolan.org
Fri Dec 7 21:26:04 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Dec 7 22:25:47 2012 +0200| [beec9e78518b56e7f4db897b55b5e0d46ae61bf8] | committer: Rémi Denis-Courmont
dbus_screensaver: correct service name for o.fd.PowerManagement.Inhibit
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=beec9e78518b56e7f4db897b55b5e0d46ae61bf8
---
modules/misc/inhibit/dbus.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/modules/misc/inhibit/dbus.c b/modules/misc/inhibit/dbus.c
index ffb0e57..2c8d6d4 100644
--- a/modules/misc/inhibit/dbus.c
+++ b/modules/misc/inhibit/dbus.c
@@ -45,10 +45,11 @@ enum vlc_inhibit_api
#define MAX_API (GNOME+1)
-static const char dbus_service[][32] =
+/* Currently, all services have identical service and interface names. */
+static const char dbus_service[][40] =
{
[FDO_SS] = "org.freedesktop.ScreenSaver",
- [FDO_PM] = "org.freedesktop.PowerManagement",
+ [FDO_PM] = "org.freedesktop.PowerManagement.Inhibit",
[GNOME] = "org.gnome.SessionManager",
};
@@ -59,13 +60,6 @@ static const char dbus_path[][33] =
[GNOME] = "/org/gnome/SessionManager",
};
-static const char dbus_interface[][40] =
-{
- [FDO_SS] = "org.freedesktop.ScreenSaver",
- [FDO_PM] = "org.freedesktop.PowerManagement.Inhibit",
- [GNOME] = "org.gnome.SessionManager",
-};
-
static const char dbus_method_uninhibit[][10] =
{
[FDO_SS] = "UnInhibit",
@@ -121,7 +115,7 @@ static void Inhibit(vlc_inhibit_t *ih, unsigned flags)
dbus_bool_t ret;
DBusMessage *msg = dbus_message_new_method_call(dbus_service[type],
- dbus_path[type], dbus_interface[type], method);
+ dbus_path[type], dbus_service[type], method);
if (unlikely(msg == NULL))
return;
More information about the vlc-commits
mailing list