sr: rename hwplugin functions to sr_thing_action format

This commit is contained in:
Bert Vermeulen 2012-02-13 15:23:16 +01:00
parent e0c25ac99c
commit c532476aa7
5 changed files with 9 additions and 9 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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 -------------------------------------------------------------*/

View File

@ -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);