blob: fa42cb13b4dcccaea89ae230972ddbf6109690a3 [file] [log] [blame]
Alex Deymod5561a52015-09-03 23:17:52 -07001// 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
8namespace power_manager {
9// powerd
10const char kPowerManagerInterface[] = "org.chromium.PowerManager";
11const char kPowerManagerServicePath[] = "/org/chromium/PowerManager";
12const char kPowerManagerServiceName[] = "org.chromium.PowerManager";
13// Methods exposed by powerd.
14const char kDecreaseScreenBrightnessMethod[] = "DecreaseScreenBrightness";
15const char kIncreaseScreenBrightnessMethod[] = "IncreaseScreenBrightness";
16const char kGetScreenBrightnessPercentMethod[] = "GetScreenBrightnessPercent";
17const char kSetScreenBrightnessPercentMethod[] = "SetScreenBrightnessPercent";
18const char kDecreaseKeyboardBrightnessMethod[] = "DecreaseKeyboardBrightness";
19const char kIncreaseKeyboardBrightnessMethod[] = "IncreaseKeyboardBrightness";
20const char kRequestRestartMethod[] = "RequestRestart";
21const char kRequestShutdownMethod[] = "RequestShutdown";
22const char kRequestSuspendMethod[] = "RequestSuspend";
23const char kGetPowerSupplyPropertiesMethod[] = "GetPowerSupplyProperties";
24const char kHandleUserActivityMethod[] = "HandleUserActivity";
25const char kHandleVideoActivityMethod[] = "HandleVideoActivity";
26const char kSetIsProjectingMethod[] = "SetIsProjecting";
27const char kSetPolicyMethod[] = "SetPolicy";
28const char kSetPowerSourceMethod[] = "SetPowerSource";
29const char kRegisterSuspendDelayMethod[] = "RegisterSuspendDelay";
30const char kUnregisterSuspendDelayMethod[] = "UnregisterSuspendDelay";
31const char kHandleSuspendReadinessMethod[] = "HandleSuspendReadiness";
32const char kRegisterDarkSuspendDelayMethod[] = "RegisterDarkSuspendDelay";
33const char kUnregisterDarkSuspendDelayMethod[] = "UnregisterDarkSuspendDelay";
34const char kHandleDarkSuspendReadinessMethod[] = "HandleDarkSuspendReadiness";
35const char kHandlePowerButtonAcknowledgmentMethod[] =
36 "HandlePowerButtonAcknowledgment";
37const char kRecordDarkResumeWakeReasonMethod[] = "RecordDarkResumeWakeReason";
38// Signals emitted by powerd.
39const char kBrightnessChangedSignal[] = "BrightnessChanged";
40const char kKeyboardBrightnessChangedSignal[] = "KeyboardBrightnessChanged";
41const char kPeripheralBatteryStatusSignal[] = "PeripheralBatteryStatus";
42const char kPowerSupplyPollSignal[] = "PowerSupplyPoll";
43const char kSuspendImminentSignal[] = "SuspendImminent";
44const char kDarkSuspendImminentSignal[] = "DarkSuspendImminent";
45const char kSuspendDoneSignal[] = "SuspendDone";
46const char kInputEventSignal[] = "InputEvent";
47const char kIdleActionImminentSignal[] = "IdleActionImminent";
48const char kIdleActionDeferredSignal[] = "IdleActionDeferred";
49// Values
50const int kBrightnessTransitionGradual = 1;
51const int kBrightnessTransitionInstant = 2;
52enum 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};
60enum 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_