* Add a device to the current session.
*
* @param dev The device to add to the current session. Must not be NULL.
- * Also, dev->plugin and dev->plugin->opendev must not be NULL.
+ * Also, dev->plugin and dev->plugin->dev_open must not be NULL.
*
* @return SR_OK upon success, SR_ERR_ARG upon invalid arguments.
*/
return SR_ERR_ARG;
}
- if (!dev->plugin->opendev) {
- sr_err("session: %s: dev->plugin->opendev was NULL",
+ if (!dev->plugin->dev_open) {
+ sr_err("session: %s: dev->plugin->dev_open was NULL",
__func__);
return SR_ERR_ARG;
}
return SR_ERR; /* TODO: SR_ERR_BUG? */
}
- if ((ret = dev->plugin->opendev(dev->plugin_index)) != SR_OK) {
- sr_err("session: %s: opendev failed (%d)", __func__, ret);
+ if ((ret = dev->plugin->dev_open(dev->plugin_index)) != SR_OK) {
+ sr_err("session: %s: dev_open failed (%d)", __func__, ret);
return ret;
}
for (l = session->devs; l; l = l->next) {
dev = l->data;
/* TODO: Check for dev != NULL. */
- if ((ret = dev->plugin->acquisition_start(
+ if ((ret = dev->plugin->dev_acquisition_start(
dev->plugin_index, dev)) != SR_OK) {
sr_err("session: %s: could not start an acquisition "
"(%d)", __func__, ret);
dev = l->data;
/* Check for dev != NULL. */
if (dev->plugin) {
- if (dev->plugin->acquisition_stop)
- dev->plugin->acquisition_stop(dev->plugin_index, dev);
+ if (dev->plugin->dev_acquisition_stop)
+ dev->plugin->dev_acquisition_stop(dev->plugin_index, dev);
if (dev->plugin->cleanup)
dev->plugin->cleanup();
}