gboolean finished;
};
-static const int hwcaps[] = {
+static const uint32_t devopts[] = {
SR_CONF_CAPTUREFILE,
SR_CONF_CAPTURE_UNITSIZE,
SR_CONF_SAMPLERATE,
return SR_OK;
}
-static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
+static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
{
struct session_vdev *vdev;
(void)cg;
- switch (id) {
+ switch (key) {
case SR_CONF_SAMPLERATE:
if (sdi) {
vdev = sdi->priv;
return SR_OK;
}
-static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
+static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
{
struct session_vdev *vdev;
vdev = sdi->priv;
- switch (id) {
+ switch (key) {
case SR_CONF_SAMPLERATE:
vdev->samplerate = g_variant_get_uint64(data);
sr_info("Setting samplerate to %" PRIu64 ".", vdev->samplerate);
return SR_OK;
}
-static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
+static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
{
(void)sdi;
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
- *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
- hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
+ *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
+ devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;