input: s/format/module in all naming.

This commit is contained in:
Bert Vermeulen 2014-08-03 15:11:24 +02:00
parent 81a3497655
commit d4c937749a
9 changed files with 24 additions and 24 deletions

View File

@ -443,13 +443,13 @@ struct sr_option {
GSList *values;
};
/** Input (file) format struct. */
/** Input (file) module struct. */
struct sr_input {
/**
* A pointer to this input format's 'struct sr_input_format'.
* A pointer to this input module's 'struct sr_input_module'.
* The frontend can use this to call the module's callbacks.
*/
struct sr_input_format *format;
struct sr_input_module *module;
GHashTable *param;
@ -458,13 +458,13 @@ struct sr_input {
void *internal;
};
/** Input (file) format driver. */
struct sr_input_format {
/** The unique ID for this input format. Must not be NULL. */
/** Input (file) module driver. */
struct sr_input_module {
/** The unique ID for this input module. Must not be NULL. */
char *id;
/**
* A short description of the input format, which can (for example)
* A short description of the input module, which can (for example)
* be displayed to the user by frontends. Must not be NULL.
*/
char *description;

View File

@ -124,7 +124,7 @@ SR_API int sr_session_source_remove_channel(struct sr_session *session,
/*--- input/input.c ---------------------------------------------------------*/
SR_API struct sr_input_format **sr_input_list(void);
SR_API struct sr_input_module **sr_input_list(void);
/*--- output/output.c -------------------------------------------------------*/

View File

@ -215,7 +215,7 @@ static int sanity_check_all_drivers(void)
static int sanity_check_all_input_modules(void)
{
int i, errors, ret = SR_OK;
struct sr_input_format **inputs;
struct sr_input_module **inputs;
const char *d;
sr_spew("Sanity-checking all input modules.");

View File

@ -142,7 +142,7 @@ static int loadfile(struct sr_input *in, const char *filename)
return SR_OK;
}
SR_PRIV struct sr_input_format input_binary = {
SR_PRIV struct sr_input_module input_binary = {
.id = "binary",
.description = "Raw binary",
.format_match = format_match,

View File

@ -197,7 +197,7 @@ static int loadfile(struct sr_input *in, const char *filename)
return SR_OK;
}
SR_PRIV struct sr_input_format input_chronovu_la8 = {
SR_PRIV struct sr_input_module input_chronovu_la8 = {
.id = "chronovu-la8",
.description = "ChronoVu LA8",
.format_match = format_match,

View File

@ -863,7 +863,7 @@ static int loadfile(struct sr_input *in, const char *filename)
return SR_OK;
}
SR_PRIV struct sr_input_format input_csv = {
SR_PRIV struct sr_input_module input_csv = {
.id = "csv",
.description = "Comma-separated values (CSV)",
.format_match = format_match,

View File

@ -27,9 +27,9 @@
*/
/**
* @defgroup grp_input Input formats
* @defgroup grp_input Input modules
*
* Input file/data format handling.
* Input file/data module handling.
*
* libsigrok can process acquisition data in several different ways.
* Aside from acquiring data from a hardware device, it can also take it from
@ -43,21 +43,21 @@
* Every input module is "pluggable", meaning it's handled as being separate
* from the main libsigrok, but linked in to it statically. To keep things
* modular and separate like this, functions within an input module should be
* declared static, with only the respective 'struct sr_input_format' being
* declared static, with only the respective 'struct sr_input_module' being
* exported for use into the wider libsigrok namespace.
*
* @{
*/
/** @cond PRIVATE */
extern SR_PRIV struct sr_input_format input_chronovu_la8;
extern SR_PRIV struct sr_input_format input_csv;
extern SR_PRIV struct sr_input_format input_binary;
extern SR_PRIV struct sr_input_format input_vcd;
extern SR_PRIV struct sr_input_format input_wav;
extern SR_PRIV struct sr_input_module input_chronovu_la8;
extern SR_PRIV struct sr_input_module input_csv;
extern SR_PRIV struct sr_input_module input_binary;
extern SR_PRIV struct sr_input_module input_vcd;
extern SR_PRIV struct sr_input_module input_wav;
/* @endcond */
static struct sr_input_format *input_module_list[] = {
static struct sr_input_module *input_module_list[] = {
&input_vcd,
&input_chronovu_la8,
&input_wav,
@ -68,7 +68,7 @@ static struct sr_input_format *input_module_list[] = {
};
/** @since 0.1.0 */
SR_API struct sr_input_format **sr_input_list(void)
SR_API struct sr_input_module **sr_input_list(void)
{
return input_module_list;
}

View File

@ -535,7 +535,7 @@ static int loadfile(struct sr_input *in, const char *filename)
return SR_OK;
}
SR_PRIV struct sr_input_format input_vcd = {
SR_PRIV struct sr_input_module input_vcd = {
.id = "vcd",
.description = "Value Change Dump",
.format_match = format_match,

View File

@ -256,7 +256,7 @@ static int loadfile(struct sr_input *in, const char *filename)
}
SR_PRIV struct sr_input_format input_wav = {
SR_PRIV struct sr_input_module input_wav = {
.id = "wav",
.description = "WAV file",
.format_match = format_match,