-#include "dbus-common.h"
-
-#define CONNECTIONS_MAX 52
-
-/* Well-known address (http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-types) */
-#define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
-/* Only used as a fallback */
-#define DBUS_SESSION_BUS_DEFAULT_ADDRESS "autolaunch:"
-
-static const char bus_properties_interface[] = BUS_PROPERTIES_INTERFACE;
-static const char bus_introspectable_interface[] = BUS_INTROSPECTABLE_INTERFACE;
-
-const char *const bus_interface_table[] = {
- "org.freedesktop.DBus.Properties", bus_properties_interface,
- "org.freedesktop.DBus.Introspectable", bus_introspectable_interface,
- "org.freedesktop.systemd1.Manager", bus_manager_interface,
- "org.freedesktop.systemd1.Job", bus_job_interface,
- "org.freedesktop.systemd1.Unit", bus_unit_interface,
- "org.freedesktop.systemd1.Service", bus_service_interface,
- "org.freedesktop.systemd1.Socket", bus_socket_interface,
- "org.freedesktop.systemd1.Target", bus_target_interface,
- "org.freedesktop.systemd1.Device", bus_device_interface,
- "org.freedesktop.systemd1.Mount", bus_mount_interface,
- "org.freedesktop.systemd1.Automount", bus_automount_interface,
- "org.freedesktop.systemd1.Snapshot", bus_snapshot_interface,
- "org.freedesktop.systemd1.Swap", bus_swap_interface,
- "org.freedesktop.systemd1.Timer", bus_timer_interface,
- "org.freedesktop.systemd1.Path", bus_path_interface,
- NULL
-};
-
-static void bus_done_api(Manager *m);
-static void bus_done_system(Manager *m);
-static void bus_done_private(Manager *m);
-static void shutdown_connection(Manager *m, DBusConnection *c);
-
-static void bus_dispatch_status(DBusConnection *bus, DBusDispatchStatus status, void *data) {
- Manager *m = data;
-
- assert(bus);
- assert(m);
-
- /* We maintain two sets, one for those connections where we
- * requested a dispatch, and another where we didn't. And then,
- * we move the connections between the two sets. */
-
- if (status == DBUS_DISPATCH_COMPLETE)
- set_move_one(m->bus_connections, m->bus_connections_for_dispatch, bus);
- else
- set_move_one(m->bus_connections_for_dispatch, m->bus_connections, bus);
-}
-
-void bus_watch_event(Manager *m, Watch *w, int events) {
- assert(m);
- assert(w);
-
- /* This is called by the event loop whenever there is
- * something happening on D-Bus' file handles. */