Helper class to emit signals from C code. More...
Related Functions | |
(Note that these are not member functions.) | |
| adbus_Signal * | adbus_sig_new (adbus_Member *mbr) |
| Create a new signal for the given member. | |
| void | adbus_sig_free (adbus_Signal *s) |
| Frees the signal. | |
| void | adbus_sig_reset (adbus_Signal *s) |
| Removes all current bindings. | |
| void | adbus_sig_bind (adbus_Signal *s, adbus_Connection *c, const char *path, int pathSize) |
| Adds a path/connection to emit on. | |
| adbus_MsgFactory * | adbus_sig_msg (adbus_Signal *s) |
| Resets and returns the internal message factory. | |
| void | adbus_sig_emit (adbus_Signal *s) |
| Emits the signal on all bound path/connection combos. | |
Helper class to emit signals from C code.
adbus_Signal can be bound to the same member on any number of paths on any number of connections. The workflow to emit a signal is:
For example:
void EmitSignal() { adbus_MsgFactory* m = adbus_sig_msg(my_signal); adbus_msg_string(m, "foo", -1); adbus_sig_emit(my_signal); }
| void adbus_sig_emit | ( | adbus_Signal * | s | ) | [related] |
Emits the signal on all bound path/connection combos.
If there are any arguments they should have already been added by getting the message factory with adbus_sig_msg() and appending them.
| adbus_MsgFactory * adbus_sig_msg | ( | adbus_Signal * | s | ) | [related] |
Resets and returns the internal message factory.
1.6.1