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? */
}
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;
#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);
*
* @return A GSList of pointers to loaded plugins.
*/
-SR_API GSList *sr_hwplugins_list(void)
+SR_API GSList *sr_hw_list(void)
{
return plugins;
*
* @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;
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;
*
* @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;
}
/**
- * 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;
/*--- 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 -------------------------------------------------------------*/
/*--- 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 -------------------------------------------------------------*/