LMMS
Loading...
Searching...
No Matches
stream.h
Go to the documentation of this file.
1#pragma once
2
3#include "private/std.h"
4#include "private/macros.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef 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);
16
17typedef 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);
23
24#ifdef __cplusplus
25}
26#endif
#define CLAP_ABI
Definition macros.h:24
struct clap_istream clap_istream_t
struct clap_ostream clap_ostream_t
Definition stream.h:10
void * ctx
Definition stream.h:11
void uint64_t size
Definition stream.h:14
void * buffer
Definition stream.h:14
int64_t(CLAP_ABI *read)(const struct clap_istream *stream
Definition stream.h:17
const void * buffer
Definition stream.h:21
int64_t(CLAP_ABI *write)(const struct clap_ostream *stream
const void uint64_t size
Definition stream.h:21
void * ctx
Definition stream.h:18
read(f, &c, 1)