gobj_find_subscriptions()

gobj_find_subscriptions()#

Retrieves a list of event subscriptions for a given publisher, filtering by event, keyword parameters, and subscriber.

Prototype

json_t *gobj_find_subscriptions(
    hgobj       publisher,
    gobj_event_t event,
    json_t      *kw,
    hgobj       subscriber
);

Parameters

Key

Type

Description

publisher

hgobj

The publisher object whose subscriptions are being queried.

event

gobj_event_t

The event name to filter subscriptions. If NULL, all events are considered.

kw

json_t *

A JSON object containing filtering parameters such as __config__, __global__, __local__, and __filter__. If NULL, no additional filtering is applied.

subscriber

hgobj

The subscriber object to filter subscriptions. If NULL, all subscribers are considered.


Return Value

A JSON array containing the matching subscriptions. Each subscription is represented as a JSON object. The caller is responsible for freeing the returned JSON object.

Notes

This function is useful for inspecting active subscriptions and can be used in conjunction with gobj_unsubscribe_list() to remove subscriptions.

Prototype

// Not applicable in JS

Prototype

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