X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=include%2Flibsigrok%2Fproto.h;h=41d9cfcc672931f62bac06a648d24a171bcceb76;hb=212769c3b86a8aa01c5573e07bd57f000932e8bb;hp=350cffa35127a86d75a33623d82301114cba452e;hpb=addb7340dd5418d09ec7d144f7bb508fee29bdb9;p=libsigrok.git diff --git a/include/libsigrok/proto.h b/include/libsigrok/proto.h index 350cffa3..41d9cfcc 100644 --- a/include/libsigrok/proto.h +++ b/include/libsigrok/proto.h @@ -67,6 +67,7 @@ SR_API int sr_log_loglevel_set(int loglevel); SR_API int sr_log_loglevel_get(void); SR_API int sr_log_callback_set(sr_log_callback cb, void *cb_data); SR_API int sr_log_callback_set_default(void); +SR_API int sr_log_callback_get(sr_log_callback *cb, void **cb_data); /*--- device.c --------------------------------------------------------------*/ @@ -153,6 +154,10 @@ SR_API int sr_session_is_running(struct sr_session *session); SR_API int sr_session_stopped_callback_set(struct sr_session *session, sr_session_stopped_callback cb, void *cb_data); +SR_API int sr_packet_copy(const struct sr_datafeed_packet *packet, + struct sr_datafeed_packet **copy); +SR_API void sr_packet_free(struct sr_datafeed_packet *packet); + /*--- input/input.c ---------------------------------------------------------*/ SR_API const struct sr_input_module **sr_input_list(void); @@ -163,13 +168,12 @@ SR_API const char *const *sr_input_extensions_get( const struct sr_input_module *imod); SR_API const struct sr_input_module *sr_input_find(char *id); SR_API const struct sr_option **sr_input_options_get(const struct sr_input_module *imod); -SR_API gboolean sr_output_test_flag(const struct sr_output_module *omod, - uint64_t flag); SR_API void sr_input_options_free(const struct sr_option **options); SR_API struct sr_input *sr_input_new(const struct sr_input_module *imod, GHashTable *options); SR_API int sr_input_scan_buffer(GString *buf, const struct sr_input **in); SR_API int sr_input_scan_file(const char *filename, const struct sr_input **in); +SR_API const struct sr_input_module *sr_input_module_get(const struct sr_input *in); SR_API struct sr_dev_inst *sr_input_dev_inst_get(const struct sr_input *in); SR_API int sr_input_send(const struct sr_input *in, GString *buf); SR_API int sr_input_end(const struct sr_input *in); @@ -190,6 +194,8 @@ SR_API void sr_output_options_free(const struct sr_option **opts); SR_API const struct sr_output *sr_output_new(const struct sr_output_module *omod, GHashTable *params, const struct sr_dev_inst *sdi, const char *filename); +SR_API gboolean sr_output_test_flag(const struct sr_output_module *omod, + uint64_t flag); SR_API int sr_output_send(const struct sr_output *o, const struct sr_datafeed_packet *packet, GString **out); SR_API int sr_output_free(const struct sr_output *o); @@ -247,6 +253,8 @@ SR_API uint64_t sr_parse_timestring(const char *timestring); SR_API gboolean sr_parse_boolstring(const char *boolstring); SR_API int sr_parse_period(const char *periodstr, uint64_t *p, uint64_t *q); SR_API int sr_parse_voltage(const char *voltstr, uint64_t *p, uint64_t *q); +SR_API int sr_sprintf_ascii(char *buf, const char *format, ...); +SR_API int sr_vsprintf_ascii(char *buf, const char *format, va_list args); SR_API int sr_snprintf_ascii(char *buf, size_t buf_size, const char *format, ...); SR_API int sr_vsnprintf_ascii(char *buf, size_t buf_size,