-void sr_session_source_add(int fd, int events, int timeout,
- sr_receive_data_callback callback, void *user_data)
+/**
+ * TODO.
+ *
+ * TODO: More error checks etc.
+ *
+ * @param fd TODO.
+ * @param events TODO.
+ * @param timeout TODO.
+ * @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.
+ */
+SR_API int sr_session_source_add(int fd, int events, int timeout,
+ sr_receive_data_callback_t cb, void *cb_data)