From 11f590b1a242492a0108da42f40f0e2b20f0a778 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Mon, 3 Mar 2014 11:30:02 +0100 Subject: object: add object_get_canonical_path_component() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is often useful to find an object's child property name. Also use this new function to simplify the implementation of object_get_canonical_path(). Reviewed-by: Andreas Färber Signed-off-by: Stefan Hajnoczi --- include/qom/object.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/qom/object.h b/include/qom/object.h index 9c7c361d30..4cd77049e4 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -973,6 +973,14 @@ const char *object_property_get_type(Object *obj, const char *name, */ Object *object_get_root(void); +/** + * object_get_canonical_path_component: + * + * Returns: The final component in the object's canonical path. The canonical + * path is the path within the composition tree starting from the root. + */ +gchar *object_get_canonical_path_component(Object *obj); + /** * object_get_canonical_path: * -- cgit v1.2.1