Commit graph

528 commits

Author SHA1 Message Date
Richard Hughes
d1bd4d42fd Get the suspend and hibernate commands from the backend, rather than hardcoding Linux specifics 2010-03-29 16:42:35 +01:00
Richard Hughes
4b5dc883e6 Get the swap size from the backend, rather than hardcoding Linux specifics 2010-03-29 14:21:51 +01:00
Richard Hughes
0198498350 Get the encrypted swap status from the backend, rather than hardcoding Linux specifics 2010-03-29 14:18:42 +01:00
Richard Hughes
4620a9d122 Get the kernel sleep capabilities from the backend, rather than hardcoding Linux specifics 2010-03-29 14:16:11 +01:00
Richard Hughes
edffa8830d Change the tarball name to be all lower case to match udisks and udev 2010-03-26 13:04:28 +00:00
Richard Hughes
6d607a406c Convert the daemon to using objects from libupower-glib, not devkit-power-gobject 2010-03-26 12:49:01 +00:00
Richard Hughes
daa2d5f3b7 Do not warn what we are correcting energy-full when there is no data to copy 2010-03-26 11:29:38 +00:00
Richard Hughes
c30d15d9b9 trivial: another DeviceKit-power to UPower rename 2010-03-26 11:29:38 +00:00
Richard Hughes
bcc0c2ced0 Ensure we enumerate devices before we start monitoring them 2010-03-26 11:29:38 +00:00
Michael Biebl
42ecfd7bdc Fixes to the autogen.sh script
- Proper formatting and indenting
- Tell aclocal that we use m4/ as macro directory and the final dist
  tarball actually contains the m4/ directory.
- Run intltoolize before aclocal, so aclocal does not append intltool.m4
  to aclocal.m4

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-03-26 11:17:59 +01:00
Michael Biebl
f435bf07ac Simplify udev subdirectory handling
Use the BACKEND_TYPE_LINUX automake conditional to include the rules
directory. This way we don't need to specify DIST_SUBDIRS and can get
rid of UDEV_RULES.
Less redundandcy, less chance to miss a directory in the dist tarball.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-03-26 11:17:55 +01:00
Michael Biebl
37a56ea0da Make dummy backend usable for architectures without a native backend
Currently, the dummy backend is mostly used to run the unit tests.
We want to make it usable though on architectures, like GNU/Hurd, which
dont't have a native backend yet.

Compile two different flavours of the dummy backend: one with the TEST
code enabled and which is used by up_self_test, and one without the TEST
code, used by upowerd when the dummy backend is selected.

Patch is based on work by Pino Toscano.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-03-26 11:17:49 +01:00
Michael Biebl
9f26b3f866 Remove libdevkit-power-gobject dependency from backends
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>
2010-03-26 11:15:26 +01:00
Michael Biebl
fedc191420 Show in ./configure summary if unit tests have been enabled or not
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-03-26 11:10:49 +01:00
Richard Hughes
e8414d5890 trivial: post release version bump 2010-03-03 15:09:41 +00:00
Richard Hughes
b6697415eb Released UPower 0.9.1 2010-03-03 15:08:34 +00:00
Michael Biebl
197f994945 Fix up the FreeBSD backend compile
Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-02-23 21:31:41 +00:00
Martin Pitt
b9bb78ac2b Fix libupower-glib include dir and pkgconfig
Install libupower-glib include files into libupower-glib/ (where upower.h
expects them to be), not upower-glib. Now the library is consistently named
"libupower-glib" everywhere.

Also fix the Libs line in the pkgconfig file: link against -lupower-glib, not
-lupower.
2010-02-16 11:55:28 +01:00
Richard Hughes
72bb220a6a Don't ship an introspection file for devkit-power-gobject, it's soon to be obsolete 2010-02-09 10:45:00 +00:00
Richard Hughes
fd94c5d485 trivial: remove two unused variables which break the build when using strict warnings 2010-02-09 10:44:37 +00:00
Martin Pitt
821ecf9125 Check PolicyKit in client's can_{suspend,hibernate} properties
Check for PK privileges in UpClient's can_{suspend,hibernate} properties, so
that clients like gnome-session or gnome-power-manager hide the related actions
if the admin or OEM disabled suspend/hibernate through a PolicyKit .pkla file
like

$ cat /etc/polkit-1/localauthority/50-local.d/disable-suspend.pkla
[Disable suspend]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend
ResultActive=no
ResultAny=no

https://bugs.freedesktop.org/show_bug.cgi?id=26473
2010-02-09 10:42:38 +00:00
Martin Pitt
b93915a377 Add {Suspend,Hibernate}Allowed D-Bus methods
Add two D-Bus server methods to check whether the caller has the privilege to
suspend or hibernate.

