summaryrefslogtreecommitdiff
path: root/toxav/ring_buffer.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-07-03 18:14:36 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-07-04 10:37:46 +0000
commit3ef1f839fc844021a3f8134f80d4e1f9f8692177 (patch)
treeeaa090c8e2883dac70bdbef063873668e9e2e2eb /toxav/ring_buffer.h
parent1a54be06cd359257478b584611f34058d21fe723 (diff)
Add some tests for our ring_buffer implementation.
These can serve as documentation until we write actual api docs, probably using apidsl.
Diffstat (limited to 'toxav/ring_buffer.h')
-rw-r--r--toxav/ring_buffer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/toxav/ring_buffer.h b/toxav/ring_buffer.h
index 036461c1..1b52cdf2 100644
--- a/toxav/ring_buffer.h
+++ b/toxav/ring_buffer.h
@@ -25,6 +25,10 @@
25#include <stdbool.h> 25#include <stdbool.h>
26#include <stdint.h> 26#include <stdint.h>
27 27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
28/* Ring buffer */ 32/* Ring buffer */
29typedef struct RingBuffer RingBuffer; 33typedef struct RingBuffer RingBuffer;
30bool rb_full(const RingBuffer *b); 34bool rb_full(const RingBuffer *b);
@@ -36,4 +40,8 @@ void rb_kill(RingBuffer *b);
36uint16_t rb_size(const RingBuffer *b); 40uint16_t rb_size(const RingBuffer *b);
37uint16_t rb_data(const RingBuffer *b, void **dest); 41uint16_t rb_data(const RingBuffer *b, void **dest);
38 42
43#ifdef __cplusplus
44}
45#endif
46
39#endif /* RING_BUFFER_H */ 47#endif /* RING_BUFFER_H */