gobj_topic_hooks()

gobj_topic_hooks()#

Retrieves the hooks of a topic in a TreeDB. The function gobj_topic_hooks() queries the specified topic within a TreeDB and returns its associated hooks.

Prototype

json_t *gobj_topic_hooks(
    hgobj gobj,
    const char *treedb_name,
    const char *topic_name,
    json_t *kw,
    hgobj src
);

Parameters

Key

Type

Description

gobj

hgobj

The GObj instance that manages the TreeDB.

treedb_name

const char *

The name of the TreeDB containing the topic.

topic_name

const char *

The name of the topic whose hooks are to be retrieved.

kw

json_t *

A JSON object containing query parameters. Owned by the caller.

src

hgobj

The source GObj requesting the hooks.


Return Value

Returns a JSON object containing the hooks of the specified topic. If the function fails, it returns NULL.

Notes

[‘If gobj is NULL or destroyed, an error is logged and NULL is returned.’, ‘If gobj does not implement mt_topic_hooks, an error is logged and NULL is returned.’, ‘The returned JSON object must be decremented by the caller when no longer needed.’]

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples