* @return SR_OK upon success, SR_ERR_ARG upon invalid arguments.
* If something other than SR_OK is returned, 'dev' is unchanged.
*/
-SR_API int sr_dev_trigger_clear(struct sr_dev *dev)
+SR_API int sr_dev_trigger_remove_all(struct sr_dev *dev)
{
struct sr_probe *p;
unsigned int pnum; /* TODO: uint16_t? */
}
/**
- * Add a trigger to the specified device.
+ * Add a trigger to the specified device (and the specified probe).
+ *
+ * If the specified probe of this device already has a trigger, it will
+ * be silently replaced.
*
* TODO: Better description.
* TODO: Describe valid format of the 'trigger' string.
*
* @return SR_OK upon success, SR_ERR_BUG if no session exists.
*/
-SR_API int sr_session_dev_clear(void)
+SR_API int sr_session_dev_remove_all(void)
{
if (!session) {
sr_err("session: %s: session was NULL", __func__);
}
/**
- * Clear all datafeed callbacks in the current session.
+ * Remove all datafeed callbacks in the current session.
*
* @return SR_OK upon success, SR_ERR_BUG if no session exists.
*/
-SR_API int sr_session_datafeed_callback_clear(void)
+SR_API int sr_session_datafeed_callback_remove_all(void)
{
if (!session) {
sr_err("session: %s: session was NULL", __func__);
int probenum);
SR_API int sr_dev_probe_name_set(struct sr_dev *dev, int probenum,
const char *name);
-SR_API int sr_dev_trigger_clear(struct sr_dev *dev);
+SR_API int sr_dev_trigger_remove_all(struct sr_dev *dev);
SR_API int sr_dev_trigger_set(struct sr_dev *dev, int probenum,
const char *trigger);
SR_API gboolean sr_dev_has_hwcap(const struct sr_dev *dev, int hwcap);
SR_API int sr_session_load(const char *filename);
SR_API struct sr_session *sr_session_new(void);
SR_API int sr_session_destroy(void);
-SR_API int sr_session_dev_clear(void);
+SR_API int sr_session_dev_remove_all(void);
SR_API int sr_session_dev_add(struct sr_dev *dev);
/* Datafeed setup */
-SR_API int sr_session_datafeed_callback_clear(void);
+SR_API int sr_session_datafeed_callback_remove_all(void);
SR_API int sr_session_datafeed_callback_add(sr_datafeed_callback_t cb);
/* Session control */