gobj_create_default_service()
#
The function gobj_create_default_service()
creates a default service gobj with autostart enabled but autoplay disabled. The service will be played by the yuno’s play method.
Prototype
hgobj gobj_create_default_service(
const char *gobj_name,
gclass_name_t gclass_name,
json_t *kw, // owned
hgobj parent
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The name of the gobj to be created. |
|
|
The name of the gclass to which the gobj belongs. |
|
|
A JSON object containing the configuration parameters for the gobj. The ownership of this object is transferred to the function. |
|
|
The parent gobj under which the new gobj will be created. |
Return Value
Returns a handle to the newly created gobj, or NULL if the creation fails.
Notes
The created gobj is marked as a default service and will be started automatically but not played until explicitly triggered by the yuno’s play method.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples