|
| 1 | +// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd. |
| 2 | +// |
| 3 | +// SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 | + |
| 5 | +#pragma once |
| 6 | + |
| 7 | +namespace PowerDConfig { |
| 8 | + inline constexpr auto kAppId = "org.deepin.dde.daemon"; |
| 9 | + inline constexpr auto kPowerName = "org.deepin.dde.daemon.power"; |
| 10 | + |
| 11 | + inline constexpr auto kLinePowerScreensaverDelay = "linePowerScreensaverDelay"; |
| 12 | + inline constexpr auto kLinePowerScreenBlackDelay = "linePowerScreenBlackDelay"; |
| 13 | + inline constexpr auto kLinePowerSleepDelay = "linePowerSleepDelay"; |
| 14 | + inline constexpr auto kLinePowerLockDelay = "linePowerLockDelay"; |
| 15 | + inline constexpr auto kLinePowerLidClosedAction = "linePowerLidClosedAction"; |
| 16 | + inline constexpr auto kLinePowerPressPowerButton = "linePowerPressPowerButton"; |
| 17 | + |
| 18 | + inline constexpr auto kBatteryScreensaverDelay = "batteryScreensaverDelay"; |
| 19 | + inline constexpr auto kBatteryScreenBlackDelay = "batteryScreenBlackDelay"; |
| 20 | + inline constexpr auto kBatterySleepDelay = "batterySleepDelay"; |
| 21 | + inline constexpr auto kBatteryLockDelay = "batteryLockDelay"; |
| 22 | + inline constexpr auto kBatteryLidClosedAction = "batteryLidClosedAction"; |
| 23 | + inline constexpr auto kBatteryPressPowerButton = "batteryPressPowerButton"; |
| 24 | + |
| 25 | + inline constexpr auto kScreenBlackLock = "screenBlackLock"; |
| 26 | + inline constexpr auto kSleepLock = "sleepLock"; |
| 27 | + inline constexpr auto kPowerButtonPressedExec = "powerButtonPressedExec"; |
| 28 | + |
| 29 | + inline constexpr auto kLowPowerNotifyEnable = "lowPowerNotifyEnable"; |
| 30 | + inline constexpr auto kLowPowerNotifyThreshold = "lowPowerNotifyThreshold"; |
| 31 | + inline constexpr auto kUsePercentageForPolicy = "usePercentageForPolicy"; |
| 32 | + inline constexpr auto kPercentageAction = "percentageAction"; |
| 33 | + inline constexpr auto kTimeToEmptyLow = "timeToEmptyLow"; |
| 34 | + inline constexpr auto kTimeToEmptyDanger = "timeToEmptyDanger"; |
| 35 | + inline constexpr auto kTimeToEmptyCritical = "timeToEmptyCritical"; |
| 36 | + inline constexpr auto kTimeToEmptyAction = "timeToEmptyAction"; |
| 37 | + inline constexpr auto kLowPowerAction = "lowPowerAction"; |
| 38 | + inline constexpr auto kPowerSavingModeBrightnessDropPercent = "powerSavingModeBrightnessDropPercent"; |
| 39 | + inline constexpr auto kPowerSavingModeEnabled = "powerSavingModeEnabled"; |
| 40 | + inline constexpr auto kPowerSavingModeAuto = "powerSavingModeAuto"; |
| 41 | + inline constexpr auto kPowerSavingModeAutoWhenBatteryLow = "powerSavingModeAutoWhenBatteryLow"; |
| 42 | + inline constexpr auto kPowerSavingModeAutoBatteryPercent = "powerSavingModeAutoBatteryPercent"; |
| 43 | + inline constexpr auto kLastMode = "lastMode"; |
| 44 | + inline constexpr auto kMode = "mode"; |
| 45 | + inline constexpr auto kAdjustBrightnessEnabled = "adjustBrightnessEnabled"; |
| 46 | + inline constexpr auto kHighPerformanceEnabled = "highPerformanceEnabled"; |
| 47 | + inline constexpr auto kAmbientLightAdjustBrightness = "ambientLightAdjustBrightness"; |
| 48 | + |
| 49 | + inline constexpr auto kScheduledShutdownState = "scheduledShutdownState"; |
| 50 | + inline constexpr auto kShutdownTime = "shutdownTime"; |
| 51 | + inline constexpr auto kShutdownRepetition = "shutdownRepetition"; |
| 52 | + inline constexpr auto kCustomShutdownWeekDays = "customShutdownWeekDays"; |
| 53 | + inline constexpr auto kShutdownCountdown = "shutdownCountdown"; |
| 54 | + inline constexpr auto kNextShutdownTime = "nextShutdownTime"; |
| 55 | +} |
| 56 | + |
| 57 | +namespace PowerDBus { |
| 58 | + inline constexpr auto kService = "org.deepin.dde.Power1"; |
| 59 | + inline constexpr auto kPath = "/org/deepin/dde/Power1"; |
| 60 | + inline constexpr auto kInterface = "org.deepin.dde.Power1"; |
| 61 | + |
| 62 | + inline constexpr auto kLogin1Service = "org.freedesktop.login1"; |
| 63 | + inline constexpr auto kLogin1Path = "/org/freedesktop/login1"; |
| 64 | + inline constexpr auto kLogin1Manager = "org.freedesktop.login1.Manager"; |
| 65 | + inline constexpr auto kLogin1Session = "org.freedesktop.login1.Session"; |
| 66 | + |
| 67 | + inline constexpr auto kSessionManager = "org.deepin.dde.SessionManager1"; |
| 68 | + inline constexpr auto kSessionPath = "/org/deepin/dde/SessionManager1"; |
| 69 | + |
| 70 | + inline constexpr auto kSessionWatcher = "org.deepin.dde.SessionWatcher1"; |
| 71 | + inline constexpr auto kSessionWatcherPath = "/org/deepin/dde/SessionWatcher1"; |
| 72 | + |
| 73 | + inline constexpr auto kDaemonService = "org.deepin.dde.Daemon1"; |
| 74 | + inline constexpr auto kDaemonPath = "/org/deepin/dde/Daemon1"; |
| 75 | + |
| 76 | + inline constexpr auto kLockFront = "org.deepin.dde.LockFront1"; |
| 77 | + inline constexpr auto kLockFrontPath = "/org/deepin/dde/LockFront1"; |
| 78 | + |
| 79 | + inline constexpr auto kShutdownFront = "org.deepin.dde.ShutdownFront1"; |
| 80 | + inline constexpr auto kShutdownPath = "/org/deepin/dde/ShutdownFront1"; |
| 81 | + |
| 82 | + inline constexpr auto kScreensaver = "com.deepin.ScreenSaver"; |
| 83 | + inline constexpr auto kScreensaverPath = "/com/deepin/ScreenSaver"; |
| 84 | + |
| 85 | + inline constexpr auto kDisplay = "org.deepin.dde.Display1"; |
| 86 | + inline constexpr auto kDisplayPath = "/org/deepin/dde/Display1"; |
| 87 | + |
| 88 | + inline constexpr auto kBlackScreen = "org.deepin.dde.BlackScreen1"; |
| 89 | + inline constexpr auto kBlackScreenPath = "/org/deepin/dde/BlackScreen1"; |
| 90 | + |
| 91 | + inline constexpr auto kNotifications = "org.freedesktop.Notifications"; |
| 92 | + inline constexpr auto kNotificationsPath = "/org/freedesktop/Notifications"; |
| 93 | + |
| 94 | + inline constexpr auto kFreedesktopDBus = "org.freedesktop.DBus"; |
| 95 | + inline constexpr auto kFreedesktopPath = "/org/freedesktop/DBus"; |
| 96 | + |
| 97 | + inline constexpr auto kUPowerService = "org.freedesktop.UPower"; |
| 98 | + inline constexpr auto kUPowerPath = "/org/freedesktop/UPower"; |
| 99 | + |
| 100 | + inline constexpr auto kCalendarService = "com.deepin.dataserver.Calendar"; |
| 101 | + inline constexpr auto kCalendarPath = "/com/deepin/dataserver/Calendar/HuangLi"; |
| 102 | + inline constexpr auto kCalendarIface = "com.deepin.dataserver.Calendar.HuangLi"; |
| 103 | +} |
| 104 | + |
| 105 | +namespace PowerFS { |
| 106 | + inline constexpr auto kCpuSysfsDir = "/sys/devices/system/cpu"; |
| 107 | + inline constexpr auto kCpuGovernorFmt = "/sys/devices/system/cpu/%1/cpufreq/scaling_governor"; |
| 108 | + inline constexpr auto kCpuBoostPath = "/sys/devices/system/cpu/cpufreq/boost"; |
| 109 | + inline constexpr auto kLidStatePath = "/proc/acpi/button/lid/LID/state"; |
| 110 | + inline constexpr auto kDpmsStateFile = "/tmp/dpms-state"; |
| 111 | + inline constexpr auto kNoSuspendFile = "/etc/deepin/no_suspend"; |
| 112 | + inline constexpr auto kLowPowerCmd = "/usr/lib/deepin-daemon/dde-lowpower"; |
| 113 | +} |
0 commit comments