summaryrefslogtreecommitdiff
path: root/src/machine/machined.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-10-30 02:06:55 +0100
committerLennart Poettering <lennart@poettering.net>2013-10-30 02:08:57 +0100
commitc335068380fe8c9d843cdb2cf8a00f822cfabed3 (patch)
tree3dadd6e1f6f7172daedd97de789e39a527c23c3f /src/machine/machined.h
parent07459db69f3c48ef4d69308faa14f457bd903bcf (diff)
machined: port over to libsystemd-bus
Diffstat (limited to 'src/machine/machined.h')
-rw-r--r--src/machine/machined.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/machine/machined.h b/src/machine/machined.h
index 780f51678c..c47a468830 100644
--- a/src/machine/machined.h
+++ b/src/machine/machined.h
@@ -23,21 +23,20 @@
#include <stdbool.h>
#include <inttypes.h>
-#include <dbus/dbus.h>
#include "util.h"
#include "list.h"
#include "hashmap.h"
+#include "sd-event.h"
+#include "sd-bus.h"
typedef struct Manager Manager;
#include "machine.h"
struct Manager {
- DBusConnection *bus;
-
- int bus_fd;
- int epoll_fd;
+ sd_event *event;
+ sd_bus *bus;
Hashmap *machines;
Hashmap *machine_units;
@@ -45,10 +44,6 @@ struct Manager {
LIST_HEAD(Machine, machine_gc_queue);
};
-enum {
- FD_BUS
-};
-
Manager *manager_new(void);
void manager_free(Manager *m);
@@ -63,11 +58,17 @@ void manager_gc(Manager *m, bool drop_not_started);
int manager_get_machine_by_pid(Manager *m, pid_t pid, Machine **machine);
-extern const DBusObjectPathVTable bus_manager_vtable;
+extern const sd_bus_vtable manager_vtable[];
+
+int machine_node_enumerator(sd_bus *bus, const char *path, char ***nodes, void *userdata);
-DBusHandlerResult bus_message_filter(DBusConnection *c, DBusMessage *message, void *userdata);
+int match_reloading(sd_bus *bus, sd_bus_message *message, void *userdata);
+int match_unit_removed(sd_bus *bus, sd_bus_message *message, void *userdata);
+int match_properties_changed(sd_bus *bus, sd_bus_message *message, void *userdata);
+int match_job_removed(sd_bus *bus, sd_bus_message *message, void *userdata);
-int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, DBusMessageIter *more_properties, DBusError *error, char **job);
-int manager_stop_unit(Manager *manager, const char *unit, DBusError *error, char **job);
-int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo, DBusError *error);
+int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, sd_bus_message *more_properties, sd_bus_error *error, char **job);
+int manager_stop_unit(Manager *manager, const char *unit, sd_bus_error *error, char **job);
+int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo, sd_bus_error *error);
int manager_unit_is_active(Manager *manager, const char *unit);
+int manager_job_is_active(Manager *manager, const char *path);