+%pointer_cast(void *, struct sr_datafeed_logic *, void_ptr_to_sr_datafeed_logic_ptr)
+%pointer_cast(void *, struct sr_datafeed_analog *, void_ptr_to_sr_datafeed_analog_ptr)
+%pointer_cast(void *, struct sr_probe *, void_ptr_to_sr_probe_ptr)
+%pointer_cast(void *, struct sr_probe_group *, void_ptr_to_sr_probe_group_ptr)
+
+%extend sr_input_format {
+ int call_format_match(const char *filename) {
+ return $self->format_match(filename);
+ }
+
+ int call_init(struct sr_input *in, const char *filename) {
+ return $self->init(in, filename);
+ }
+
+ int call_loadfile(struct sr_input *in, const char *filename) {
+ return $self->loadfile(in, filename);
+ }
+}
+
+%extend sr_output_format {
+ int call_init(struct sr_output *o) {
+ return $self->init(o);
+ }
+
+ int call_event(struct sr_output *o, int event_type, uint8_t **data_out,
+ uint64_t *length_out) {
+ return $self->event(o, event_type, data_out, length_out);
+ }
+
+ int call_data(struct sr_output *o, const void *data_in,
+ uint64_t length_in, uint8_t **data_out, uint64_t *length_out) {
+ return $self->data(o, data_in, length_in, data_out, length_out);
+ }
+
+ int call_receive(struct sr_output *o, const struct sr_dev_inst *sdi,
+ const struct sr_datafeed_packet *packet, GString **out) {
+ return $self->receive(o, sdi, packet, out);
+ }
+
+ int call_cleanup(struct sr_output *o) {
+ return $self->cleanup(o);
+ }
+}