qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qom: Document ways to retrieve child object added by object_property_add_child()
@ 2012-02-21 10:14 alexander_barabash
  2012-02-21 10:16 ` Paolo Bonzini
  2012-02-22 18:51 ` Anthony Liguori
  0 siblings, 2 replies; 3+ messages in thread
From: alexander_barabash @ 2012-02-21 10:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, Alexander Barabash

From: Alexander Barabash <alexander_barabash@mentor.com>

object_property_add_child() creates a property whose values as a string is
the child object's canonical path.

Signed-off-by: Alexander Barabash <alexander_barabash@mentor.com>
---
 include/qemu/object.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/qemu/object.h b/include/qemu/object.h
index ba2409d..d9e9221 100644
--- a/include/qemu/object.h
+++ b/include/qemu/object.h
@@ -808,6 +808,10 @@ Object *object_resolve_path_type(const char *path, const char *typename,
  *
  * There is no way for a child to determine what its parent is.  It is not
  * a bidirectional relationship.  This is by design.
+ *
+ * The value of a child property as a C string will be the child object's
+ * canonical path. It can be retrieved using object_property_get_str().
+ * The child object itself can be retrieved using object_property_get_link().
  */
 void object_property_add_child(Object *obj, const char *name,
                                Object *child, struct Error **errp);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-22 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-21 10:14 [Qemu-devel] [PATCH] qom: Document ways to retrieve child object added by object_property_add_child() alexander_barabash
2012-02-21 10:16 ` Paolo Bonzini
2012-02-22 18:51 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).