blob: 148d2b5a7599e043dbb53d693034f415c75a868d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#ifndef IVYFIFO_H
#define IVYFIFO_H
typedef struct IvyFifoBuffer {
char *buffer;
char *rptr, *wptr, *end;
int full;
} IvyFifoBuffer;
int IvyFifoInit(IvyFifoBuffer *f);
void IvyFifoFree(IvyFifoBuffer *f);
IvyFifoBuffer* IvyFifoNew (void);
void IvyFifoDelete (IvyFifoBuffer *f);
unsigned int IvyFifoLength(const IvyFifoBuffer *f);
unsigned int IvyFifoSize(const IvyFifoBuffer *f);
unsigned int IvyFifoAvail(const IvyFifoBuffer *f);
unsigned int IvyFifoRead(IvyFifoBuffer *f, char *buf, unsigned int buf_size);
unsigned int IvyFifoSendSocket (IvyFifoBuffer *f, const int fd);
int IvyFifoIsFull (const IvyFifoBuffer *f) ;
void IvyFifoWrite(IvyFifoBuffer *f, const char *buf, unsigned int size);
#endif /* IVYFIFO_H */
|