stream.h (670B)
1 #pragma once 2 3 #include "private/std.h" 4 #include "private/macros.h" 5 6 #ifdef __cplusplus 7 extern "C" { 8 #endif 9 10 typedef struct clap_istream { 11 void *ctx; // reserved pointer for the stream 12 13 // returns the number of bytes read; 0 indicates end of file and -1 a read error 14 int64_t(CLAP_ABI *read)(const struct clap_istream *stream, void *buffer, uint64_t size); 15 } clap_istream_t; 16 17 typedef struct clap_ostream { 18 void *ctx; // reserved pointer for the stream 19 20 // returns the number of bytes written; -1 on write error 21 int64_t(CLAP_ABI *write)(const struct clap_ostream *stream, const void *buffer, uint64_t size); 22 } clap_ostream_t; 23 24 #ifdef __cplusplus 25 } 26 #endif