1 2 3 4 5 6 7 8 9 10 11
#include <stdint.h> #include <stddef.h> /* typedef struct p_stream_s p_stream_t; */ typedef struct { int (*read)(uint8_t *buf, size_t len, void **vptr, void *sptr); int (*write)(uint8_t *buf, size_t len, void **vptr, void *sptr); int (*init)(void **vptr, void *sptr); void **props; } p_stream_t;