sr: add recv/cleanup calls to output module API

The new output module callbacks will be init, recv and cleanup. The
existing data  and event callbacks still work, but will be phased out
as existing modules get converted.

The recv() callback gets a copy of every packet on the session bus,
and thus has visibility of all metadata, allowing it to properly
output any acquired data.
This commit is contained in:
Bert Vermeulen 2012-09-08 02:31:08 +02:00
parent 69a7402490
commit f45b759014
1 changed files with 3 additions and 0 deletions

View File

@ -252,6 +252,9 @@ struct sr_output_format {
uint64_t *length_out);
int (*event) (struct sr_output *o, int event_type, uint8_t **data_out,
uint64_t *length_out);
GString *(*recv) (struct sr_output *o, const struct sr_dev_inst *sdi,
struct sr_datafeed_packet *packet);
int (*cleanup) (struct sr_output *o);
};
struct sr_datastore {