simple_dispatcher
interface is used for
subscribing to changes of some monitored state. The interface is
currently used for subscribing to changes in frequencies and to
changes in frequency scale factors, via the interfaces
frequency_listener
and
scale_factor_listener
, respectively.
A device subscribes with the subscribe function. Before this function returns, it should send a signal to the calling object, telling the current state. After this, signals should be sent whenever the monitored state changes.
The function unsubscribe should be used to unsubscribe from monitored changes. A listener may not subscribe or unsubscribe twice on the same port.
SIM_INTERFACE(simple_dispatcher) { void (*subscribe)(conf_object_t *NOTNULL bus, conf_object_t *NOTNULL listener, const char *listener_port); void (*unsubscribe)(conf_object_t *NOTNULL bus, conf_object_t *NOTNULL listener, const char *listener_port); }; #define SIMPLE_DISPATCHER_INTERFACE "simple_dispatcher"