*
* @retval NULL Error.
* @retval other A pointer to the newly allocated session.
+ *
+ * @since 0.1.0
*/
SR_API struct sr_session *sr_session_new(void)
{
*
* @retval SR_OK Success.
* @retval SR_ERR_BUG No session exists.
+ *
+ * @since 0.1.0
*/
SR_API int sr_session_destroy(void)
{
*
* @retval SR_OK Success.
* @retval SR_ERR_BUG No session exists.
+ *
+ * @since 0.1.0
*/
SR_API int sr_session_dev_remove_all(void)
{
* @retval SR_OK Success.
* @retval SR_ERR_ARG Invalid argument.
* @retval SR_ERR_BUG No session exists.
+ *
+ * @since 0.2.0
*/
SR_API int sr_session_dev_add(const struct sr_dev_inst *sdi)
{
*
* @retval SR_OK Success.
* @retval SR_ERR Invalid argument.
+ *
+ * @since 0.3.0
*/
SR_API int sr_session_dev_list(GSList **devlist)
{
*
* @retval SR_OK Success.
* @retval SR_ERR_BUG No session exists.
+ *
+ * @since 0.1.0
*/
SR_API int sr_session_datafeed_callback_remove_all(void)
{
*
* @retval SR_OK Success.
* @retval SR_ERR_BUG No session exists.
+ *
+ * @since 0.3.0
*/
SR_API int sr_session_datafeed_callback_add(sr_datafeed_callback cb, void *cb_data)
{
*
* @retval SR_OK Success.
* @retval SR_ERR Error occured.
+ *
+ * @since 0.1.0
*/
SR_API int sr_session_start(void)
{
*
* @retval SR_OK Success.
* @retval SR_ERR_BUG Error occured.
+ *
+ * @since 0.1.0
*/
SR_API int sr_session_run(void)
{
*
* @retval SR_OK Success.
* @retval SR_ERR_BUG No session exists.
+ *
+ * @since 0.1.0
*/
SR_API int sr_session_stop(void)
{
* @retval SR_OK Success.
* @retval SR_ERR_ARG Invalid argument.
* @retval SR_ERR_MALLOC Memory allocation error.
+ *
+ * @since 0.3.0
*/
SR_API int sr_session_source_add(int fd, int events, int timeout,
sr_receive_data_callback cb, void *cb_data)
* @retval SR_OK Success.
* @retval SR_ERR_ARG Invalid argument.
* @retval SR_ERR_MALLOC Memory allocation error.
+ *
+ * @since 0.3.0
*/
SR_API int sr_session_source_add_pollfd(GPollFD *pollfd, int timeout,
sr_receive_data_callback cb, void *cb_data)
* @retval SR_OK Success.
* @retval SR_ERR_ARG Invalid argument.
* @retval SR_ERR_MALLOC Memory allocation error.
+ *
+ * @since 0.3.0
*/
SR_API int sr_session_source_add_channel(GIOChannel *channel, int events,
int timeout, sr_receive_data_callback cb, void *cb_data)
* @retval SR_ERR_ARG Invalid argument
* @retval SR_ERR_MALLOC Memory allocation error.
* @retval SR_ERR_BUG Internal error.
+ *
+ * @since 0.3.0
*/
SR_API int sr_session_source_remove(int fd)
{
* @return SR_OK upon success, SR_ERR_ARG upon invalid arguments, or
* SR_ERR_MALLOC upon memory allocation errors, SR_ERR_BUG upon
* internal errors.
+ *
+ * @since 0.2.0
*/
SR_API int sr_session_source_remove_pollfd(GPollFD *pollfd)
{
* @retval SR_ERR_ARG Invalid argument.
* @retval SR_ERR_MALLOC Memory allocation error.
* @return SR_ERR_BUG Internal error.
+ *
+ * @since 0.2.0
*/
SR_API int sr_session_source_remove_channel(GIOChannel *channel)
{