X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=sigrok-proto.h;h=3589024d74326d77b0b46fffd19eb5edc6e7feee;hb=8225e92175c64909eddaecf8bd512049acf653a2;hp=d6904eb89f39eb10c1d3afe4390f6aded64381db;hpb=03dbc020cde2f0d9857ffcfc273eed5f504a4860;p=libsigrok.git diff --git a/sigrok-proto.h b/sigrok-proto.h index d6904eb8..3589024d 100644 --- a/sigrok-proto.h +++ b/sigrok-proto.h @@ -44,25 +44,25 @@ void sr_device_clear(struct sr_device *device); void sr_device_destroy(struct sr_device *dev); void sr_device_probe_clear(struct sr_device *device, int probenum); -void sr_device_probe_add(struct sr_device *device, char *name); +void sr_device_probe_add(struct sr_device *device, const char *name); struct sr_probe *sr_device_probe_find(struct sr_device *device, int probenum); -void sr_device_probe_name(struct sr_device *device, int probenum, char *name); +void sr_device_probe_name(struct sr_device *device, int probenum, + const char *name); void sr_device_trigger_clear(struct sr_device *device); void sr_device_trigger_set(struct sr_device *device, int probenum, - char *trigger); + const char *trigger); gboolean sr_device_has_hwcap(struct sr_device *device, int hwcap); /*--- filter.c --------------------------------------------------------------*/ int filter_probes(int in_unitsize, int out_unitsize, int *probelist, - char *data_in, uint64_t length_in, char **data_out, + const char *data_in, uint64_t length_in, char **data_out, uint64_t *length_out); /*--- hwplugin.c ------------------------------------------------------------*/ -int load_hwplugins(void); -GSList *list_hwplugins(void); +GSList *sr_list_hwplugins(void); /* Generic device instances */ struct sr_device_instance *sr_device_instance_new(int index, @@ -83,11 +83,11 @@ struct sr_serial_device_instance *sr_serial_device_instance_new( const char *port, int fd); void sr_serial_device_instance_free(struct sr_serial_device_instance *serial); -int find_hwcap(int *capabilities, int hwcap); -struct hwcap_option *find_hwcap_option(int hwcap); -void source_remove(int fd); -void source_add(int fd, int events, int timeout, receive_data_callback rcv_cb, - void *user_data); +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); /*--- session.c -------------------------------------------------------------*/ @@ -119,8 +119,7 @@ void sr_session_halt(void); void sr_session_stop(void); void sr_session_bus(struct sr_device *device, struct sr_datafeed_packet *packet); -void make_metadata(char *filename); -int sr_session_save(char *filename); +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); void sr_session_source_remove(int fd);