* Add an event source for a GPollFD. * * @param pollfd The GPollFD. * @param timeout Max time to wait before the callback is called, ignored if 0. * @param cb Callback function to add. Must not be NULL. * @param cb_data Data for the callback function. Can be NULL. * * @return SR_OK upon success, SR_ERR_ARG upon invalid arguments, or * SR_ERR_MALLOC upon memory allocation errors. *
| 416 | * SR_ERR_MALLOC upon memory allocation errors. |
| 417 | */ |
| 418 | SR_PRIV int sr_session_source_add_pollfd(GPollFD *pollfd, int timeout, |
| 419 | sr_receive_data_callback_t cb, const struct sr_dev_inst *sdi) |
| 420 | { |
| 421 | return _sr_session_source_add(pollfd, timeout, cb, |
| 422 | sdi, (gintptr)pollfd); |
| 423 | } |
| 424 | |
| 425 | /** |
| 426 | * Add an event source for a GIOChannel. |
nothing calls this directly
no test coverage detected