-static int event(struct sr_output *o, int event_type, uint8_t **data_out,
- uint64_t *length_out)
-{
- uint8_t *outbuf;
-
- switch (event_type) {
- case SR_DF_END:
- outbuf = (uint8_t *)g_strdup("$dumpoff\n$end\n");
- *data_out = outbuf;
- *length_out = strlen((const char *)outbuf);
- g_free(o->internal);
- o->internal = NULL;
- break;
- default:
- *data_out = NULL;
- *length_out = 0;
- break;
- }
-
- return SR_OK;
-}
-
-static int data(struct sr_output *o, const uint8_t *data_in,
- uint64_t length_in, uint8_t **data_out, uint64_t *length_out)
+static int receive(struct sr_output *o, const struct sr_dev_inst *sdi,
+ const struct sr_datafeed_packet *packet, GString **out)