From: Bert Vermeulen Date: Sun, 12 Feb 2012 22:57:43 +0000 (+0100) Subject: sr: public/private API cleanup in hwplugin X-Git-Tag: libsigrok-0.1.0~134 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bb08ee2e534a7fca22cff2f8d963d64441b6d65a;p=libsigrok.git sr: public/private API cleanup in hwplugin --- diff --git a/hwplugin.c b/hwplugin.c index b582d97f..06cd9690 100644 --- a/hwplugin.c +++ b/hwplugin.c @@ -135,7 +135,7 @@ SR_API int sr_init_hwplugins(struct sr_device_plugin *plugin) return num_initialized_devices; } -SR_API void sr_cleanup_hwplugins(void) +SR_PRIV void sr_cleanup_hwplugins(void) { struct sr_device_plugin *plugin; GSList *l; @@ -147,7 +147,7 @@ SR_API void sr_cleanup_hwplugins(void) } } -SR_API struct sr_device_instance *sr_device_instance_new(int index, int status, +SR_PRIV struct sr_device_instance *sr_device_instance_new(int index, int status, const char *vendor, const char *model, const char *version) { struct sr_device_instance *sdi; @@ -168,7 +168,7 @@ SR_API struct sr_device_instance *sr_device_instance_new(int index, int status, return sdi; } -SR_API struct sr_device_instance *sr_get_device_instance( +SR_PRIV struct sr_device_instance *sr_get_device_instance( GSList *device_instances, int device_index) { struct sr_device_instance *sdi; @@ -184,7 +184,7 @@ SR_API struct sr_device_instance *sr_get_device_instance( return NULL; } -SR_API void sr_device_instance_free(struct sr_device_instance *sdi) +SR_PRIV void sr_device_instance_free(struct sr_device_instance *sdi) { g_free(sdi->priv); g_free(sdi->vendor); @@ -270,12 +270,12 @@ SR_API struct sr_hwcap_option *sr_find_hwcap_option(int hwcap) /* unnecessary level of indirection follows. */ -void sr_source_remove(int fd) +SR_PRIV void sr_source_remove(int fd) { sr_session_source_remove(fd); } -void sr_source_add(int fd, int events, int timeout, +SR_PRIV void sr_source_add(int fd, int events, int timeout, sr_receive_data_callback rcv_cb, void *user_data) { sr_session_source_add(fd, events, timeout, rcv_cb, user_data); diff --git a/sigrok-proto.h b/sigrok-proto.h index 410c0cc4..600decbe 100644 --- a/sigrok-proto.h +++ b/sigrok-proto.h @@ -74,19 +74,19 @@ SR_API int sr_filter_probes(int in_unitsize, int out_unitsize, SR_API GSList *sr_list_hwplugins(void); SR_API int sr_init_hwplugins(struct sr_device_plugin *plugin); -SR_API void sr_cleanup_hwplugins(void); +SR_PRIV void sr_cleanup_hwplugins(void); /* Generic device instances */ -SR_API struct sr_device_instance *sr_device_instance_new(int index, +SR_PRIV struct sr_device_instance *sr_device_instance_new(int index, int status, const char *vendor, const char *model, const char *version); -SR_API struct sr_device_instance *sr_get_device_instance( +SR_PRIV struct sr_device_instance *sr_get_device_instance( GSList *device_instances, int device_index); -SR_API void sr_device_instance_free(struct sr_device_instance *sdi); +SR_PRIV void sr_device_instance_free(struct sr_device_instance *sdi); SR_API int sr_find_hwcap(int *capabilities, int hwcap); SR_API struct sr_hwcap_option *sr_find_hwcap_option(int hwcap); -SR_API void sr_source_remove(int fd); -SR_API void sr_source_add(int fd, int events, int timeout, +SR_PRIV void sr_source_remove(int fd); +SR_PRIV void sr_source_add(int fd, int events, int timeout, sr_receive_data_callback rcv_cb, void *user_data); /*--- session.c -------------------------------------------------------------*/