• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 kGetSwitchStatesMethod[] = "GetSwitchStates";
25 const char kHandleUserActivityMethod[] = "HandleUserActivity";
26 const char kHandleVideoActivityMethod[] = "HandleVideoActivity";
27 const char kSetIsProjectingMethod[] = "SetIsProjecting";
28 const char kSetPolicyMethod[] = "SetPolicy";
29 const char kSetPowerSourceMethod[] = "SetPowerSource";
30 const char kSetBacklightsForcedOffMethod[] = "SetBacklightsForcedOff";
31 const char kGetBacklightsForcedOffMethod[] = "GetBacklightsForcedOff";
32 const char kRegisterSuspendDelayMethod[] = "RegisterSuspendDelay";
33 const char kUnregisterSuspendDelayMethod[] = "UnregisterSuspendDelay";
34 const char kHandleSuspendReadinessMethod[] = "HandleSuspendReadiness";
35 const char kRegisterDarkSuspendDelayMethod[] = "RegisterDarkSuspendDelay";
36 const char kUnregisterDarkSuspendDelayMethod[] = "UnregisterDarkSuspendDelay";
37 const char kHandleDarkSuspendReadinessMethod[] = "HandleDarkSuspendReadiness";
38 const char kHandlePowerButtonAcknowledgmentMethod[] =
39     "HandlePowerButtonAcknowledgment";
40 const char kRecordDarkResumeWakeReasonMethod[] = "RecordDarkResumeWakeReason";
41 // Signals emitted by powerd.
42 const char kBrightnessChangedSignal[] = "BrightnessChanged";
43 const char kKeyboardBrightnessChangedSignal[] = "KeyboardBrightnessChanged";
44 const char kPeripheralBatteryStatusSignal[] = "PeripheralBatteryStatus";
45 const char kPowerSupplyPollSignal[] = "PowerSupplyPoll";
46 const char kSuspendImminentSignal[] = "SuspendImminent";
47 const char kDarkSuspendImminentSignal[] = "DarkSuspendImminent";
48 const char kSuspendDoneSignal[] = "SuspendDone";
49 const char kInputEventSignal[] = "InputEvent";
50 const char kIdleActionImminentSignal[] = "IdleActionImminent";
51 const char kIdleActionDeferredSignal[] = "IdleActionDeferred";
52 // Values
53 const int kBrightnessTransitionGradual = 1;
54 const int kBrightnessTransitionInstant = 2;
55 enum UserActivityType {
56   USER_ACTIVITY_OTHER = 0,
57   USER_ACTIVITY_BRIGHTNESS_UP_KEY_PRESS = 1,
58   USER_ACTIVITY_BRIGHTNESS_DOWN_KEY_PRESS = 2,
59   USER_ACTIVITY_VOLUME_UP_KEY_PRESS = 3,
60   USER_ACTIVITY_VOLUME_DOWN_KEY_PRESS = 4,
61   USER_ACTIVITY_VOLUME_MUTE_KEY_PRESS = 5,
62 };
63 enum RequestRestartReason {
64   REQUEST_RESTART_FOR_USER = 0,
65   REQUEST_RESTART_FOR_UPDATE = 1,
66 };
67 }  // namespace power_manager
68 
69 #endif  // SYSTEM_API_DBUS_POWER_MANAGER_DBUS_CONSTANTS_H_
70