diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-11-18 22:49:25 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-11-18 22:49:25 +0100 |
commit | 6e194652b8a2843883e717319ead18b0b98ec65e (patch) | |
tree | 71f661c8c46707bcb558e399916a457445f1b8e6 /src/network/networkd-manager-bus.c | |
parent | test: make the diff regex BRE-compatible (diff) | |
download | systemd-6e194652b8a2843883e717319ead18b0b98ec65e.tar.xz systemd-6e194652b8a2843883e717319ead18b0b98ec65e.zip |
network: use BusObjectImplementation
Diffstat (limited to 'src/network/networkd-manager-bus.c')
-rw-r--r-- | src/network/networkd-manager-bus.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/network/networkd-manager-bus.c b/src/network/networkd-manager-bus.c index 8a5ad8eac3..4c517d829a 100644 --- a/src/network/networkd-manager-bus.c +++ b/src/network/networkd-manager-bus.c @@ -8,11 +8,13 @@ #include "bus-common-errors.h" #include "bus-message-util.h" #include "bus-polkit.h" +#include "networkd-dhcp-server-bus.h" #include "networkd-json.h" #include "networkd-link-bus.h" #include "networkd-link.h" #include "networkd-manager-bus.h" #include "networkd-manager.h" +#include "networkd-network-bus.h" #include "path-util.h" #include "strv.h" #include "user-util.h" @@ -285,7 +287,7 @@ static int property_get_namespace_id( return sd_bus_message_append(reply, "t", id); } -const sd_bus_vtable manager_vtable[] = { +static const sd_bus_vtable manager_vtable[] = { SD_BUS_VTABLE_START(0), SD_BUS_PROPERTY("OperationalState", "s", property_get_operational_state, offsetof(Manager, operational_state), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), @@ -418,3 +420,10 @@ int manager_send_changed_strv(Manager *manager, char **properties) { "org.freedesktop.network1.Manager", properties); } + +const BusObjectImplementation manager_object = { + "/org/freedesktop/network1", + "org.freedesktop.network1.Manager", + .vtables = BUS_VTABLES(manager_vtable), + .children = BUS_IMPLEMENTATIONS(&dhcp_server_object, &link_object, &network_object), +}; |