This enables us to check for PK privileges in UpClient's
can_{suspend,hibernate} properties, so that clients like gnome-session or
gnome-power-manager hide the suspend/hibernate related actions if the admin or
OEM disabled suspend/hibernate through a PolicyKit .pkla file.

https://bugs.freedesktop.org/show_bug.cgi?id=26473
2010-02-09 10:42:36 +00:00
Martin Pitt
a057e36751 Add up_polkit_is_allowed() function
Add a new polkit helper function up_polkit_is_allowed() which checks whether
the caller has or can get a particular privilege, but without interactive
authentication.

https://bugs.freedesktop.org/show_bug.cgi?id=26473
2010-02-09 10:42:34 +00:00
Richard Hughes
1738ac30b7 Install the introspection data to the correct location 2010-02-09 09:15:38 +00:00
Richard Hughes
02914e71ec Add a new method and two new signals to inform userspace of the pending suspend and the resume event
Based on an idea from Matthew Garrett and Lennart Poettering
2010-02-08 12:18:50 +00:00
Richard Hughes
4214c6a345 trivial: do not free errors that we do not allocate in the error paths 2010-02-07 21:37:00 +00:00
Richard Hughes
b9d7b8aea9 trivial: Fix up a void marshalling type 2010-02-07 21:35:18 +00:00
Michael Biebl
8e3791afe4 devkit-power-gobject/up-enum.h be gone
Port from devkit-power-gobject/up-enum.h to libupower-glib/up-types.h
2010-02-06 13:46:03 +00:00
Michael Biebl
4a12ee1bf7 Make sure the tests link against all necessary libraries. 2010-02-06 13:43:02 +00:00
Michael Biebl
3ea96602e6 Update help and g_option_context_new to upower 2010-02-06 13:42:57 +00:00
Richard Hughes
41917bfc73 trivial: fix a compile warning 2010-02-05 10:37:32 +00:00
Richard Hughes
29d4de79e1 Use GCancellable in libupower-glib so we can eventually get to GIO async methods without breaking future API 2010-02-05 09:41:06 +00:00
Richard Hughes
4c02c6310d Make the upower client tool use libupwer-glib, rather than devit-power-gobject 2010-02-05 09:26:10 +00:00
Richard Hughes
0bbdab0464 trivial: fix up UpWakeups to actually compile 2010-02-05 09:25:40 +00:00
Richard Hughes
4aa5d780ce Ensure we return all lines of the UpDevice when we call up_device_to_string() 2010-02-05 09:25:08 +00:00
Richard Hughes
bfa3b82ee9 trivial: Port the DkpWakeups object to UpWakeups 2010-02-05 09:02:20 +00:00
Michael Biebl
0ff7b4fdff Move the history files to /var/lib/upower
Distros should move existing files from
/var/lib/DeviceKit-power to /var/lib/upower on upgrades in their
maintainer scripts.
2010-02-05 08:35:20 +00:00
Michael Biebl
9852851db1 Use the new project name in g_option_context_new 2010-02-05 08:35:14 +00:00
Michael Biebl
83c0574466 Remove EGG_* log define.
The EGG_* log defines don't seem to be used and still reference the old
DeviceKit-power name. So just remove it.
2010-02-05 08:35:11 +00:00
Michael Biebl
293f9322b7 Fix up autogen.sh after the configure.ac modernisation
Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-02-01 18:01:16 +00:00
Richard Hughes
09665a21ac Fix up the include directory in the pkgconfig file 2010-02-01 17:20:09 +00:00
Richard Hughes
6d7c30ac7c trivial: post release version bump 2010-02-01 11:55:20 +00:00
Richard Hughes
451a6a7c94 Released UPower 0.9.0 2010-02-01 11:54:01 +00:00
Richard Hughes
acfe9c3089 Update the Free Software Foundation address 2010-01-27 16:27:15 +00:00
Richard Hughes
13314636be trivial: Modernize the configure.ac file 2010-01-26 18:17:38 +00:00
Richard Hughes
ada609a6e5 trivial: add some more gtk-doc markup to the new objects 2010-01-26 12:15:15 +00:00
Richard Hughes
4885f802d1 trivial: add two more functions to DkpDevice for getting the stats and history 2010-01-26 12:09:26 +00:00
Richard Hughes
21012c7d2e trivial: add some more gtk-doc markup to the new objects 2010-01-26 11:59:09 +00:00
Richard Hughes
af56b08795 trivial: Add some useful GObjects for client and server use 2010-01-26 11:39:14 +00:00
Richard Hughes
5e8ba54573 trivial: rename the new libupower 'type' to 'kind' to avoid clashing with GObject generated names 2010-01-26 10:53:04 +00:00