Commit Graph

12337 Commits

Author SHA1 Message Date
Lennart Poettering
92db139e34 bus: in GetManagedObjects() only return each object once. 2013-10-11 23:21:22 +02:00
Lennart Poettering
92e189e572 bus: unify code to find parents of an object path with 2013-10-11 23:20:54 +02:00
Lennart Poettering
8e4e652b92 bus: properly generate GetAll reply 2013-10-11 23:19:40 +02:00
Lennart Poettering
55736ed0c7 bus: add sd_bus_message_append_strv() to easily add a NULL terminated string array to a message 2013-10-11 23:02:47 +02:00
Lennart Poettering
f11ca85a89 bus: make sure introspection can be generated correctly with NULL method signatures 2013-10-11 23:01:35 +02:00
Lennart Poettering
dfa927250e bus: beef up parameter checking in vtable handling 2013-10-11 21:27:59 +02:00
Lennart Poettering
f69dc9a3d1 bus: beef up parameter checking of convenience calls 2013-10-11 20:49:19 +02:00
Lennart Poettering
77a874a3fb bus: don't rely on gccisms/c11 in public header files.
One day sd-bus.h should become a public header file. We generally try to
be conservative in language features we use in public headers (much
unlike in private code), hence don't make use of anonymous unions in
structs for the vtable definitions.
2013-10-11 20:32:16 +02:00
Lennart Poettering
992c052c34 bus: split up overly long sd-bus.c into three files 2013-10-11 20:18:10 +02:00
Lennart Poettering
9db7635521 bus: if a a Set() vtable callback of a writable is left NULL, try to do the right thing automatically 2013-10-11 20:03:19 +02:00
Lennart Poettering
43a43f5016 bus: automatically do a NOP reply when a NULL callback is specified for a method in a vtable
Also, allow specifiying NULL as signature in vtables equivalent to ""
for empty parameter lists.
2013-10-11 20:03:19 +02:00
Bastien Nocera
1a0464230c Add support for saving/restoring keyboard backlights
Piggy-backing on the display backlight code, this saves and restores
keyboard backlights on supported devices.

The detection code matches that of UPower:
http://cgit.freedesktop.org/upower/tree/src/up-kbd-backlight.c#n173

https://bugs.freedesktop.org/show_bug.cgi?id=70367

[tomegun: also work for devices named "{smc,samsung,asus}::kbd_backlight"]
2013-10-11 12:52:36 +02:00
Kay Sievers
f6f2ad9b9c udev: usb_id - remove obsoleted bInterfaceSubClass == 5 match
bInterfaceSubClass == 5 is not a "floppy"; just identify the obsolete
QIC-157 interface as "generic".
2013-10-11 11:23:34 +02:00
Kay Sievers
9a4e038c15 smack: minimize ifdef use, and move all labeling to smack-util.c 2013-10-11 10:16:41 +02:00
Lennart Poettering
adcdb37476 bus: when NULL is specified as property callback, automatically handle serialization on Get() 2013-10-11 06:10:15 +02:00
Lennart Poettering
62b5c2aec1 bus: make PropertiesChanged emission work 2013-10-11 05:22:00 +02:00
Lennart Poettering
90d184b234 bus: decorate API calls with gcc attributes where appropriate 2013-10-11 05:21:08 +02:00
Lennart Poettering
5a037827f6 bus: allow specifying NULL as type string when we want to construct messages with no payload 2013-10-11 05:20:24 +02:00
Lennart Poettering
5d12cc3e28 bus: make GetManagedObjects() work 2013-10-11 04:52:38 +02:00
Lennart Poettering
46e8c8257f event: add apis to query the timestamp of the event currently processed 2013-10-11 04:36:02 +02:00
Lennart Poettering
305f78bff3 event: move all library calls over to new assert_return() macro 2013-10-11 02:11:30 +02:00
Lennart Poettering
4bee801296 event: add sd_event_source_get_child_pid() call to query the PID of a child event source 2013-10-11 01:33:25 +02:00
Lennart Poettering
baf7628332 event: rename the "mute" field of event sources to "enabled"
In addition, the states "UNMUTED" and "MUTED" become "ON" and "OFF".

This has the benefit that a possible value of this field is not
identical to its name, thus minimizing confusion.
2013-10-11 01:08:15 +02:00
Lennart Poettering
da7e457c5b event: implement quit handlers
Quit handlers are executed when an event loop is terminated via
sd_event_request_quit(). They are in a way atexit() handlers that are
executed in a well-defined environment, time and thread: from the event
loop thread when the event loop finishes.
2013-10-11 00:49:11 +02:00
Lennart Poettering
18387b5983 macro: add new assert_return() macro for early parameter checking in functions
For the library functions we expose we currently repeatedly use checks
like the following:

if (!value_is_ok(parameter1))
        return -EINVAL;
if (!value_is_ok(parameter2))
        return -EINVAL;

And so on. Let's turn this into a macro:

assert_return(value_is_ok(parameter1), -EINVAL);
assert_return(value_is_ok(paramater2), -EINVAL);

This makes our code a bit shorter and simpler, and also allows us to add
a _unlikely_() around the check.
2013-10-11 00:45:47 +02:00