chiark / gitweb /
dbus: explicitly flush message queue before disconnecting
[elogind.git] / unit.h
diff --git a/unit.h b/unit.h
index 338a58b00981c1d79e724fbaa99f6c5a5e677171..b3c75ce20a7e5451a2e35653f308eee755d00bc2 100644 (file)
--- a/unit.h
+++ b/unit.h
@@ -54,13 +54,13 @@ typedef enum KillMode {
 
 enum UnitType {
         UNIT_SERVICE = 0,
-        UNIT_TIMER,
         UNIT_SOCKET,
         UNIT_TARGET,
         UNIT_DEVICE,
         UNIT_MOUNT,
         UNIT_AUTOMOUNT,
         UNIT_SNAPSHOT,
+        UNIT_TIMER,
         _UNIT_TYPE_MAX,
         _UNIT_TYPE_INVALID = -1
 };
@@ -209,6 +209,9 @@ struct UnitVTable {
         /* Instances make no sense for this type */
         bool no_instances:1;
 
+        /* Execlude this type from snapshots */
+        bool no_snapshots:1;
+
         /* This should reset all type-specific variables. This should
          * not allocate memory, and is either called with 0
          * initialized data, or with data left from done() */
@@ -261,6 +264,9 @@ struct UnitVTable {
         /* Called whenever a bus PID lookup finishes */
         void (*bus_query_pid_done)(Unit *u, const char *name, pid_t pid);
 
+        /* Called for each message received on the bus */
+        DBusHandlerResult (*bus_message_handler)(Unit *u, DBusMessage *message);
+
         /* This is called for each unit type and should be used to
          * enumerate existing devices and load them. However,
          * everything that is loaded here should still stay in