Statistics
| Branch: | Revision:

streamers / chunkbuffer_helper.h @ 74a5d4ae

History | View | Annotate | Download (732 Bytes)

1
/*
2
 *  Copyright (c) 2010 Luca Abeni
3
 *  Copyright (c) 2010 Csaba Kiraly
4
 *
5
 *  This is free software; see gpl-3.0.txt
6
 */
7
#ifndef CHUNKBUFFER_HELPERS_H
8
#define CHUNKBUFFER_HELPERS_H
9

    
10
#include <chunkbuffer.h>
11

    
12
inline struct chunk_buffer *cb_init(const char *config) {
13
  return chbInit(config);
14
}
15

    
16
inline int cb_add_chunk(struct chunk_buffer *cb, const struct chunk *c) {
17
  return chbAddChunk(cb, c);
18
}
19

    
20
inline struct chunk *cb_get_chunks(const struct chunk_buffer *cb, int *n) {
21
 return chbGetChunks(cb, n);
22
}
23

    
24
inline int cb_clear(struct chunk_buffer *cb) {
25
 return chbClear(cb);
26
}
27

    
28
inline const struct chunk *cb_get_chunk(const struct chunk_buffer *cb, int id) {
29
  return chbGetChunk(cb, id);
30
}
31

    
32
#endif        /* CHUNKBUFFER_HELPERS_H */