summaryrefslogtreecommitdiff
path: root/src/up-backend.h
Commit message (Collapse)AuthorAgeFilesLines
* up-backend: add inhibitor lock interfaceDylan Van Assche2021-08-171-0/+3
| | | | | | | | Phones are suspended most of the time so they are not awake for > 20s to allow UPower to take action when battery is critical. Add an interface to take and release inhibitor locks which prevent the device from suspending to allow UPower to execute the critical power action.
* daemon: Remove unused test declarationsBastien Nocera2016-07-081-1/+0
| | | | All those test functions were removed in 6ba8629 and are now unused.
* daemon: release resources at shutdownPeter Wu2014-11-261-0/+1
| | | | | | | | | | This makes it easier to find real memory leaks with valgrind. After calling the up_backend_unplug functions, you cannot restart it with up_backend_coldplug since the lists are cleared. Tested with Linux only (not on *BSD; dummy compiles). https://bugs.freedesktop.org/show_bug.cgi?id=82659
* all: Add GetCriticalAction daemon methodBastien Nocera2013-10-171-0/+1
| | | | | | | | | This allows desktop front-ends to get which action will actually be taken when we hit critical battery. This is not a property as availability of actions might change over the course of the run of the system, and we didn't want to make unnecessary D-Bus calls on startup.
* daemon: Add CriticalPowerActionBastien Nocera2013-10-141-0/+1
| | | | | | | | | | | | | Paraphrasing from the configuration option: The action to take when "TimeAction" or "PercentageAction" above has been reached for the batteries (UPS or laptop batteries) supplying the computer. This is done 20 seconds after the warning-level variable got set to UP_DEVICE_LEVEL_ACTION has been set, to give the opportunity to front-ends to display a (short) warning. This is only implemented for the Linux backend, using logind.
* daemon: Remove obsolete featuresBastien Nocera2013-10-141-18/+0
|
* daemon: Include config.h in up-backend.hLandry Breuil2013-10-141-0/+2
| | | | | | To reach ENABLE_DEPRECATED #define https://bugs.freedesktop.org/show_bug.cgi?id=70071
* Also deprecate running the powersave scriptsRichard Hughes2013-02-121-0/+2
| | | | | | | | Over the years we've moved all the quirks to the kernel (and fixed most of the issues properly) so on Fedora we've not actually been shipping any rules in pm-utils for a couple of releaes now. Dropping this functionality allows us to finally drop the pm-utils dep for upower.
* Add a --enable-deprecated configure argumentRichard Hughes2013-02-121-0/+6
| | | | | | | | | | | | | | This is turned off by default. If this is not set, then any calls to Suspend(), SuspendAllowed(), Hibernate() or HibernateAllowed() will fail with an error. The error mesage tells the user what new method to port to in logind. I'm expecting to set --enable-deprecated for Fedora 17 and 18, but turn it off for Fedora 19, so other distributions probably want to follow suit to find out what other stuff needs to be ported to the new APIs early. GNOME should already be fine, but KDE will need some solid porting as I understand it. See http://lists.freedesktop.org/archives/devkit-devel/2013-January/001339.html for more information on future plans and for rationale.
* Use systemd for suspend and hibernateMatthias Clasen2012-07-111-0/+2
| | | | | | | | | | | | | | | | | | When running under systemd, call into systemd for suspend and hibernate instead of pm-utils. To capture resume events, install a small script that gets executed by systemd after resume and sends a dbus signal back to upower. To make this work, the upower backends gain a new signal, ::resuming, that they can optionally emit to signal that a resume happened. Backends opt in to this by returning TRUE from up_backend_emits_resuming(). In this case, upower doesn't assume the sleep command to block until resume, but instead waits for the ::resuming signal from the backend. The only backend that uses this mechanism is the linux backend when built with systemd support. Signed-off-by: Richard Hughes <richard@hughsie.com>
* Get the powersave command from the backend rather than hardcoding Linux ↵Richard Hughes2010-07-071-0/+2
| | | | specifics
* Get the suspend and hibernate commands from the backend, rather than ↵Richard Hughes2010-03-291-0/+2
| | | | hardcoding Linux specifics
* Get the swap size from the backend, rather than hardcoding Linux specificsRichard Hughes2010-03-291-0/+1
|
* Get the encrypted swap status from the backend, rather than hardcoding Linux ↵Richard Hughes2010-03-291-0/+1
| | | | specifics
* Get the kernel sleep capabilities from the backend, rather than hardcoding ↵Richard Hughes2010-03-291-1/+3
| | | | Linux specifics
* devkit-power-gobject/up-enum.h be goneMichael Biebl2010-02-061-1/+1
| | | | Port from devkit-power-gobject/up-enum.h to libupower-glib/up-types.h
* Update the Free Software Foundation addressRichard Hughes2010-01-271-1/+1
|
* trivial: DkpDevice -> UpDevice (no ABI or API break)Richard Hughes2010-01-181-3/+3
|
* trivial: DkpDaemon -> UpDaemon (no ABI or API break)Richard Hughes2010-01-181-2/+2
|
* trivial: DkpBackend -> UpBackend (no ABI or API break)Richard Hughes2010-01-181-22/+22
|
* trivial: Rename a lot of the source files from dkp-foo to up-foo, no API or ↵Richard Hughes2010-01-181-0/+74
ABI changes