From: Uwe Hermann Date: Thu, 31 Dec 2015 17:55:29 +0000 (+0100) Subject: Update API calls due to recent libsigrok renames. X-Git-Tag: sigrok-cli-0.6.0~1 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=09fc39da486b8618d65b66ca96a760478c3e89e2;p=sigrok-cli.git Update API calls due to recent libsigrok renames. - sr_driver_scan_options() -> sr_driver_scan_options_list() - sr_dev_config_capabilities() -> sr_dev_config_capabilities_list() --- diff --git a/main.c b/main.c index 4305096..2bb2ef7 100644 --- a/main.c +++ b/main.c @@ -78,7 +78,7 @@ int maybe_config_get(struct sr_dev_driver *driver, const struct sr_dev_inst *sdi, struct sr_channel_group *cg, uint32_t key, GVariant **gvar) { - if (sr_dev_config_capabilities(sdi, cg, key) & SR_CONF_GET) + if (sr_dev_config_capabilities_list(sdi, cg, key) & SR_CONF_GET) return sr_config_get(driver, sdi, cg, key, gvar); return SR_ERR_NA; @@ -90,7 +90,7 @@ int maybe_config_set(struct sr_dev_driver *driver, { (void)driver; - if (sr_dev_config_capabilities(sdi, cg, key) & SR_CONF_SET) + if (sr_dev_config_capabilities_list(sdi, cg, key) & SR_CONF_SET) return sr_config_set(sdi, cg, key, gvar); return SR_ERR_NA; @@ -100,7 +100,7 @@ int maybe_config_list(struct sr_dev_driver *driver, const struct sr_dev_inst *sdi, struct sr_channel_group *cg, uint32_t key, GVariant **gvar) { - if (sr_dev_config_capabilities(sdi, cg, key) & SR_CONF_LIST) + if (sr_dev_config_capabilities_list(sdi, cg, key) & SR_CONF_LIST) return sr_config_list(driver, sdi, cg, key, gvar); return SR_ERR_NA; diff --git a/session.c b/session.c index edf3d12..5e096cd 100644 --- a/session.c +++ b/session.c @@ -45,14 +45,14 @@ static int set_limit_time(const struct sr_dev_inst *sdi) return SR_ERR; } - if (sr_dev_config_capabilities(sdi, NULL, SR_CONF_LIMIT_MSEC) + if (sr_dev_config_capabilities_list(sdi, NULL, SR_CONF_LIMIT_MSEC) & SR_CONF_SET) { gvar = g_variant_new_uint64(time_msec); if (sr_config_set(sdi, NULL, SR_CONF_LIMIT_MSEC, gvar) != SR_OK) { g_critical("Failed to configure time limit."); return SR_ERR; } - } else if (sr_dev_config_capabilities(sdi, NULL, SR_CONF_SAMPLERATE) + } else if (sr_dev_config_capabilities_list(sdi, NULL, SR_CONF_SAMPLERATE) & (SR_CONF_GET | SR_CONF_SET)) { /* Convert to samples based on the samplerate. */ sr_config_get(driver, sdi, NULL, SR_CONF_SAMPLERATE, &gvar); diff --git a/show.c b/show.c index 39db85f..54b367c 100644 --- a/show.c +++ b/show.c @@ -241,7 +241,7 @@ void show_drv_detail(struct sr_dev_driver *driver) g_array_free(opts, TRUE); } - if ((opts = sr_driver_scan_options(driver))) { + if ((opts = sr_driver_scan_options_list(driver))) { if (opts->len > 0) { printf("Scan options:\n"); for (i = 0; i < opts->len; i++) { @@ -386,7 +386,7 @@ void show_dev_detail(void) g_variant_unref(gvar_list); } else if (key == SR_CONF_LIMIT_SAMPLES - && (sr_dev_config_capabilities(sdi, NULL, key) + && (sr_dev_config_capabilities_list(sdi, NULL, key) & SR_CONF_LIST)) { /* * If implemented in config_list(), this denotes the