The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / deps / liboi / oi_buf.h @ 90fc8d36

History | View | Annotate | Download (513 Bytes)

1 40c0f755 Ryan
#include <oi_queue.h>
2
3
#ifndef oi_buf_h
4
#define oi_buf_h
5
#ifdef __cplusplus
6
extern "C" {
7
#endif 
8
9
typedef struct oi_buf oi_buf;
10
11
struct oi_buf {
12
  /* public */
13
  char *base;
14
  size_t len;
15
  void (*release) (oi_buf *); /* called when oi is done with the object */
16
  void *data;
17
18
  /* private */
19
  size_t written;
20
  oi_queue queue;
21
};
22
23
oi_buf * oi_buf_new     (const char* base, size_t len);
24
oi_buf * oi_buf_new2    (size_t len);
25
void     oi_buf_destroy (oi_buf *);
26
27
#ifdef __cplusplus
28
}
29
#endif 
30
#endif // oi_buf_h