X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=include%2Flibsigrok%2Fproto.h;h=68e7a1ab5491b31a4df91dd5b906b36db37b9758;hp=edcd4c978582146e6cd43cf936f604518f99142c;hb=584560f142e1b17b9f4ef9069bd3724f2f77e750;hpb=a755b0e122105d934c4e7b97435420eda6df6e8e diff --git a/include/libsigrok/proto.h b/include/libsigrok/proto.h index edcd4c97..68e7a1ab 100644 --- a/include/libsigrok/proto.h +++ b/include/libsigrok/proto.h @@ -64,16 +64,16 @@ SR_API GSList *sr_driver_scan(struct sr_dev_driver *driver, GSList *options); SR_API int sr_config_get(const struct sr_dev_driver *driver, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg, - int key, GVariant **data); + uint32_t key, GVariant **data); SR_API int sr_config_set(const struct sr_dev_inst *sdi, const struct sr_channel_group *cg, - int key, GVariant *data); + uint32_t key, GVariant *data); SR_API int sr_config_commit(const struct sr_dev_inst *sdi); SR_API int sr_config_list(const struct sr_dev_driver *driver, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg, - int key, GVariant **data); -SR_API const struct sr_config_info *sr_config_info_get(int key); + uint32_t key, GVariant **data); +SR_API const struct sr_config_info *sr_config_info_get(uint32_t key); SR_API const struct sr_config_info *sr_config_info_name_get(const char *optname); /*--- session.c -------------------------------------------------------------*/ @@ -124,7 +124,20 @@ SR_API int sr_session_source_remove_channel(struct sr_session *session, /*--- input/input.c ---------------------------------------------------------*/ -SR_API struct sr_input_format **sr_input_list(void); +SR_API const struct sr_input_module **sr_input_list(void); +SR_API const char *sr_input_id_get(const struct sr_input_module *in); +SR_API const char *sr_input_name_get(const struct sr_input_module *in); +SR_API const char *sr_input_description_get(const struct sr_input_module *in); +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 *in); +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 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_free(const struct sr_input *in); /*--- output/output.c -------------------------------------------------------*/ @@ -133,8 +146,8 @@ SR_API const char *sr_output_id_get(const struct sr_output_module *o); SR_API const char *sr_output_name_get(const struct sr_output_module *o); SR_API const char *sr_output_description_get(const struct sr_output_module *o); SR_API const struct sr_output_module *sr_output_find(char *id); -SR_API const struct sr_option *sr_output_options_get(const struct sr_output_module *o); -SR_API void sr_output_options_free(const struct sr_output_module *o); +SR_API const struct sr_option **sr_output_options_get(const struct sr_output_module *o); +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 *o, GHashTable *params, const struct sr_dev_inst *sdi); SR_API int sr_output_send(const struct sr_output *o,