Encapsulate flow descriptions inside a struct.

This commit is contained in:
Ian Gulliver
2016-02-29 17:12:06 -08:00
parent 3539f9d640
commit 3fb3c02cf5
12 changed files with 83 additions and 68 deletions

17
adsbus/flow.h Normal file
View File

@@ -0,0 +1,17 @@
#pragma once
#include <stdint.h>
struct buf;
struct peer;
typedef void (*flow_bound_socket_init)(int);
typedef void (*flow_new)(int, void *, struct peer *);
typedef void (*flow_get_hello)(struct buf **, void *);
struct flow {
const char *name;
flow_bound_socket_init bound_socket_init;
flow_new new;
flow_get_hello get_hello;
uint32_t *ref_count;
};