Home | History | Annotate | Download | only in power_manager
      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 kIgnoreNextPowerButtonPressMethod[] = "IgnoreNextPowerButtonPress";
     41 const char kRecordDarkResumeWakeReasonMethod[] = "RecordDarkResumeWakeReason";
     42 // Signals emitted by powerd.
     43 const char kBrightnessChangedSignal[] = "BrightnessChanged";
     44 const char kKeyboardBrightnessChangedSignal[] = "KeyboardBrightnessChanged";
     45 const char kPeripheralBatteryStatusSignal[] = "PeripheralBatteryStatus";
     46 const char kPowerSupplyPollSignal[] = "PowerSupplyPoll";
     47 const char kSuspendImminentSignal[] = "SuspendImminent";
     48 const char kDarkSuspendImminentSignal[] = "DarkSuspendImminent";
     49 const char kSuspendDoneSignal[] = "SuspendDone";
     50 const char kInputEventSignal[] = "InputEvent";
     51 const char kIdleActionImminentSignal[] = "IdleActionImminent";
     52 const char kIdleActionDeferredSignal[] = "IdleActionDeferred";
     53 // Values
     54 const int kBrightnessTransitionGradual = 1;
     55 const int kBrightnessTransitionInstant = 2;
     56 enum UserActivityType {
     57   USER_ACTIVITY_OTHER = 0,
     58   USER_ACTIVITY_BRIGHTNESS_UP_KEY_PRESS = 1,
     59   USER_ACTIVITY_BRIGHTNESS_DOWN_KEY_PRESS = 2,
     60   USER_ACTIVITY_VOLUME_UP_KEY_PRESS = 3,
     61   USER_ACTIVITY_VOLUME_DOWN_KEY_PRESS = 4,
     62   USER_ACTIVITY_VOLUME_MUTE_KEY_PRESS = 5,
     63 };
     64 enum RequestRestartReason {
     65   REQUEST_RESTART_FOR_USER = 0,
     66   REQUEST_RESTART_FOR_UPDATE = 1,
     67 };
     68 }  // namespace power_manager
     69 
     70 #endif  // SYSTEM_API_DBUS_POWER_MANAGER_DBUS_CONSTANTS_H_
     71