sr: rename all sr_hwplugin(s)_* functions to sr_hw_*
This commit is contained in:
parent
9fc6aa0a56
commit
93a04e3be9
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
SR_API int sr_init(void)
|
||||
{
|
||||
return sr_hwplugins_load();
|
||||
return sr_hw_load_all();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,7 @@ SR_API int sr_init(void)
|
|||
*/
|
||||
SR_API int sr_exit(void)
|
||||
{
|
||||
sr_hwplugins_cleanup();
|
||||
sr_hw_cleanup_all();
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
|
4
device.c
4
device.c
|
@ -62,7 +62,7 @@ SR_API int sr_dev_scan(void)
|
|||
GSList *plugins, *l;
|
||||
struct sr_device_plugin *plugin;
|
||||
|
||||
if (!(plugins = sr_hwplugins_list())) {
|
||||
if (!(plugins = sr_hw_list())) {
|
||||
sr_err("dev: %s: no supported devices/hwplugins", __func__);
|
||||
return SR_ERR; /* TODO: More specific error? */
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ SR_API int sr_dev_scan(void)
|
|||
for (l = plugins; l; l = l->next) {
|
||||
plugin = l->data;
|
||||
/* TODO: Handle 'plugin' being NULL. */
|
||||
sr_hwplugin_init(plugin);
|
||||
sr_hw_init(plugin);
|
||||
}
|
||||
|
||||
return SR_OK;
|
||||
|
|
16
hwplugin.c
16
hwplugin.c
|
@ -68,7 +68,7 @@ extern struct sr_device_plugin alsa_plugin_info;
|
|||
#endif
|
||||
|
||||
/* TODO: No linked list needed, this can be a simple array. */
|
||||
SR_PRIV int sr_hwplugins_load(void)
|
||||
SR_PRIV int sr_hw_load_all(void)
|
||||
{
|
||||
#ifdef HAVE_LA_DEMO
|
||||
plugins = g_slist_append(plugins, (gpointer *)&demo_plugin_info);
|
||||
|
@ -108,7 +108,7 @@ SR_PRIV int sr_hwplugins_load(void)
|
|||
*
|
||||
* @return A GSList of pointers to loaded plugins.
|
||||
*/
|
||||
SR_API GSList *sr_hwplugins_list(void)
|
||||
SR_API GSList *sr_hw_list(void)
|
||||
{
|
||||
|
||||
return plugins;
|
||||
|
@ -124,7 +124,7 @@ SR_API GSList *sr_hwplugins_list(void)
|
|||
*
|
||||
* @return The number of devices found and instantiated by the plugin.
|
||||
*/
|
||||
SR_API int sr_hwplugin_init(struct sr_device_plugin *plugin)
|
||||
SR_API int sr_hw_init(struct sr_device_plugin *plugin)
|
||||
{
|
||||
int num_devices, num_probes, i, j;
|
||||
int num_initialized_devices = 0;
|
||||
|
@ -154,7 +154,7 @@ SR_API int sr_hwplugin_init(struct sr_device_plugin *plugin)
|
|||
return num_initialized_devices;
|
||||
}
|
||||
|
||||
SR_PRIV void sr_hwplugins_cleanup(void)
|
||||
SR_PRIV void sr_hw_cleanup_all(void)
|
||||
{
|
||||
struct sr_device_plugin *plugin;
|
||||
GSList *l;
|
||||
|
@ -272,7 +272,7 @@ SR_PRIV void sr_serial_dev_inst_free(
|
|||
*
|
||||
* @return TRUE if found, FALSE otherwise.
|
||||
*/
|
||||
SR_API gboolean sr_hwplugin_has_hwcap(struct sr_device_plugin *plugin, int hwcap)
|
||||
SR_API gboolean sr_hw_has_hwcap(struct sr_device_plugin *plugin, int hwcap)
|
||||
{
|
||||
int *capabilities, i;
|
||||
|
||||
|
@ -286,14 +286,14 @@ SR_API gboolean sr_hwplugin_has_hwcap(struct sr_device_plugin *plugin, int hwcap
|
|||
}
|
||||
|
||||
/**
|
||||
* Find a hardware plugin capability option.
|
||||
* Get a hardware plugin capability option.
|
||||
*
|
||||
* @param hwcap The capability to find
|
||||
* @param hwcap The capability to get.
|
||||
*
|
||||
* @return A struct with information about the parameter, or NULL
|
||||
* if not found.
|
||||
*/
|
||||
SR_API struct sr_hwcap_option *sr_hwplugins_hwcap_get(int hwcap)
|
||||
SR_API struct sr_hwcap_option *sr_hw_hwcap_get(int hwcap)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -77,8 +77,8 @@ SR_PRIV int sr_err(const char *format, ...);
|
|||
|
||||
/*--- hwplugin.c ------------------------------------------------------------*/
|
||||
|
||||
SR_PRIV int sr_hwplugins_load(void);
|
||||
SR_PRIV void sr_hwplugins_cleanup(void);
|
||||
SR_PRIV int sr_hw_load_all(void);
|
||||
SR_PRIV void sr_hw_cleanup_all(void);
|
||||
|
||||
/*--- session.c -------------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -72,10 +72,10 @@ SR_API int sr_filter_probes(int in_unitsize, int out_unitsize,
|
|||
|
||||
/*--- hwplugin.c ------------------------------------------------------------*/
|
||||
|
||||
SR_API GSList *sr_hwplugins_list(void);
|
||||
SR_API int sr_hwplugin_init(struct sr_device_plugin *plugin);
|
||||
SR_API gboolean sr_hwplugin_has_hwcap(struct sr_device_plugin *plugin, int hwcap);
|
||||
SR_API struct sr_hwcap_option *sr_hwplugins_hwcap_get(int hwcap);
|
||||
SR_API GSList *sr_hw_list(void);
|
||||
SR_API int sr_hw_init(struct sr_device_plugin *plugin);
|
||||
SR_API gboolean sr_hw_has_hwcap(struct sr_device_plugin *plugin, int hwcap);
|
||||
SR_API struct sr_hwcap_option *sr_hw_hwcap_get(int hwcap);
|
||||
|
||||
/*--- session.c -------------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue