object: add object_get_canonical_path_component()

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 <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Stefan Hajnoczi 2014-03-03 11:30:02 +01:00
parent b5042a3622
commit 11f590b1a2
2 changed files with 40 additions and 22 deletions

View file

@ -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:
*