chiark / gitweb /
bus: properly generate NameOwnerChanged messages when we take from/give back to queue...
[elogind.git] / src / libsystemd-bus / kdbus.h
index d53c269573d1e6bb61469ed6f7867c8ab7281a8a..168d08a3ec1d20c220898df3dbbe705633880925 100644 (file)
@@ -30,7 +30,8 @@
  * struct kdbus_notify_name_change - name registry change message
  * @old_id:            Former owner of a name
  * @new_id:            New owner of a name
- * @flags:             flags from KDBUS_NAME_*
+ * @old_flags:         flags from KDBUS_NAME_* the name entry used to have
+ * @new_flags:         flags from KDBUS_NAME_* the name entry has now
  * @name:              Well-known name
  *
  * Sent from kernel to userspace when the owner or starter of
@@ -44,7 +45,8 @@
 struct kdbus_notify_name_change {
        __u64 old_id;
        __u64 new_id;
-       __u64 flags;
+       __u64 old_flags;
+       __u64 new_flags;
        char name[0];
 };
 
@@ -527,18 +529,17 @@ struct kdbus_cmd_ns_make {
 /**
  * enum kdbus_name_flags - properties of a well-known name
  * @KDBUS_NAME_REPLACE_EXISTING:       Try to replace name of other connections
- * @KDBUS_NAME_QUEUE:                  Name should be queued if busy
  * @KDBUS_NAME_ALLOW_REPLACEMENT:      Allow the replacement of the name
+ * @KDBUS_NAME_QUEUE:                  Name should be queued if busy
  * @KDBUS_NAME_IN_QUEUE:               Name is queued
+ * @KDBUS_NAME_STARTER:                        Name is owned by a starter connection
  */
 enum kdbus_name_flags {
-       /* userspace → kernel */
        KDBUS_NAME_REPLACE_EXISTING             = 1 <<  0,
-       KDBUS_NAME_QUEUE                        = 1 <<  1,
-       KDBUS_NAME_ALLOW_REPLACEMENT            = 1 <<  2,
-
-       /* kernel → userspace */
-       KDBUS_NAME_IN_QUEUE                     = 1 << 16,
+       KDBUS_NAME_ALLOW_REPLACEMENT            = 1 <<  1,
+       KDBUS_NAME_QUEUE                        = 1 <<  2,
+       KDBUS_NAME_IN_QUEUE                     = 1 <<  3,
+       KDBUS_NAME_STARTER                      = 1 <<  4,
 };
 
 /**
@@ -609,7 +610,7 @@ struct kdbus_name_list {
  *                     @name is required. kdbus will look up the name to determine
  *                     the ID in this case.
  * @offset:            Returned offset in the caller's pool buffer where the
- *                     kdbus_name_info struct result is stored. The user must
+ *                     kdbus_conn_info struct result is stored. The user must
  *                     use KDBUS_CMD_FREE to free the allocated memory.
  * @name:              The optional well-known name to look up. Only needed in
  *                     case @id is zero.