network: move manager dbus prototypes to networkd-manager-bus.h
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 2 Jul 2019 14:26:03 +0000 (23:26 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 16 Jul 2019 21:59:12 +0000 (06:59 +0900)
src/network/meson.build
src/network/networkd-manager-bus.c
src/network/networkd-manager-bus.h [new file with mode: 0644]
src/network/networkd-manager.c
src/network/networkd-manager.h

index 6725e9d..387cf0a 100644 (file)
@@ -80,6 +80,7 @@ sources = files('''
         networkd-lldp-tx.c
         networkd-lldp-tx.h
         networkd-manager-bus.c
+        networkd-manager-bus.h
         networkd-manager.c
         networkd-manager.h
         networkd-ndisc.c
index a40220d..4374d3d 100644 (file)
@@ -3,6 +3,7 @@
 #include "alloc-util.h"
 #include "bus-util.h"
 #include "networkd-link-bus.h"
+#include "networkd-manager-bus.h"
 #include "networkd-manager.h"
 #include "strv.h"
 
diff --git a/src/network/networkd-manager-bus.h b/src/network/networkd-manager-bus.h
new file mode 100644 (file)
index 0000000..e19d706
--- /dev/null
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#include "sd-bus.h"
+
+typedef struct Manager Manager;
+
+extern const sd_bus_vtable manager_vtable[];
+
+int manager_send_changed_strv(Manager *m, char **properties);
index ec3bb47..8d72d29 100644 (file)
@@ -23,6 +23,7 @@
 #include "network-internal.h"
 #include "networkd-dhcp6.h"
 #include "networkd-link-bus.h"
+#include "networkd-manager-bus.h"
 #include "networkd-manager.h"
 #include "networkd-network-bus.h"
 #include "networkd-speed-meter.h"
index 9b3b05b..e5bf7ac 100644 (file)
@@ -65,8 +65,6 @@ struct Manager {
         usec_t speed_meter_usec_old;
 };
 
-extern const sd_bus_vtable manager_vtable[];
-
 int manager_new(Manager **ret);
 void manager_free(Manager *m);
 
@@ -85,7 +83,6 @@ int manager_rtnl_process_address(sd_netlink *nl, sd_netlink_message *message, vo
 int manager_rtnl_process_route(sd_netlink *nl, sd_netlink_message *message, void *userdata);
 int manager_rtnl_process_rule(sd_netlink *nl, sd_netlink_message *message, void *userdata);
 
-int manager_send_changed_strv(Manager *m, char **properties);
 void manager_dirty(Manager *m);
 
 int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found);