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 const char kGetInactivityDelaysMethod[] = "GetInactivityDelays";
     43 // Signals emitted by powerd.
     44 const char kBrightnessChangedSignal[] = "BrightnessChanged";
     45 const char kKeyboardBrightnessChangedSignal[] = "KeyboardBrightnessChanged";
     46 const char kPeripheralBatteryStatusSignal[] = "PeripheralBatteryStatus";
     47 const char kPowerSupplyPollSignal[] = "PowerSupplyPoll";
     48 const char kSuspendImminentSignal[] = "SuspendImminent";
     49 const char kDarkSuspendImminentSignal[] = "DarkSuspendImminent";
     50 const char kSuspendDoneSignal[] = "SuspendDone";
     51 const char kInputEventSignal[] = "InputEvent";
     52 const char kIdleActionImminentSignal[] = "IdleActionImminent";
     53 const char kIdleActionDeferredSignal[] = "IdleActionDeferred";
     54 const char kScreenIdleStateChangedSignal[] = "ScreenIdleStateChanged";
     55 const char kInactivityDelaysChangedSignal[] = "InactivityDelaysChanged";
     56 // Values
     57 const int kBrightnessTransitionGradual = 1;
     58 const int kBrightnessTransitionInstant = 2;
     59 enum UserActivityType {
     60   USER_ACTIVITY_OTHER = 0,
     61   USER_ACTIVITY_BRIGHTNESS_UP_KEY_PRESS = 1,
     62   USER_ACTIVITY_BRIGHTNESS_DOWN_KEY_PRESS = 2,
     63   USER_ACTIVITY_VOLUME_UP_KEY_PRESS = 3,
     64   USER_ACTIVITY_VOLUME_DOWN_KEY_PRESS = 4,
     65   USER_ACTIVITY_VOLUME_MUTE_KEY_PRESS = 5,
     66 };
     67 enum RequestRestartReason {
     68   // An explicit user request (e.g. clicking a button).
     69   REQUEST_RESTART_FOR_USER = 0,
     70   // A system update.
     71   REQUEST_RESTART_FOR_UPDATE = 1,
     72   // Some other reason.
     73   REQUEST_RESTART_OTHER = 2,
     74 };
     75 enum RequestShutdownReason {
     76   // An explicit user request (e.g. clicking a button).
     77   REQUEST_SHUTDOWN_FOR_USER = 0,
     78   // Some other reason.
     79   REQUEST_SHUTDOWN_OTHER = 1,
     80 };
     81 }  // namespace power_manager
     82 
     83 #endif  // SYSTEM_API_DBUS_POWER_MANAGER_DBUS_CONSTANTS_H_
     84