]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Introduce virDBusCallMethod & virDBusMessageRead methods
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 12 Jul 2013 10:13:04 +0000 (11:13 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 22 Jul 2013 12:09:58 +0000 (13:09 +0100)
commit834c9c94592c18b67826bdda85ee50ffc31dae69
tree00cc7c3233553229b8a07c4f5564d2e39f582956
parent67dfc772d12d35408130367756fd8422641c9af0
Introduce virDBusCallMethod & virDBusMessageRead methods

Doing DBus method calls using libdbus.so is tedious in the
extreme. systemd developers came up with a nice high level
API for DBus method calls (sd_bus_call_method). While
systemd doesn't use libdbus.so, their API design can easily
be ported to libdbus.so.

This patch thus introduces methods virDBusCallMethod &
virDBusMessageRead, which are based on the code used for
sd_bus_call_method and sd_bus_message_read. This code in
systemd is under the LGPLv2+, so we're license compatible.

This code is probably pretty unintelligible unless you are
familiar with the DBus type system. So I added some API
docs trying to explain how to use them, as well as test
cases to validate that I didn't screw up the adaptation
from the original systemd code.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
.gitignore
include/libvirt/virterror.h
src/libvirt_private.syms
src/util/virdbus.c
src/util/virdbus.h
src/util/virdbuspriv.h [new file with mode: 0644]
src/util/virerror.c
src/util/virerror.h
tests/Makefile.am
tests/virdbustest.c [new file with mode: 0644]