]> sigrok.org Git - libsigrok.git/blobdiff - include/libsigrok/proto.h
Constify the sdi parameter of all sr_dev_inst_*() getters.
[libsigrok.git] / include / libsigrok / proto.h
index c99d4c65f2c0065c7091f15f4611b8d41ade75a6..dbe9eed0a563350400f2d12d0b716c7946fd4465 100644 (file)
@@ -55,6 +55,15 @@ SR_API int sr_dev_clear(const struct sr_dev_driver *driver);
 SR_API int sr_dev_open(struct sr_dev_inst *sdi);
 SR_API int sr_dev_close(struct sr_dev_inst *sdi);
 
+SR_API struct sr_dev_driver *sr_dev_inst_driver_get(const struct sr_dev_inst *sdi);
+SR_API const char *sr_dev_inst_vendor_get(const struct sr_dev_inst *sdi);
+SR_API const char *sr_dev_inst_model_get(const struct sr_dev_inst *sdi);
+SR_API const char *sr_dev_inst_version_get(const struct sr_dev_inst *sdi);
+SR_API const char *sr_dev_inst_sernum_get(const struct sr_dev_inst *sdi);
+SR_API const char *sr_dev_inst_connid_get(const struct sr_dev_inst *sdi);
+SR_API GSList *sr_dev_inst_channels_get(const struct sr_dev_inst *sdi);
+SR_API GSList *sr_dev_inst_channel_groups_get(const struct sr_dev_inst *sdi);
+
 /*--- hwdriver.c ------------------------------------------------------------*/
 
 SR_API struct sr_dev_driver **sr_driver_list(void);
@@ -64,16 +73,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 -------------------------------------------------------------*/
@@ -133,11 +142,12 @@ SR_API const struct sr_option **sr_input_options_get(const struct sr_input_modul
 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 const struct sr_input *sr_input_scan_buffer(GString *buf);
-SR_API const struct sr_input *sr_input_scan_file(const char *filename);
+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);
+SR_API int sr_input_end(const struct sr_input *in);
+SR_API void sr_input_free(const struct sr_input *in);
 
 /*--- output/output.c -------------------------------------------------------*/