forked from systemd/systemd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add basic (and not very useful) D-Bus support
- Loading branch information
1 parent
b9f880f
commit ea43098
Showing
18 changed files
with
1,392 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*-*- Mode: C; c-basic-offset: 8 -*-*/ | ||
|
||
#include "dbus.h" | ||
#include "log.h" | ||
|
||
static const char introspection[] = | ||
DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE | ||
"<node>" | ||
" <interface name=\"org.freedesktop.systemd1.Job\">" | ||
" </interface>" | ||
BUS_PROPERTIES_INTERFACE | ||
BUS_INTROSPECTABLE_INTERFACE | ||
"</node>"; | ||
|
||
DBusHandlerResult bus_job_message_handler(DBusConnection *connection, DBusMessage *message, void *data) { | ||
Manager *m = data; | ||
|
||
assert(connection); | ||
assert(message); | ||
assert(m); | ||
|
||
log_debug("Got D-Bus request: %s.%s() on %s", | ||
dbus_message_get_interface(message), | ||
dbus_message_get_member(message), | ||
dbus_message_get_path(message)); | ||
|
||
return bus_default_message_handler(m, message, introspection, NULL); | ||
} | ||
|
||
const DBusObjectPathVTable bus_job_vtable = { | ||
.message_function = bus_job_message_handler | ||
}; |
Oops, something went wrong.