]> git.proxmox.com Git - qemu.git/blobdiff - include/qemu/object.h
qdev: move bus removal to object_unparent
[qemu.git] / include / qemu / object.h
index be707f1a36ae9d017ee2b3c206b10f5df21f16b0..232463b3c7983e7561355ccc3ea6892738dcf008 100644 (file)
@@ -229,6 +229,15 @@ typedef struct ObjectProperty
     QTAILQ_ENTRY(ObjectProperty) node;
 } ObjectProperty;
 
+/**
+ * ObjectUnparent:
+ * @obj: the object that is being removed from the composition tree
+ *
+ * Called when an object is being removed from the QOM composition tree.
+ * The function should remove any backlinks from children objects to @obj.
+ */
+typedef void (ObjectUnparent)(Object *obj);
+
 /**
  * ObjectClass:
  *
@@ -240,6 +249,8 @@ struct ObjectClass
     /*< private >*/
     Type type;
     GSList *interfaces;
+
+    ObjectUnparent *unparent;
 };
 
 /**