pub unsafe extern "C" fn object_property_add(
    obj: *mut Object,
    name: *const c_char,
    type_: *const c_char,
    get: ObjectPropertyAccessor,
    set: ObjectPropertyAccessor,
    release: ObjectPropertyRelease,
    opaque: *mut c_void,
    errp: *mut *mut Error
) -> *mut ObjectProperty
Expand description

object_property_add: @obj: the object to add a property to @name: the name of the property. This can contain any character except for a forward slash. In general, you should use hyphens ‘-’ instead of underscores ‘_’ when naming properties. @type: the type name of the property. This namespace is pretty loosely defined. Sub namespaces are constructed by using a prefix and then to angle brackets. For instance, the type ‘virtio-net-pci’ in the ‘link’ namespace would be ‘link’. @get: The getter to be called to read a property. If this is NULL, then the property cannot be read. @set: the setter to be called to write a property. If this is NULL, then the property cannot be written. @release: called when the property is removed from the object. This is meant to allow a property to free its opaque upon object destruction. This may be NULL. @opaque: an opaque pointer to pass to the callbacks for the property @errp: returns an error if this function fails

Returns: The #ObjectProperty; this can be used to set the @resolve callback for child and link properties.