From: Uwe Hermann Date: Sun, 20 Feb 2011 13:14:13 +0000 (+0100) Subject: Add sr_ prefix to receive_data_callback typedef. X-Git-Tag: libsigrok-0.1.0~318 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a887e3da9714cdfc4ee2eed37e0aa40cf7a5aaea;p=libsigrok.git Add sr_ prefix to receive_data_callback typedef. Also, drop obsolete add_source() prototype from sigrok-cli.h. --- diff --git a/hwplugin.c b/hwplugin.c index c90259c1..e913a9af 100644 --- a/hwplugin.c +++ b/hwplugin.c @@ -236,7 +236,7 @@ void sr_source_remove(int fd) } void sr_source_add(int fd, int events, int timeout, - receive_data_callback rcv_cb, void *user_data) + sr_receive_data_callback rcv_cb, void *user_data) { sr_session_source_add(fd, events, timeout, rcv_cb, user_data); } diff --git a/session.c b/session.c index 2976ce75..65f7a8df 100644 --- a/session.c +++ b/session.c @@ -32,7 +32,7 @@ struct source { int fd; int events; int timeout; - receive_data_callback cb; + sr_receive_data_callback cb; void *user_data; }; @@ -223,7 +223,7 @@ void sr_session_bus(struct sr_device *device, struct sr_datafeed_packet *packet) } void sr_session_source_add(int fd, int events, int timeout, - receive_data_callback callback, void *user_data) + sr_receive_data_callback callback, void *user_data) { struct source *new_sources, *s; diff --git a/sigrok-proto.h b/sigrok-proto.h index 8d1bbd7d..4b4de45b 100644 --- a/sigrok-proto.h +++ b/sigrok-proto.h @@ -87,7 +87,7 @@ int sr_find_hwcap(int *capabilities, int hwcap); struct sr_hwcap_option *sr_find_hwcap_option(int hwcap); void sr_source_remove(int fd); void sr_source_add(int fd, int events, int timeout, - receive_data_callback rcv_cb, void *user_data); + sr_receive_data_callback rcv_cb, void *user_data); /*--- session.c -------------------------------------------------------------*/ @@ -118,7 +118,7 @@ void sr_session_bus(struct sr_device *device, struct sr_datafeed_packet *packet); int sr_session_save(const char *filename); void sr_session_source_add(int fd, int events, int timeout, - receive_data_callback callback, void *user_data); + sr_receive_data_callback callback, void *user_data); void sr_session_source_remove(int fd); /*--- input/input.c ---------------------------------------------------------*/ diff --git a/sigrok.h b/sigrok.h index e2bbecc5..7c0ed572 100644 --- a/sigrok.h +++ b/sigrok.h @@ -74,7 +74,7 @@ extern "C" { #define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a) #endif -typedef int (*receive_data_callback) (int fd, int revents, void *user_data); +typedef int (*sr_receive_data_callback) (int fd, int revents, void *user_data); /* Data types used by hardware plugins for set_configuration() */ enum { @@ -345,7 +345,7 @@ struct sr_session { GSList *devices; /* List of struct analyzer* */ GSList *analyzers; - /* list of receive_data_callback */ + /* list of sr_receive_data_callback */ GSList *datafeed_callbacks; GTimeVal starttime; gboolean running;