gobj_activate_snap()#
Activates a previously saved snapshot identified by tag in the given hgobj instance. This operation typically involves stopping and restarting the associated hgobj to restore the saved state.
Prototype
int gobj_activate_snap(
hgobj gobj,
const char *tag,
json_t *kw,
hgobj src
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
The |
|
|
The identifier of the snapshot to activate. |
|
|
Additional options for activation, passed as a JSON object. Owned by the function. |
|
|
The source |
Return Value
Returns 0 on success, or -1 if an error occurs (e.g., if gobj is NULL, destroyed, or if mt_activate_snap is not defined).
Notes
[‘If gobj is NULL or destroyed, an error is logged and the function returns -1.’, “If mt_activate_snap is not defined in the hgobj’s gclass, an error is logged and the function returns -1.”, “The function ensures that the snapshot activation is properly handled by the hgobj’s gclass.”]
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples