1 // Copyright 2015 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef SYSTEM_API_DBUS_POWER_MANAGER_DBUS_CONSTANTS_H_
6 #define SYSTEM_API_DBUS_POWER_MANAGER_DBUS_CONSTANTS_H_
7 
8 namespace power_manager {
9 // powerd
10 const char kPowerManagerInterface[] = "org.chromium.PowerManager";
11 const char kPowerManagerServicePath[] = "/org/chromium/PowerManager";
12 const char kPowerManagerServiceName[] = "org.chromium.PowerManager";
13 // Methods exposed by powerd.
14 const char kDecreaseScreenBrightnessMethod[] = "DecreaseScreenBrightness";
15 const char kIncreaseScreenBrightnessMethod[] = "IncreaseScreenBrightness";
16 const char kGetScreenBrightnessPercentMethod[] = "GetScreenBrightnessPercent";
17 const char kSetScreenBrightnessPercentMethod[] = "SetScreenBrightnessPercent";
18 const char kDecreaseKeyboardBrightnessMethod[] = "DecreaseKeyboardBrightness";
19 const char kIncreaseKeyboardBrightnessMethod[] = "IncreaseKeyboardBrightness";
20 const char kRequestRestartMethod[] = "RequestRestart";
21 const char kRequestShutdownMethod[] = "RequestShutdown";
22 const char kRequestSuspendMethod[] = "RequestSuspend";
23 const char kGetPowerSupplyPropertiesMethod[] = "GetPowerSupplyProperties";
24 const char kHandleUserActivityMethod[] = "HandleUserActivity";
25 const char kHandleVideoActivityMethod[] = "HandleVideoActivity";
26 const char kSetIsProjectingMethod[] = "SetIsProjecting";
27 const char kSetPolicyMethod[] = "SetPolicy";
28 const char kSetPowerSourceMethod[] = "SetPowerSource";
29 const char kRegisterSuspendDelayMethod[] = "RegisterSuspendDelay";
30 const char kUnregisterSuspendDelayMethod[] = "UnregisterSuspendDelay";
31 const char kHandleSuspendReadinessMethod[] = "HandleSuspendReadiness";
32 const char kRegisterDarkSuspendDelayMethod[] = "RegisterDarkSuspendDelay";
33 const char kUnregisterDarkSuspendDelayMethod[] = "UnregisterDarkSuspendDelay";
34 const char kHandleDarkSuspendReadinessMethod[] = "HandleDarkSuspendReadiness";
35 const char kHandlePowerButtonAcknowledgmentMethod[] =
36     "HandlePowerButtonAcknowledgment";
37 const char kRecordDarkResumeWakeReasonMethod[] = "RecordDarkResumeWakeReason";
38 // Signals emitted by powerd.
39 const char kBrightnessChangedSignal[] = "BrightnessChanged";
40 const char kKeyboardBrightnessChangedSignal[] = "KeyboardBrightnessChanged";
41 const char kPeripheralBatteryStatusSignal[] = "PeripheralBatteryStatus";
42 const char kPowerSupplyPollSignal[] = "PowerSupplyPoll";
43 const char kSuspendImminentSignal[] = "SuspendImminent";
44 const char kDarkSuspendImminentSignal[] = "DarkSuspendImminent";
45 const char kSuspendDoneSignal[] = "SuspendDone";
46 const char kInputEventSignal[] = "InputEvent";
47 const char kIdleActionImminentSignal[] = "IdleActionImminent";
48 const char kIdleActionDeferredSignal[] = "IdleActionDeferred";
49 // Values
50 const int kBrightnessTransitionGradual = 1;
51 const int kBrightnessTransitionInstant = 2;
52 enum UserActivityType {
53   USER_ACTIVITY_OTHER = 0,
54   USER_ACTIVITY_BRIGHTNESS_UP_KEY_PRESS = 1,
55   USER_ACTIVITY_BRIGHTNESS_DOWN_KEY_PRESS = 2,
56   USER_ACTIVITY_VOLUME_UP_KEY_PRESS = 3,
57   USER_ACTIVITY_VOLUME_DOWN_KEY_PRESS = 4,
58   USER_ACTIVITY_VOLUME_MUTE_KEY_PRESS = 5,
59 };
60 enum RequestRestartReason {
61   REQUEST_RESTART_FOR_USER = 0,
62   REQUEST_RESTART_FOR_UPDATE = 1,
63 };
64 }  // namespace power_manager
65 
66 #endif  // SYSTEM_API_DBUS_POWER_MANAGER_DBUS_CONSTANTS_H_
67