sr: rename hwplugin functions to sr_thing_action format
This commit is contained in:
parent
e0c25ac99c
commit
c532476aa7
|
@ -38,7 +38,7 @@ SR_API int sr_init(void)
|
|||
*/
|
||||
SR_API int sr_exit(void)
|
||||
{
|
||||
sr_cleanup_hwplugins();
|
||||
sr_hwplugins_cleanup();
|
||||
|
||||
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_list_hwplugins())) {
|
||||
if (!(plugins = sr_hwplugins_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_init_hwplugin(plugin);
|
||||
sr_hwplugin_init(plugin);
|
||||
}
|
||||
|
||||
return SR_OK;
|
||||
|
|
|
@ -108,7 +108,7 @@ SR_PRIV int load_hwplugins(void)
|
|||
*
|
||||
* @return A GSList of pointers to loaded plugins.
|
||||
*/
|
||||
SR_API GSList *sr_list_hwplugins(void)
|
||||
SR_API GSList *sr_hwplugins_list(void)
|
||||
{
|
||||
|
||||
return plugins;
|
||||
|
@ -124,7 +124,7 @@ SR_API GSList *sr_list_hwplugins(void)
|
|||
*
|
||||
* @return The number of devices found and instantiated by the plugin.
|
||||
*/
|
||||
SR_API int sr_init_hwplugin(struct sr_device_plugin *plugin)
|
||||
SR_API int sr_hwplugin_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_init_hwplugin(struct sr_device_plugin *plugin)
|
|||
return num_initialized_devices;
|
||||
}
|
||||
|
||||
SR_PRIV void sr_cleanup_hwplugins(void)
|
||||
SR_PRIV void sr_hwplugins_cleanup(void)
|
||||
{
|
||||
struct sr_device_plugin *plugin;
|
||||
GSList *l;
|
||||
|
|
|
@ -78,7 +78,7 @@ SR_PRIV int sr_err(const char *format, ...);
|
|||
/*--- hwplugin.c ------------------------------------------------------------*/
|
||||
|
||||
SR_PRIV int load_hwplugins(void);
|
||||
SR_PRIV void sr_cleanup_hwplugins(void);
|
||||
SR_PRIV void sr_hwplugins_cleanup(void);
|
||||
|
||||
/*--- session.c -------------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -72,8 +72,8 @@ SR_API int sr_filter_probes(int in_unitsize, int out_unitsize,
|
|||
|
||||
/*--- hwplugin.c ------------------------------------------------------------*/
|
||||
|
||||
SR_API GSList *sr_list_hwplugins(void);
|
||||
SR_API int sr_init_hwplugin(struct sr_device_plugin *plugin);
|
||||
SR_API GSList *sr_hwplugins_list(void);
|
||||
SR_API int sr_hwplugin_init(struct sr_device_plugin *plugin);
|
||||
SR_API gboolean sr_has_hwcap(int *capabilities, int hwcap);
|
||||
SR_API struct sr_hwcap_option *sr_find_hwcap_option(int hwcap);
|
||||
|
||||
|
|
Loading…
Reference in New Issue