diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-07-23 22:56:36 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-07-23 22:56:36 -0500 |
commit | 909ccbc93d9fa21075cf5001887e69159e621f5d (patch) | |
tree | 1b5a563cf352c80d8be943fc421b41bb5259bf6a /src/snap.cpp | |
parent | e94fa94e3d8d3d7a9630d3e6fa94b78525ae4345 (diff) | |
download | ayatana-indicator-datetime-909ccbc93d9fa21075cf5001887e69159e621f5d.tar.gz ayatana-indicator-datetime-909ccbc93d9fa21075cf5001887e69159e621f5d.tar.bz2 ayatana-indicator-datetime-909ccbc93d9fa21075cf5001887e69159e621f5d.zip |
move the powerd and screen bus name, path, and interface strings into dbus-shared
Diffstat (limited to 'src/snap.cpp')
-rw-r--r-- | src/snap.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/snap.cpp b/src/snap.cpp index 5971c68..566dfae 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -18,6 +18,7 @@ */ #include <datetime/appointment.h> +#include <datetime/dbus-shared.h> #include <datetime/formatter.h> #include <datetime/snap.h> @@ -403,9 +404,9 @@ private: // ask powerd to keep the system awake static constexpr int32_t POWERD_SYS_STATE_ACTIVE = 1; g_dbus_connection_call (system_bus, - "com.canonical.powerd", - "/com/canonical/powerd", - "com.canonical.powerd", + BUS_POWERD_NAME, + BUS_POWERD_PATH, + BUS_POWERD_INTERFACE, "requestSysState", g_variant_new("(si)", APP_NAME, POWERD_SYS_STATE_ACTIVE), G_VARIANT_TYPE("(s)"), @@ -417,9 +418,9 @@ private: // ask unity-system-compositor to turn on the screen g_dbus_connection_call (system_bus, - "com.canonical.Unity.Screen", - "/com/canonical/Unity/Screen", - "com.canonical.Unity.Screen", + BUS_SCREEN_NAME, + BUS_SCREEN_PATH, + BUS_SCREEN_INTERFACE, "keepDisplayOn", nullptr, G_VARIANT_TYPE("(i)"), @@ -496,9 +497,9 @@ private: if (m_awake_cookie != nullptr) { g_dbus_connection_call (m_system_bus, - "com.canonical.powerd", - "/com/canonical/powerd", - "com.canonical.powerd", + BUS_POWERD_NAME, + BUS_POWERD_PATH, + BUS_POWERD_INTERFACE, "clearSysState", g_variant_new("(s)", m_awake_cookie), nullptr, @@ -519,9 +520,9 @@ private: if (m_screen_cookie != NO_SCREEN_COOKIE) { g_dbus_connection_call (m_system_bus, - "com.canonical.Unity.Screen", - "/com/canonical/Unity/Screen", - "com.canonical.Unity.Screen", + BUS_SCREEN_NAME, + BUS_SCREEN_PATH, + BUS_SCREEN_INTERFACE, "removeDisplayOnRequest", g_variant_new("(i)", m_screen_cookie), nullptr, |