X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=include%2Flibsigrok%2Fproto.h;h=4e8d36ec4533c78af79e9d84539bbc02dbb2ee49;hb=1296bb5362292e4924a41e79c3d24bb5571517c6;hp=722b8b57c3e664c602f1e8b5ebcbb888cd5c83c2;hpb=ee425a466af9851be8e6bcf3722f4b3105da3bd4;p=libsigrok.git diff --git a/include/libsigrok/proto.h b/include/libsigrok/proto.h index 722b8b57..4e8d36ec 100644 --- a/include/libsigrok/proto.h +++ b/include/libsigrok/proto.h @@ -154,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); @@ -162,10 +166,8 @@ SR_API const char *sr_input_name_get(const struct sr_input_module *imod); SR_API const char *sr_input_description_get(const struct sr_input_module *imod); 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_input_module *sr_input_find(const 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); @@ -192,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); @@ -249,6 +253,10 @@ 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 char **sr_parse_probe_names(const char *spec, + const char **dflt_names, size_t dflt_count, + size_t max_count, size_t *ret_count); +SR_API void sr_free_probe_names(char **names); 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, @@ -256,6 +264,9 @@ SR_API int sr_snprintf_ascii(char *buf, size_t buf_size, SR_API int sr_vsnprintf_ascii(char *buf, size_t buf_size, const char *format, va_list args); SR_API int sr_parse_rational(const char *str, struct sr_rational *ret); +SR_API char *sr_text_trim_spaces(char *s); +SR_API char *sr_text_next_line(char *s, size_t l, char **next, size_t *taken); +SR_API char *sr_text_next_word(char *s, char **next); /*--- version.c -------------------------------------------------------------*/