1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
// Copyright 2015 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SYSTEM_API_DBUS_POWER_MANAGER_DBUS_CONSTANTS_H_
#define SYSTEM_API_DBUS_POWER_MANAGER_DBUS_CONSTANTS_H_
namespace power_manager {
// powerd
const char kPowerManagerInterface[] = "org.chromium.PowerManager";
const char kPowerManagerServicePath[] = "/org/chromium/PowerManager";
const char kPowerManagerServiceName[] = "org.chromium.PowerManager";
// Methods exposed by powerd.
const char kSetScreenBrightnessMethod[] = "SetScreenBrightness";
const char kDecreaseScreenBrightnessMethod[] = "DecreaseScreenBrightness";
const char kIncreaseScreenBrightnessMethod[] = "IncreaseScreenBrightness";
const char kGetScreenBrightnessPercentMethod[] = "GetScreenBrightnessPercent";
const char kHasKeyboardBacklightMethod[] = "HasKeyboardBacklight";
const char kGetKeyboardBrightnessPercentMethod[] =
"GetKeyboardBrightnessPercent";
const char kSetKeyboardBrightnessMethod[] = "SetKeyboardBrightness";
const char kDecreaseKeyboardBrightnessMethod[] = "DecreaseKeyboardBrightness";
const char kIncreaseKeyboardBrightnessMethod[] = "IncreaseKeyboardBrightness";
const char kToggleKeyboardBacklightMethod[] = "ToggleKeyboardBacklight";
const char kSetKeyboardAmbientLightSensorEnabledMethod[] =
"SetKeyboardAmbientLightSensorEnabled";
const char kGetKeyboardAmbientLightSensorEnabledMethod[] =
"GetKeybardAmbientLightSensorEnabled";
const char kRequestRestartMethod[] = "RequestRestart";
const char kRequestShutdownMethod[] = "RequestShutdown";
const char kRequestSuspendMethod[] = "RequestSuspend";
const char kGetLastWakealarmMethod[] = "GetLastWakealarm";
const char kGetPowerSupplyPropertiesMethod[] = "GetPowerSupplyProperties";
const char kGetBatteryStateMethod[] = "GetBatteryState";
const char kGetSwitchStatesMethod[] = "GetSwitchStates";
const char kHandleUserActivityMethod[] = "HandleUserActivity";
const char kHandleVideoActivityMethod[] = "HandleVideoActivity";
const char kHandleWakeNotificationMethod[] = "HandleWakeNotification";
const char kSetIsProjectingMethod[] = "SetIsProjecting";
const char kSetPolicyMethod[] = "SetPolicy";
const char kSetPowerSourceMethod[] = "SetPowerSource";
const char kSetBacklightsForcedOffMethod[] = "SetBacklightsForcedOff";
const char kGetBacklightsForcedOffMethod[] = "GetBacklightsForcedOff";
const char kRegisterSuspendDelayMethod[] = "RegisterSuspendDelay";
const char kUnregisterSuspendDelayMethod[] = "UnregisterSuspendDelay";
const char kHandleSuspendReadinessMethod[] = "HandleSuspendReadiness";
const char kRegisterDarkSuspendDelayMethod[] = "RegisterDarkSuspendDelay";
const char kUnregisterDarkSuspendDelayMethod[] = "UnregisterDarkSuspendDelay";
const char kHandleDarkSuspendReadinessMethod[] = "HandleDarkSuspendReadiness";
const char kHandlePowerButtonAcknowledgmentMethod[] =
"HandlePowerButtonAcknowledgment";
const char kIgnoreNextPowerButtonPressMethod[] = "IgnoreNextPowerButtonPress";
const char kRecordDarkResumeWakeReasonMethod[] = "RecordDarkResumeWakeReason";
const char kGetInactivityDelaysMethod[] = "GetInactivityDelays";
const char kCreateArcTimersMethod[] = "CreateArcTimers";
const char kStartArcTimerMethod[] = "StartArcTimer";
const char kDeleteArcTimersMethod[] = "DeleteArcTimers";
const char kChangeWifiRegDomainMethod[] = "ChangeWifiRegDomain";
const char kGetTabletModeMethod[] = "GetTabletMode";
const char kChargeNowForAdaptiveChargingMethod[] =
"ChargeNowForAdaptiveCharging";
const char kGetChargeHistoryMethod[] = "GetChargeHistory";
const char kRefreshAllPeripheralBatteryMethod[] = "RefreshAllPeripheralBattery";
const char kGetThermalStateMethod[] = "GetThermalState";
const char kSetExternalDisplayALSBrightnessMethod[] =
"SetExternalDisplayALSBrightness";
const char kGetExternalDisplayALSBrightnessMethod[] =
"GetExternalDisplayALSBrightness";
const char kGetBatterySaverModeState[] = "GetBatterySaverModeState";
const char kSetBatterySaverModeState[] = "SetBatterySaverModeState";
const char kHasAmbientLightSensorMethod[] = "HasAmbientLightSensor";
const char kGetAmbientLightSensorEnabledMethod[] =
"GetAmbientLightSensorEnabled";
const char kSetAmbientLightSensorEnabledMethod[] =
"SetAmbientLightSensorEnabled";
// Signals emitted by powerd.
const char kScreenBrightnessChangedSignal[] = "ScreenBrightnessChanged";
const char kKeyboardBrightnessChangedSignal[] = "KeyboardBrightnessChanged";
const char kPeripheralBatteryStatusSignal[] = "PeripheralBatteryStatus";
const char kPowerSupplyPollSignal[] = "PowerSupplyPoll";
const char kBatteryStatePollSignal[] = "BatteryStatePoll";
const char kSuspendImminentSignal[] = "SuspendImminent";
const char kDarkSuspendImminentSignal[] = "DarkSuspendImminent";
const char kSuspendDoneSignal[] = "SuspendDone";
const char kInputEventSignal[] = "InputEvent";
const char kIdleActionImminentSignal[] = "IdleActionImminent";
const char kIdleActionDeferredSignal[] = "IdleActionDeferred";
const char kScreenIdleStateChangedSignal[] = "ScreenIdleStateChanged";
const char kInactivityDelaysChangedSignal[] = "InactivityDelaysChanged";
const char kAmbientColorTemperatureChangedSignal[] =
"AmbientColorTemperatureChanged";
const char kLidClosedSignal[] = "LidClosed";
const char kLidOpenedSignal[] = "LidOpened";
const char kThermalEventSignal[] = "ThermalEvent";
const char kBatterySaverModeStateChanged[] = "BatterySaverModeStateChanged";
const char kAmbientLightSensorEnabledChangedSignal[] =
"AmbientLightSensorEnabledChanged";
const char kKeyboardAmbientLightSensorEnabledChangedSignal[] =
"KeyboardAmbientLightSensorEnabledChanged";
// Values
const int kBrightnessTransitionGradual = 1;
const int kBrightnessTransitionInstant = 2;
enum UserActivityType {
USER_ACTIVITY_OTHER = 0,
USER_ACTIVITY_BRIGHTNESS_UP_KEY_PRESS = 1,
USER_ACTIVITY_BRIGHTNESS_DOWN_KEY_PRESS = 2,
USER_ACTIVITY_VOLUME_UP_KEY_PRESS = 3,
USER_ACTIVITY_VOLUME_DOWN_KEY_PRESS = 4,
USER_ACTIVITY_VOLUME_MUTE_KEY_PRESS = 5,
};
enum RequestRestartReason {
// An explicit user request (e.g. clicking a button).
REQUEST_RESTART_FOR_USER = 0,
// A system update.
REQUEST_RESTART_FOR_UPDATE = 1,
// Some other reason.
REQUEST_RESTART_OTHER = 2,
// DeviceScheduledReboot policy.
REQUEST_RESTART_SCHEDULED_REBOOT_POLICY = 3,
// Remote action reboot from the admin console.
REQUEST_RESTART_REMOTE_ACTION_REBOOT = 4,
// chrome.runtime.restart API.
REQUEST_RESTART_API = 5,
// From heartbeat service heartd.
REQUEST_RESTART_HEARTD = 6,
};
enum RequestShutdownReason {
// An explicit user request (e.g. clicking a button).
REQUEST_SHUTDOWN_FOR_USER = 0,
// Some other reason.
REQUEST_SHUTDOWN_OTHER = 1,
};
enum WifiRegDomainDbus {
WIFI_REG_DOMAIN_FCC = 0,
WIFI_REG_DOMAIN_EU = 1,
WIFI_REG_DOMAIN_REST_OF_WORLD = 2,
WIFI_REG_DOMAIN_NONE = 3,
};
enum RequestSuspendFlavor {
REQUEST_SUSPEND_DEFAULT = 0,
REQUEST_SUSPEND_TO_RAM = 1,
REQUEST_SUSPEND_TO_DISK = 2,
RESUME_FROM_DISK_PREPARE = 3,
RESUME_FROM_DISK_ABORT = 4,
};
} // namespace power_manager
#endif // SYSTEM_API_DBUS_POWER_MANAGER_DBUS_CONSTANTS_H_
|