num_devs = plugin->init(NULL);
for (i = 0; i < num_devs; i++) {
num_probes = GPOINTER_TO_INT(
- plugin->get_dev_info(i, SR_DI_NUM_PROBES));
- probe_names = (char **)plugin->get_dev_info(i,
+ plugin->dev_info_get(i, SR_DI_NUM_PROBES));
+ probe_names = (char **)plugin->dev_info_get(i,
SR_DI_PROBE_NAMES);
if (!probe_names) {
sdi->index = index;
sdi->status = status;
- sdi->instance_type = -1;
+ sdi->inst_type = -1;
sdi->vendor = vendor ? g_strdup(vendor) : NULL;
sdi->model = model ? g_strdup(model) : NULL;
sdi->version = version ? g_strdup(version) : NULL;
*/
SR_API gboolean sr_hw_has_hwcap(struct sr_dev_plugin *plugin, int hwcap)
{
- int *capabilities, i;
+ int *hwcaps, i;
- capabilities = plugin->get_capabilities();
- for (i = 0; capabilities[i]; i++) {
- if (capabilities[i] == hwcap)
+ hwcaps = plugin->hwcap_get_all();
+ for (i = 0; hwcaps[i]; i++) {
+ if (hwcaps[i] == hwcap)
return TRUE;
}
{
int i;
- for (i = 0; sr_hwcap_options[i].capability; i++) {
- if (sr_hwcap_options[i].capability == hwcap)
+ for (i = 0; sr_hwcap_options[i].hwcap; i++) {
+ if (sr_hwcap_options[i].hwcap == hwcap)
return &sr_hwcap_options[i];
}