Couchbase C Client  2.4.0
kvbuf.h
Go to the documentation of this file.
1 #ifndef LCB_KVBUF_H
2 #define LCB_KVBUF_H
3 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 
16 typedef enum {
21 
22 #define LCB_KV_HEADER_AND_KEY LCB_KV_CONTIG
23 
27 typedef struct lcb_CONTIGBUF {
28  const void *bytes;
30  lcb_size_t nbytes;
32 
34 typedef struct lcb_KEYBUF {
45  lcb_CONTIGBUF contig;
46 } lcb_KEYBUF;
47 
49 #define LCB_KEYBUF_IS_EMPTY(k) (k)->contig.nbytes == 0
50 
58 #define LCB_KREQ_SIMPLE(req, k, nk) do { \
59  (req)->type = LCB_KV_COPY; \
60  (req)->contig.bytes = k; \
61  (req)->contig.nbytes = nk; \
62 } while (0);
63 
68 typedef struct lcb_FRAGBUF {
71 
73  unsigned int niov;
74 
79  unsigned int total_length;
80 } lcb_FRAGBUF;
81 
83 typedef struct lcb_VALBUF {
96  union {
97  lcb_CONTIGBUF contig;
98  lcb_FRAGBUF multi;
99  } u_buf;
100 } lcb_VALBUF;
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 #endif