David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 The Chromium OS Authors. All rights reserved. |
| 3 | * Use of this source code is governed by a BSD-style license that can be |
| 4 | * found in the LICENSE file. |
| 5 | */ |
| 6 | |
| 7 | #ifndef DBUS_INTERFACE_H_ |
| 8 | #define DBUS_INTERFACE_H_ |
| 9 | |
| 10 | /* Minimal set of power manager constants copied from |
| 11 | platform/system_api/dbus/service_constants.h which are C++ |
| 12 | header file so we can't use it in our code directly */ |
| 13 | |
| 14 | static const char kPowerManagerInterface[] = "org.chromium.PowerManager"; |
| 15 | static const char kPowerManagerServicePath[] = "/org/chromium/PowerManager"; |
| 16 | static const char kPowerManagerServiceName[] = "org.chromium.PowerManager"; |
| 17 | /* Methods exposed by powerd. */ |
| 18 | static const char kDecreaseScreenBrightnessMethod[] = "DecreaseScreenBrightness"; |
| 19 | static const char kIncreaseScreenBrightnessMethod[] = "IncreaseScreenBrightness"; |
| 20 | static const char kHandleUserActivityMethod[] = "HandleUserActivity"; |
| 21 | /* Values */ |
| 22 | static const int kBrightnessTransitionGradual = 1; |
| 23 | static const int kBrightnessTransitionInstant = 2; |
| 24 | enum UserActivityType { |
Stéphane Marchesin | c3274ab | 2015-12-14 16:57:30 -0800 | [diff] [blame] | 25 | USER_ACTIVITY_OTHER = 0, |
| 26 | USER_ACTIVITY_BRIGHTNESS_UP_KEY_PRESS = 1, |
| 27 | USER_ACTIVITY_BRIGHTNESS_DOWN_KEY_PRESS = 2, |
| 28 | USER_ACTIVITY_VOLUME_UP_KEY_PRESS = 3, |
| 29 | USER_ACTIVITY_VOLUME_DOWN_KEY_PRESS = 4, |
| 30 | USER_ACTIVITY_VOLUME_MUTE_KEY_PRESS = 5, |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
Dominik Behr | 1883c04 | 2016-04-27 12:31:02 -0700 | [diff] [blame] | 33 | static const char kSuspendDoneSignal[] = "SuspendDone"; |
| 34 | static const char kSuspendDoneRule[] = "interface='org.chromium.PowerManager',type='signal'"; |
| 35 | |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 36 | static const char kSessionManagerInterface[] = "org.chromium.SessionManagerInterface"; |
| 37 | static const char kSessionManagerServicePath[] = "/org/chromium/SessionManager"; |
| 38 | static const char kSessionManagerServiceName[] = "org.chromium.SessionManager"; |
| 39 | |
| 40 | static const char kLoginPromptVisibleSignal[] = "LoginPromptVisible"; |
Dominik Behr | 46c567f | 2016-03-08 15:11:48 -0800 | [diff] [blame] | 41 | static const char kLoginPromptVisibleRule[] = "interface='org.chromium.SessionManagerInterface',type='signal'"; |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 42 | |
Lann Martin | 059fe66 | 2017-07-24 15:22:39 -0600 | [diff] [blame] | 43 | static const char kDisplayServiceName[] = "org.chromium.DisplayService"; |
| 44 | static const char kDisplayServicePath[] = "/org/chromium/DisplayService"; |
| 45 | static const char kDisplayServiceInterface[] = |
| 46 | "org.chromium.DisplayServiceInterface"; |
| 47 | static const char kTakeOwnership[] = "TakeOwnership"; |
| 48 | static const char kReleaseOwnership[] = "ReleaseOwnership"; |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 49 | |
David Sodman | 8ef2006 | 2015-01-06 09:23:40 -0800 | [diff] [blame] | 50 | static const char kFreconDbusInterface[] = "org.chromium.frecon"; |
| 51 | static const char kFreconDbusPath[] = "/org/chromium/frecon"; |
| 52 | |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 53 | #endif // FRECON_DBUS_API_H_ |