File: fifo_buf.h

package info (click to toggle)
moc 1%3A2.6.0~svn-r3005-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,656 kB
  • sloc: ansic: 31,749; sh: 929; cpp: 487; makefile: 240
file content (24 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef FIFO_BUF_H
#define FIFO_BUF_H

#ifdef __cplusplus
extern "C" {
#endif

struct fifo_buf;

struct fifo_buf *fifo_buf_new (const size_t size);
void fifo_buf_free (struct fifo_buf *b);
size_t fifo_buf_put (struct fifo_buf *b, const char *data, size_t size);
size_t fifo_buf_get (struct fifo_buf *b, char *user_buf, size_t user_buf_size);
size_t fifo_buf_peek (struct fifo_buf *b, char *user_buf, size_t user_buf_size);
size_t fifo_buf_get_space (const struct fifo_buf *b);
void fifo_buf_clear (struct fifo_buf *b);
size_t fifo_buf_get_fill (const struct fifo_buf *b);
size_t fifo_buf_get_size (const struct fifo_buf *b);

#ifdef __cplusplus
}
#endif

#endif