summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2012-05-12qom: Documentation addition for object_class_by_name()Paolo Bonzini1-0/+6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Document the possible NULL return value] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-05-08cpu: Update documentation and commentAndreas Färber1-2/+2
State struct CPU had been renamed to CPUState, former CPUState to CPUArchState. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-04-24qom: Refine container_get() to allow using a custom rootAndreas Färber1-1/+2
Specify the root to search from as argument. This avoids hardcoding "/machine" in some places and makes it more flexible. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-04-02qom: add container_getPaolo Bonzini1-0/+24
This is QOM "mkdir -p". It is useful when referring to container objects such as "/machine". Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14qom: Introduce CPU classAndreas Färber1-0/+75
Reintroduce CPUState as QOM object: It's abstract and derived directly from TYPE_OBJECT for compatibility with the user emulators. The identifier CPUState avoids conflicts between CPU() and the struct. Introduce $(qom-twice-y) to build it separately for system and for user emulators. Prepare a virtual reset method, (re)introduce cpu_reset() as wrapper. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14qom: Introduce object_class_get_list()Andreas Färber1-0/+11
This function allows to obtain a singly-linked list of classes, which can be sorted by the caller. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-08Spelling fixes in comments (it's -> its)Stefan Weil1-2/+2
* it's -> its (fixed for all files) * dont -> don't (only fixed in a line which was touched by the previous fix) * distrub -> disturb (fixed in the same line) Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-07qom: Fix spelling in documentationStefan Weil1-1/+1
This fixes a new spelling issue which was detected by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-22qom: Document ways to retrieve child object added by object_property_add_child()Alexander Barabash1-0/+4
object_property_add_child() creates a property whose values as a string is the child object's canonical path. Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alexander Barabash <alexander_barabash@mentor.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22qom: add generic string parsing/printingPaolo Bonzini1-0/+24
Add generic property accessors that take a string and parse it appropriately for the property type. All the magic here is done by the new string-based visitors. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-17qom: Fix identifiers in documentationAndreas Färber1-2/+2
Fixes gtk-doc warnings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17qom: Fix typo in Object's documentationAndreas Färber1-1/+1
Fixes a warning from gtk-doc. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-15qom: Unify type registrationAndreas Färber1-2/+2
Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-07qom: add property get/set wrappers for linksPaolo Bonzini1-0/+24
These can set a link to any object, as long as it is included in the composition tree. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-07qom: add object_resolve_path_typePaolo Bonzini1-2/+23
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-07qom: add property get/set wrappers for C typesPaolo Bonzini1-0/+70
Add wrappers that let you get/set properties using normal C data types. Reviewed-by: Anthony Liguori <anthony@aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-07qom: add QObject-based property get/set wrappersPaolo Bonzini1-0/+42
Move the creation of QmpInputVisitor and QmpOutputVisitor from qmp.c to qom/object.c, since it's the only practical way to access object properties. Keep this isolated such that it's easy to remove. At some point, we need to remove all usage of QObject in the tree and replace it with GVariant. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-07qom: more documentation on subclassingPaolo Bonzini1-3/+73
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-07qom: clean up cast macrosPaolo Bonzini1-7/+15
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-03qom: move properties from qdev to objectAnthony Liguori1-1/+224
This is mostly code movement although not entirely. This makes properties part of the Object base class which means that we can now start using Object in a meaningful way outside of qdev. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: register all types natively through QEMU Object ModelAnthony Liguori1-0/+2
This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree. The first step was a sed-based addition of the parent type to the subclass registration functions. The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate. Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls. We are almost fully converted to QOM after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qom: allow object_class_foreach to take additional parameters to refine searchAnthony Liguori1-0/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-27qom: add the base Object class (v2)Anthony Liguori1-0/+436
This class provides the main building block for QEMU Object Model and is extensively documented in the header file. It is largely inspired by GObject. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - remove printf() in type registration - fix typo in comment (Paolo) - make Interface private - move object into a new directory and move header into include/qemu/ - don't make object.h depend on qemu-common.h - remove Type and replace it with TypeImpl * (Paolo) - use hash table to store types (Paolo) - aggressively cache parent type (Paolo) - make a type_register and use it with interfaces (Paolo) - fix interface cast comment (Paolo) - add a few more functions required in later series