summaryrefslogtreecommitdiff
path: root/src/freebsd
Commit message (Collapse)AuthorAgeFilesLines
* Move battery type decoding into common fileBenjamin Berg2022-06-071-30/+2
|
* freebsd: Use correct up_make_safe_string definitionBenjamin Berg2022-06-032-2/+2
|
* common: Add a file with common helperBenjamin Berg2022-05-252-38/+3
| | | | | | This removes some code duplication between the linux and freebsd backend. And, this file could become home to other small helper functions in the future.
* daemon: Stop passing UpDevice reference to the daemonBenjamin Berg2022-05-101-1/+1
| | | | | There is no need to do so, in particular as the signal emission code will keep a reference to the object internally.
* linux/freebsd: Do not print invalid characters into logBenjamin Berg2022-05-101-1/+1
| | | | | Instead, just hex-encode them, they are invalid, it is not like having them in raw in the log is helpful.
* freebsd: Use new polling infrastructureBenjamin Berg2022-05-101-38/+1
|
* device: Flag refresh reasonBenjamin Berg2022-05-092-5/+5
| | | | | | | The reason of a refresh may be interesting to special case certain situation (e.g. discontinuity of charge after wakeup, polling again after an event). As such, add an enum parameter that signals the reason for the refresh.
* freebsd: Fix a few minor warningsBenjamin Berg2022-04-202-3/+1
|
* device: Handle device coldplug using GInitableBenjamin Berg2022-04-203-25/+7
| | | | | | | There are only a few cases where we separate construction and coldplug. Porting to GInitable is relatively natural here and makes the code a little nicer overall. In the case that immediate coldplug/initialization is not desired, we can still split the operations.
* bsd*: Allow building on linuxBenjamin Berg2022-04-012-0/+23
| | | | | | | Guard platform specific code and add in a few extra definitions so that the backends can at least be partially compiled on linux. This is for testing purposes, if we could build against a proper image that would also be acceptable.
* freebsd: Remove unused swap detection codeBenjamin Berg2022-04-011-36/+0
|
* device: Move daemon/native object into construct only propertiesBenjamin Berg2022-04-013-9/+13
| | | | | | Rather than this weird situation where they are immediately passed in through the "coldplug" method. Doing this is the first step to make UpDevice into an initable object (removing the "coldplug" method).
* freebsd: Drop TODO referencing battery recall featureBenjamin Berg2022-03-281-4/+0
| | | | The feature was removed a long time ago. So the TODO is obsolete.
* build: Remove autotoolsBastien Nocera2021-09-061-43/+0
|
* build: Support building upower with mesonBenjamin Berg2021-09-021-0/+18
|
* Replace use of G_TYPE_INSTANCE_GET_PRIVATEChristian Kellner2019-02-211-3/+1
| | | | | | G_TYPE_INSTANCE_GET_PRIVATE has been deprecated since glib version 2.58 and should be replaced with the xxx_get_instance_private (obj) which is generated by G_ADD_PRIVATE.
* Replace use of deprecated g_type_class_add_privateChristian Kellner2019-02-211-3/+1
| | | | | | | | Use G_DEFINE_TYPE_WITH_CODE (..., G_PRIVATE_ADD (...)) instead of the (deprecated since glib 2.58) function g_type_class_add_private to add a private structure for a type. Bump the minimal required version of glib to 2.38.0, the version where G_PRIVATE_ADD was added.
* freebsd: Fix lid detection on FreeBSDAlberto Villa2017-09-081-1/+1
| | | | | | | | | | | | | UPower sets property LidIsPresent to true only if hw.acpi.lid_switch_state is different from "NONE", "NONE" being the default value for FreeBSD. Thus, the property is always false on default configurations. Force UPower not to care about the value of the sysctl, making it check only for its existence. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175531 https://bugs.freedesktop.org/show_bug.cgi?id=101828
* daemon: Remove unused test declarationsBastien Nocera2016-07-081-28/+0
| | | | All those test functions were removed in 6ba8629 and are now unused.
* build: Fix missing includesBastien Nocera2015-09-231-0/+1
| | | | | | Include $(top_builddir) when building so that we can find the newly generated D-Bus helper files. Note that, because we ship generated files in the tarball, we'll also need to include $(top_srcdir).
* daemon: remove custom marshal setupCosimo Cecchi2015-07-291-3/+2
| | | | Just use the default marshaller.
* build: remove dependency on dbus-glib and libdbusCosimo Cecchi2015-07-291-1/+0
| | | | Nothing depends on it any more.
* bsd: Add critical action support for *BSDEric Koegel2015-07-071-13/+30
| | | | | | | | | This patch adds support for using ConsoleKit2's DBUS API to implement the critical action for FreeBSD and OpenBSD. It does so by creating a common backend file both can use to implement the API calls. https://bugs.freedesktop.org/show_bug.cgi?id=85242
* daemon: release resources at shutdownPeter Wu2014-11-261-0/+24
| | | | | | | | | | 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: convert value from g_get_real_time() to secondsEvangelos Foutras2014-10-081-1/+1
| | | | | | | | Commit 5ddfe0d (all: Use g_get_real_time() when possible) replaced calls to g_get_current_time() with g_get_real_time(), however, we also need to convert the return value from microseconds to seconds. Signed-off-by: Richard Hughes <richard@hughsie.com>
* all: Use g_get_real_time() when possibleBastien Nocera2014-09-241-5/+2
| | | | Instead of a call to g_get_current_time().
* daemon: Better timeout source namingBastien Nocera2013-10-261-1/+1
| | | | | | | Matching the work done in glib, gtk+, etc. This also differentiates the unknown and normal timeouts in the Linux power supply driver.
* all: Add GetCriticalAction daemon methodBastien Nocera2013-10-171-0/+13
| | | | | | | | | 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: Require newer GLibBastien Nocera2013-10-141-2/+0
| | | | And remove ifdef's.
* daemon: Add CriticalPowerActionBastien Nocera2013-10-141-0/+12
| | | | | | | | | | | | | 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: Replace "on-low-battery" propertyBastien Nocera2013-10-141-28/+0
| | | | With "warning-level" property.
* daemon: Remove unneeded reset of priv struct membersBastien Nocera2013-10-141-3/+0
| | | | It's already done by GObject.
* daemon: Remove obsolete featuresBastien Nocera2013-10-141-82/+0
|
* daemon: Simplify _new() functionsBastien Nocera2013-10-141-3/+1
|
* freebsd: Remove useless finalizeBastien Nocera2013-10-141-17/+0
| | | | It was just chaining up.
* Don't use the deprecated INCLUDES in Makefile.amRichard Hughes2013-01-141-1/+1
|
* Use systemd for suspend and hibernateMatthias Clasen2012-07-111-0/+6
| | | | | | | | | | | | | | | | | | 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>
* Use git.mk and remove the manual .gitignore filesRichard Hughes2011-07-191-0/+1
|
* Port from EggDebug to the GLib built-in logging frameworkRichard Hughes2010-11-015-24/+17
|
* up-device-supply.c: Fix #27902 Bug - Daemon Segmentation FaultMariusz Ceier2010-07-021-3/+3
| | | | | | | | | In linux backend, g_object_set was called with wrong argument types for time-to-empty,time-to-full and percentage properties. This patch uses explicit casts in the same way as freebsd backend. Signed-off-by: Mariusz Ceier <mceier@gmail.com>
* Port to GTestRichard Hughes2010-06-051-27/+0
|
* Assign names to our idle sources when using new versions of glib2Richard Hughes2010-06-051-0/+3
| | | | This makes it possible to profile more accurately using systemtap
* Provide UpDaemon with C setters rather than relying on GObject propertiesRichard Hughes2010-04-191-4/+3
|
* Get the suspend and hibernate commands from the backend, rather than ↵Richard Hughes2010-03-291-5/+5
| | | | hardcoding Linux specifics
* Get the swap size from the backend, rather than hardcoding Linux specificsRichard Hughes2010-03-291-0/+1
|
* Get the kernel sleep capabilities from the backend, rather than hardcoding ↵Richard Hughes2010-03-291-4/+4
| | | | Linux specifics
* Remove libdevkit-power-gobject dependency from backendsMichael Biebl2010-03-261-1/+0
| | | | | | | | | | The backends [linux/freebsd/dummy] no longer require libdevkit-power-gobject, so - remove -I$(top_srcdir)/devkit-power-gobject from the include path - don't link the backends against libdevkit-power-gobject but upowerd (which unfortunately still needs it). Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
* Fix up the FreeBSD backend compileMichael Biebl2010-02-231-1/+1
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* devkit-power-gobject/up-enum.h be goneMichael Biebl2010-02-061-0/+1
| | | | Port from devkit-power-gobject/up-enum.h to libupower-glib/up-types.h
* Remove EGG_* log define.Michael Biebl2010-02-051-4/+0
| | | | | The EGG_* log defines don't seem to be used and still reference the old DeviceKit-power name. So just remove it.