sr/cli/gtk/qt: s/get_dev_info/dev_info_get/.

This commit is contained in:
Uwe Hermann 2012-02-18 11:41:21 +01:00
parent a7d05fcb38
commit 5097b0d091
21 changed files with 45 additions and 45 deletions

View File

@ -424,7 +424,7 @@ SR_API int sr_dev_info_get(const struct sr_dev *dev, int id, const void **data)
if (data == NULL)
return SR_ERR_ARG;
*data = dev->plugin->get_dev_info(dev->plugin_index, id);
*data = dev->plugin->dev_info_get(dev->plugin_index, id);
if (*data == NULL)
return SR_ERR;

View File

@ -165,7 +165,7 @@ static int hw_cleanup(void)
return SR_OK;
}
static void *hw_get_dev_info(int dev_index, int dev_info_id)
static void *hw_dev_info_get(int dev_index, int dev_info_id)
{
struct sr_dev_inst *sdi;
struct alsa *alsa;
@ -400,7 +400,7 @@ SR_PRIV struct sr_dev_plugin alsa_plugin_info = {
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = hw_closedev,
.get_dev_info = hw_get_dev_info,
.dev_info_get = hw_dev_info_get,
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,

View File

@ -744,7 +744,7 @@ static int hw_cleanup(void)
return ret;
}
static void *hw_get_dev_info(int dev_index, int dev_info_id)
static void *hw_dev_info_get(int dev_index, int dev_info_id)
{
struct sr_dev_inst *sdi;
struct sigma *sigma;
@ -1419,7 +1419,7 @@ SR_PRIV struct sr_dev_plugin asix_sigma_plugin_info = {
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = hw_closedev,
.get_dev_info = hw_get_dev_info,
.dev_info_get = hw_dev_info_get,
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,

View File

@ -111,7 +111,7 @@ struct la8 {
uint8_t divcount;
};
/* This will be initialized via hw_get_dev_info()/SR_DI_SAMPLERATES. */
/* This will be initialized via hw_dev_info_get()/SR_DI_SAMPLERATES. */
static uint64_t supported_samplerates[255 + 1] = { 0 };
/*
@ -693,7 +693,7 @@ static int hw_cleanup(void)
return ret;
}
static void *hw_get_dev_info(int dev_index, int dev_info_id)
static void *hw_dev_info_get(int dev_index, int dev_info_id)
{
struct sr_dev_inst *sdi;
struct la8 *la8;
@ -1121,7 +1121,7 @@ SR_PRIV struct sr_dev_plugin chronovu_la8_plugin_info = {
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = hw_closedev,
.get_dev_info = hw_get_dev_info,
.dev_info_get = hw_dev_info_get,
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,

View File

@ -180,7 +180,7 @@ static int hw_cleanup(void)
return SR_OK;
}
static void *hw_get_dev_info(int dev_index, int dev_info_id)
static void *hw_dev_info_get(int dev_index, int dev_info_id)
{
struct sr_dev_inst *sdi;
void *info = NULL;
@ -497,7 +497,7 @@ SR_PRIV struct sr_dev_plugin demo_plugin_info = {
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = hw_closedev,
.get_dev_info = hw_get_dev_info,
.dev_info_get = hw_dev_info_get,
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,

View File

@ -602,7 +602,7 @@ static int hw_closedev(int dev_index)
return SR_OK;
}
static void *hw_get_dev_info(int dev_index, int dev_info_id)
static void *hw_dev_info_get(int dev_index, int dev_info_id)
{
struct sr_dev_inst *sdi;
struct mso *mso;
@ -837,7 +837,7 @@ SR_PRIV struct sr_dev_plugin link_mso19_plugin_info = {
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = hw_closedev,
.get_dev_info = hw_get_dev_info,
.dev_info_get = hw_dev_info_get,
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,

View File

@ -555,7 +555,7 @@ static int hw_cleanup(void)
return ret;
}
static void *hw_get_dev_info(int dev_index, int dev_info_id)
static void *hw_dev_info_get(int dev_index, int dev_info_id)
{
struct sr_dev_inst *sdi;
struct ols_dev *ols;
@ -1045,7 +1045,7 @@ SR_PRIV struct sr_dev_plugin ols_plugin_info = {
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = hw_closedev,
.get_dev_info = hw_get_dev_info,
.dev_info_get = hw_dev_info_get,
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,

View File

@ -500,7 +500,7 @@ static int hw_cleanup(void)
return ret;
}
static void *hw_get_dev_info(int dev_index, int dev_info_id)
static void *hw_dev_info_get(int dev_index, int dev_info_id)
{
struct sr_dev_inst *sdi;
struct fx2_dev *fx2;
@ -898,7 +898,7 @@ SR_PRIV struct sr_dev_plugin saleae_logic_plugin_info = {
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = hw_closedev,
.get_dev_info = hw_get_dev_info,
.dev_info_get = hw_dev_info_get,
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,

View File

@ -507,7 +507,7 @@ static int hw_cleanup(void)
return SR_OK;
}
static void *hw_get_dev_info(int dev_index, int dev_info_id)
static void *hw_dev_info_get(int dev_index, int dev_info_id)
{
struct sr_dev_inst *sdi;
struct zp *zp;
@ -736,7 +736,7 @@ SR_PRIV struct sr_dev_plugin zeroplus_logic_cube_plugin_info = {
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = hw_closedev,
.get_dev_info = hw_get_dev_info,
.dev_info_get = hw_dev_info_get,
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,

View File

@ -134,8 +134,8 @@ SR_API int sr_hw_init(struct sr_dev_plugin *plugin)
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) {

View File

@ -136,7 +136,7 @@ static int init(struct sr_output *o, int default_spl, enum outputmode mode)
snprintf(ctx->header, 511, "%s\n", PACKAGE_STRING);
num_probes = g_slist_length(o->dev->probes);
if (o->dev->plugin && sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
samplerate = *((uint64_t *) o->dev->plugin->get_dev_info(
samplerate = *((uint64_t *) o->dev->plugin->dev_info_get(
o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
if (!(samplerate_s = sr_samplerate_string(samplerate))) {
g_free(ctx->header);

View File

@ -125,7 +125,7 @@ static int init(struct sr_output *o)
num_probes = g_slist_length(o->dev->probes);
if (sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
samplerate = *((uint64_t *) o->dev->plugin->get_dev_info(
samplerate = *((uint64_t *) o->dev->plugin->dev_info_get(
o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
/* TODO: Error checks. */
} else {

View File

@ -92,7 +92,7 @@ static int init(struct sr_output *o)
num_probes = g_slist_length(o->dev->probes);
if (sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
samplerate = *((uint64_t *) o->dev->plugin->get_dev_info(
samplerate = *((uint64_t *) o->dev->plugin->dev_info_get(
o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
/* TODO: Error checks. */
} else {

View File

@ -101,7 +101,7 @@ static int init(struct sr_output *o)
num_probes = g_slist_length(o->dev->probes);
comment[0] = '\0';
if (sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
samplerate = *((uint64_t *) o->dev->plugin->get_dev_info(
samplerate = *((uint64_t *) o->dev->plugin->dev_info_get(
o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
if (!(frequency_s = sr_samplerate_string(samplerate))) {
sr_err("gnuplot out: %s: sr_samplerate_string failed",
@ -325,7 +325,7 @@ static int analog_init(struct sr_output *o)
num_probes = g_slist_length(o->dev->probes);
comment[0] = '\0';
if (o->dev->plugin && sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
samplerate = *((uint64_t *) o->dev->plugin->get_dev_info(
samplerate = *((uint64_t *) o->dev->plugin->dev_info_get(
o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
if (!(frequency_s = sr_samplerate_string(samplerate))) {
g_free(ctx->header);

View File

@ -61,7 +61,7 @@ static int init(struct sr_output *o)
ctx->unitsize = (num_enabled_probes + 7) / 8;
if (o->dev->plugin && sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE))
samplerate = *((uint64_t *) o->dev->plugin->get_dev_info(
samplerate = *((uint64_t *) o->dev->plugin->dev_info_get(
o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
else
samplerate = 0;

View File

@ -111,7 +111,7 @@ SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode)
snprintf(ctx->header, 511, "%s\n", PACKAGE_STRING);
num_probes = g_slist_length(o->dev->probes);
if (o->dev->plugin || sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
samplerate = *((uint64_t *) o->dev->plugin->get_dev_info(
samplerate = *((uint64_t *) o->dev->plugin->dev_info_get(
o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
if (!(samplerate_s = sr_samplerate_string(samplerate))) {
g_free(ctx->header);

View File

@ -85,7 +85,7 @@ static int init(struct sr_output *o)
PACKAGE, PACKAGE_VERSION);
if (o->dev->plugin && sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
ctx->samplerate = *((uint64_t *) o->dev->plugin->get_dev_info(
ctx->samplerate = *((uint64_t *) o->dev->plugin->dev_info_get(
o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
if (!((samplerate_s = sr_samplerate_string(ctx->samplerate)))) {
g_string_free(ctx->header, TRUE);

View File

@ -194,7 +194,7 @@ static int hw_opendev(int dev_index)
return SR_OK;
}
static void *hw_get_dev_info(int dev_index, int dev_info_id)
static void *hw_dev_info_get(int dev_index, int dev_info_id)
{
struct session_vdev *vdev;
void *info;
@ -332,17 +332,17 @@ static int hw_start_acquisition(int dev_index, gpointer session_dev_id)
}
SR_PRIV struct sr_dev_plugin session_driver = {
"session",
"Session-emulating driver",
1,
hw_init,
hw_cleanup,
hw_opendev,
NULL,
hw_get_dev_info,
hw_get_status,
hw_hwcap_get_all,
hw_config_set,
hw_start_acquisition,
NULL,
.name = "session",
.longname = "Session-emulating driver",
.api_version = 1,
.init = hw_init,
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = NULL,
.dev_info_get = hw_dev_info_get,
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,
.start_acquisition = hw_start_acquisition,
.stop_acquisition = NULL,
};

View File

@ -227,7 +227,7 @@ int sr_session_save(const char *filename)
fprintf(meta, "unitsize = %d\n", ds->ds_unitsize);
fprintf(meta, "total probes = %d\n", g_slist_length(dev->probes));
if (sr_dev_has_hwcap(dev, SR_HWCAP_SAMPLERATE)) {
samplerate = *((uint64_t *) dev->plugin->get_dev_info(
samplerate = *((uint64_t *) dev->plugin->dev_info_get(
dev->plugin_index, SR_DI_CUR_SAMPLERATE));
s = sr_samplerate_string(samplerate);
fprintf(meta, "samplerate = %s\n", s);

View File

@ -349,7 +349,7 @@ struct sr_dev_plugin {
/* Device-specific */
int (*opendev) (int dev_index);
int (*closedev) (int dev_index);
void *(*get_dev_info) (int dev_index, int dev_info_id);
void *(*dev_info_get) (int dev_index, int dev_info_id);
int (*get_status) (int dev_index);
int *(*hwcap_get_all) (void);
int (*config_set) (int dev_index, int hwcap, void *value);

View File

@ -131,7 +131,7 @@ SR_API char **sr_parse_triggerstring(struct sr_dev *dev,
}
tokens = g_strsplit(triggerstring, ",", max_probes);
trigger_types = dev->plugin->get_dev_info(0, SR_DI_TRIGGER_TYPES);
trigger_types = dev->plugin->dev_info_get(0, SR_DI_TRIGGER_TYPES);
if (trigger_types == NULL)
return NULL;