summaryrefslogtreecommitdiff
path: root/include/qom/object.h
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2015-05-13 17:14:05 +0100
committerAndreas Färber <afaerber@suse.de>2015-06-19 18:40:00 +0200
commitbc2256c4ae86308a1521c89456b599d441119418 (patch)
tree8a9a2cb0a8d570459730143e3326ea0572054f93 /include/qom/object.h
parentf08f9271bfe3f19a5eb3d7a2f48532065304d5c8 (diff)
downloadqemu-bc2256c4ae86308a1521c89456b599d441119418.zip
qom: Add helper function for getting user objects root
Add object_get_objects_root() function which is a convenience for obtaining the Object * located at /objects in the object composition tree. Convert existing code over to use the new API where appropriate. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include/qom/object.h')
-rw-r--r--include/qom/object.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index 0505f20e71..b03ede032d 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -1026,6 +1026,18 @@ const char *object_property_get_type(Object *obj, const char *name,
*/
Object *object_get_root(void);
+
+/**
+ * object_get_objects_root:
+ *
+ * Get the container object that holds user created
+ * object instances. This is the object at path
+ * "/objects"
+ *
+ * Returns: the user object container
+ */
+Object *object_get_objects_root(void);
+
/**
* object_get_canonical_path_component:
*