qdev: Move doc comments from qdev.c to qdev-core.h

The doc-comments which document the qdev API are split between the
header file and the C source files, because as a project we haven't
been consistent about where we put them.

Move all the doc-comments in qdev.c to the header files, so that
users of the APIs don't have to look at the implementation files for
this information.

In the process, unify them into our doc-comment format and expand on
them in some cases to clarify expected use cases.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20200711142425.16283-2-peter.maydell@linaro.org
This commit is contained in:
Peter Maydell
2020-07-11 15:24:23 +01:00
parent 8edbca515c
commit b51238e251
3 changed files with 70 additions and 33 deletions

View File

@@ -282,6 +282,19 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
*/
void qdev_property_add_static(DeviceState *dev, Property *prop);
/**
* qdev_alias_all_properties: Create aliases on source for all target properties
* @target: Device which has properties to be aliased
* @source: Object to add alias properties to
*
* Add alias properties to the @source object for all qdev properties on
* the @target DeviceState.
*
* This is useful when @target is an internal implementation object
* owned by @source, and you want to expose all the properties of that
* implementation object as properties on the @source object so that users
* of @source can set them.
*/
void qdev_alias_all_properties(DeviceState *target, Object *source);
/**