Couchbase C Client  2.5.6
api-legacy.h
1 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /*
3  * Copyright 2010-2016 Couchbase, Inc.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef LCB_APILEGACY_H
18 #define LCB_APILEGACY_H
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #ifndef LIBCOUCHBASE_COUCHBASE_H
25 #error "include <libcouchbase/couchbase.h> first!"
26 #endif
27 
28 
37 #define LCB__HKFIELDS \
38  \
43  const void *hashkey; \
44  \
45  lcb_SIZE nhashkey;
91 typedef struct {
92  const void *key;
93  lcb_SIZE nkey;
102  lcb_time_t exptime;
103 
118  int lock;
119  LCB__HKFIELDS
120 } lcb_GETCMDv0;
121 
126 typedef struct lcb_get_cmd_st {
127  int version;
128  union { lcb_GETCMDv0 v0; } v;
129  LCB_DEPR_CTORS_GET
130 } lcb_get_cmd_t;
131 
135 typedef struct {
136  const void *key;
137  lcb_SIZE nkey;
138  const void *bytes;
139  lcb_SIZE nbytes;
140  lcb_U32 flags;
141  lcb_cas_t cas;
142  lcb_U8 datatype;
143 } lcb_GETRESPv0;
144 
149 typedef struct {
150  int version;
151  union {
152  lcb_GETRESPv0 v0;
153  } v;
155 
166 typedef void (*lcb_get_callback)(
167  lcb_t instance, const void *cookie, lcb_error_t error, const lcb_get_resp_t *resp);
168 
178 LIBCOUCHBASE_API
180 
236 LIBCOUCHBASE_API
237 lcb_error_t lcb_get(lcb_t instance, const void *command_cookie, lcb_SIZE num,
238  const lcb_get_cmd_t *const *commands);
239 
249 typedef struct { const void *key; lcb_SIZE nkey; LCB__HKFIELDS } lcb_GETREPLICACMDv0;
250 
254 typedef struct {
255  const void *key;
256  lcb_SIZE nkey;
257  LCB__HKFIELDS
260  int index;
262 
267 typedef struct lcb_get_replica_cmd_st {
268  int version;
269  union {
270  lcb_GETREPLICACMDv0 v0;
272  } v;
273  LCB_DEPR_CTORS_RGET
275 
345 LIBCOUCHBASE_API
346 lcb_error_t lcb_get_replica(lcb_t instance,
347  const void *command_cookie,
348  lcb_SIZE num,
349  const lcb_get_replica_cmd_t *const *commands);
350 
355 typedef struct {
356  const void *key;
357  lcb_SIZE nkey;
358  lcb_cas_t cas;
359  LCB__HKFIELDS
361 
364 typedef struct lcb_unlock_cmd_st {
365  int version;
366  union {
367  lcb_UNLOCKCMDv0 v0;
368  } v;
369  LCB_DEPR_CTORS_UNL
371 
373 typedef struct {
374  const void *key;
375  lcb_SIZE nkey;
377 
380 typedef struct {
381  int version;
382  union {
383  lcb_UNLOCKRESPv0 v0;
384  } v;
386 
396 typedef void (*lcb_unlock_callback)(lcb_t instance,
397  const void *cookie,
398  lcb_error_t error,
399  const lcb_unlock_resp_t *resp);
401 LIBCOUCHBASE_API
402 lcb_unlock_callback lcb_set_unlock_callback(lcb_t, lcb_unlock_callback);
403 
435 LIBCOUCHBASE_API
436 lcb_error_t lcb_unlock(lcb_t instance,
437  const void *command_cookie,
438  lcb_SIZE num,
439  const lcb_unlock_cmd_t *const *commands);
447 typedef struct {
448  const void *key;
449  lcb_SIZE nkey;
450  const void *bytes;
451  lcb_SIZE nbytes;
452  lcb_U32 flags;
459  lcb_cas_t cas;
460  lcb_U8 datatype;
464  lcb_time_t exptime;
466  LCB__HKFIELDS
468 
470 typedef struct lcb_store_cmd_st {
471  int version;
472  union {
473  lcb_STORECMDv0 v0;
474  } v;
475  LCB_DEPR_CTORS_STORE
477 
478 
479 
480 typedef struct {
481  const void *key;
482  lcb_SIZE nkey;
483  lcb_cas_t cas;
485  const lcb_MUTATION_TOKEN *mutation_token;
486 } lcb_STORERESPv0;
487 
489 typedef struct {
490  int version;
491  union {
492  lcb_STORERESPv0 v0;
493  } v;
495 
508 typedef void (*lcb_store_callback)(lcb_t instance, const void *cookie,
509  lcb_storage_t operation, lcb_error_t error, const lcb_store_resp_t *resp);
510 
519 LIBCOUCHBASE_API
520 lcb_store_callback lcb_set_store_callback(lcb_t, lcb_store_callback callback);
521 
568 LIBCOUCHBASE_API
569 lcb_error_t lcb_store(lcb_t instance, const void *command_cookie, lcb_SIZE num,
570  const lcb_store_cmd_t *const *commands);
571 
572 
575 typedef struct {
576  const void *key;
577  lcb_SIZE nkey;
578 
581  lcb_time_t exptime;
582 
588  int create;
589 
602  lcb_S64 delta;
603 
608  lcb_U64 initial;
609  LCB__HKFIELDS
611 
613 typedef struct lcb_arithmetic_cmd_st {
614  int version;
616  union { lcb_ARITHCMDv0 v0; } v;
617 
618  LCB_DEPR_CTORS_ARITH
620 
621 typedef struct {
622  const void *key;
623  lcb_SIZE nkey;
624  lcb_U64 value;
625  lcb_cas_t cas;
627  const lcb_MUTATION_TOKEN *mutation_token;
628 } lcb_ARITHRESPv0;
629 
630 typedef struct {
631  int version;
632  union {
633  lcb_ARITHRESPv0 v0;
634  } v;
635 } lcb_arithmetic_resp_t;
636 
648 typedef void (*lcb_arithmetic_callback)
649  (lcb_t instance, const void *cookie, lcb_error_t error, const lcb_arithmetic_resp_t *resp);
650 
652 LIBCOUCHBASE_API
653 lcb_arithmetic_callback lcb_set_arithmetic_callback(lcb_t, lcb_arithmetic_callback);
654 
690 LIBCOUCHBASE_API
691 lcb_error_t lcb_arithmetic(lcb_t instance,
692  const void *command_cookie,
693  lcb_SIZE num,
694  const lcb_arithmetic_cmd_t *const *commands);
695 
696 typedef enum {
702  LCB_OBSERVE_MASTER_ONLY = 0x01
703 } lcb_observe_options_t;
704 
705 #define LCB_OBSERVE_FIELDS_COMMON \
706  const void *key; \
707  lcb_SIZE nkey; \
708  LCB__HKFIELDS
710 typedef struct {
711  LCB_OBSERVE_FIELDS_COMMON
712 } lcb_OBSERVECMDv0;
713 
715 typedef struct {
716  LCB_OBSERVE_FIELDS_COMMON
717  lcb_observe_options_t options;
719 
722 typedef struct lcb_observe_cmd_st {
723  int version;
724  union {
725  lcb_OBSERVECMDv0 v0;
726  lcb_OBSERVECMDv1 v1;
727  } v;
728 
729  LCB_DEPR_CTORS_OBS
731 
735 typedef struct {
736  const void *key;
737  lcb_SIZE nkey;
738  lcb_cas_t cas;
741  lcb_time_t ttp;
742  lcb_time_t ttr;
744 
745 typedef struct {
746  int version;
747  union {
749  } v;
750 } lcb_observe_resp_t;
751 
761 typedef void (*lcb_observe_callback)(lcb_t instance,
762  const void *cookie,
763  lcb_error_t error,
764  const lcb_observe_resp_t *resp);
765 
766 LIBCOUCHBASE_API
767 lcb_observe_callback lcb_set_observe_callback(lcb_t, lcb_observe_callback);
768 
797 LIBCOUCHBASE_API
798 lcb_error_t lcb_observe(lcb_t instance,
799  const void *command_cookie,
800  lcb_SIZE num,
801  const lcb_observe_cmd_t *const *commands);
802 
808 typedef struct {
809  const void *key;
810  lcb_SIZE nkey;
811  lcb_cas_t cas;
812  LCB__HKFIELDS
813 } lcb_REMOVECMDv0;
814 
815 typedef struct lcb_remove_cmd_st {
816  int version;
817  union {
818  lcb_REMOVECMDv0 v0;
819  } v;
820  LCB_DEPR_CTORS_RM
821 } lcb_remove_cmd_t;
822 
823 
824 typedef struct {
825  const void *key;
826  lcb_SIZE nkey;
827  lcb_cas_t cas;
829  const lcb_MUTATION_TOKEN *mutation_token;
830 } lcb_REMOVERESPv0;
831 
832 typedef struct {
833  int version;
834  union {
835  lcb_REMOVERESPv0 v0;
836  } v;
837 } lcb_remove_resp_t;
838 
847 typedef void (*lcb_remove_callback)(lcb_t instance, const void *cookie,
848  lcb_error_t error, const lcb_remove_resp_t *resp);
849 
850 LIBCOUCHBASE_API
851 lcb_remove_callback lcb_set_remove_callback(lcb_t, lcb_remove_callback);
852 
882 LIBCOUCHBASE_API
883 lcb_error_t lcb_remove(lcb_t instance,
884  const void *command_cookie,
885  lcb_SIZE num,
886  const lcb_remove_cmd_t *const *commands);
887 
895 typedef struct {
896  const void *key;
897  lcb_SIZE nkey;
898  lcb_cas_t cas;
899 } lcb_TOUCHRESPv0;
900 typedef struct {
901  int version;
902  union {
903  lcb_TOUCHRESPv0 v0;
904  } v;
905 } lcb_touch_resp_t;
906 
916 typedef void (*lcb_touch_callback)(lcb_t instance,
917  const void *cookie,
918  lcb_error_t error,
919  const lcb_touch_resp_t *resp);
921 LIBCOUCHBASE_API
922 lcb_touch_callback lcb_set_touch_callback(lcb_t, lcb_touch_callback);
923 
951 LIBCOUCHBASE_API
952 lcb_error_t lcb_touch(lcb_t instance,
953  const void *cookie,
954  lcb_SIZE num,
955  const lcb_touch_cmd_t *const *commands);
956 
962 typedef struct {
963  const void *key;
964  size_t nkey;
965  LCB__HKFIELDS
972  lcb_cas_t cas;
973  const lcb_MUTATION_TOKEN *mutation_token;
975 
980 typedef struct lcb_durability_cmd_st {
981  int version;
982  union {
984  } v;
986 
987 
989 typedef struct {
990  const void *key;
991  lcb_SIZE nkey;
1001 
1003  lcb_cas_t cas;
1004 
1009  unsigned char persisted_master;
1010 
1015  unsigned char exists_master;
1016 
1018  unsigned char npersisted;
1019 
1021  unsigned char nreplicated;
1022 
1028  unsigned short nresponses;
1030 
1031 typedef struct lcb_durability_resp_st {
1032  int version;
1033  union {
1035  } v;
1036 } lcb_durability_resp_t;
1037 
1126 LIBCOUCHBASE_API
1127 lcb_error_t lcb_durability_poll(lcb_t instance,
1128  const void *cookie,
1129  const lcb_durability_opts_t *options,
1130  lcb_SIZE ncmds,
1131  const lcb_durability_cmd_t *const *cmds);
1132 
1142 typedef void (*lcb_durability_callback)(lcb_t instance,
1143  const void *cookie,
1144  lcb_error_t err,
1145  const lcb_durability_resp_t *res);
1146 
1147 LIBCOUCHBASE_API
1148 lcb_durability_callback lcb_set_durability_callback(lcb_t,
1149  lcb_durability_callback);
1150 
1157 typedef struct {
1158  const void *name;
1159  lcb_SIZE nname;
1160 } lcb_STATSCMDv0;
1161 
1162 typedef struct lcb_server_stats_cmd_st {
1163  int version;
1164  union { lcb_STATSCMDv0 v0; } v;
1165  LCB_DEPR_CTORS_STATS
1166 } lcb_server_stats_cmd_t;
1167 
1187 typedef struct {
1188  const char *server_endpoint;
1189  const void *key;
1190  lcb_SIZE nkey;
1191  const void *bytes;
1192  lcb_SIZE nbytes;
1193 } lcb_STATSRESPv0;
1194 
1196 typedef struct lcb_server_stat_resp_st {
1197  int version;
1198  union {
1199  lcb_STATSRESPv0 v0;
1200  } v;
1202 
1211 typedef void (*lcb_stat_callback)(lcb_t instance,
1212  const void *cookie,
1213  lcb_error_t error,
1214  const lcb_server_stat_resp_t *resp);
1215 LIBCOUCHBASE_API
1216 lcb_stat_callback lcb_set_stat_callback(lcb_t, lcb_stat_callback);
1217 
1252 LIBCOUCHBASE_API
1253 lcb_error_t lcb_server_stats(lcb_t instance,
1254  const void *command_cookie,
1255  lcb_SIZE num,
1256  const lcb_server_stats_cmd_t *const *commands);
1257 
1261 typedef struct lcb_server_version_cmd_st {
1262  int version;
1263  union { struct { const void *notused; } v0; } v;
1264  LCB_DEPR_CTORS_VERSIONS
1265 } lcb_server_version_cmd_t;
1266 
1270 typedef struct lcb_server_version_resp_st {
1271  int version;
1272  union {
1273  struct {
1274  const char *server_endpoint;
1275  const char *vstring;
1276  lcb_SIZE nvstring;
1277  } v0;
1278  } v;
1280 
1308 LIBCOUCHBASE_API
1309 lcb_error_t lcb_server_versions(lcb_t instance,
1310  const void *command_cookie,
1311  lcb_SIZE num,
1312  const lcb_server_version_cmd_t *const *commands);
1313 
1322 typedef void (*lcb_version_callback)(lcb_t instance,
1323  const void *cookie,
1324  lcb_error_t error,
1325  const lcb_server_version_resp_t *resp);
1326 
1327 LIBCOUCHBASE_API
1328 lcb_version_callback lcb_set_version_callback(lcb_t, lcb_version_callback);
1329 
1330 typedef struct {
1331  const char *server;
1332  lcb_verbosity_level_t level;
1333 } lcb_VERBOSITYCMDv0;
1334 
1335 typedef struct lcb_verbosity_cmd_st {
1336  int version;
1337  union {
1338  lcb_VERBOSITYCMDv0 v0;
1339  } v;
1340  LCB_DEPR_CTORS_VERBOSITY
1341 } lcb_verbosity_cmd_t;
1342 
1343 typedef struct lcb_verbosity_resp_st {
1344  int version;
1345  union {
1346  struct {
1347  const char *server_endpoint;
1348  } v0;
1349  } v;
1350 } lcb_verbosity_resp_t;
1351 
1370 LIBCOUCHBASE_API
1371 lcb_error_t lcb_set_verbosity(lcb_t instance,
1372  const void *command_cookie,
1373  lcb_SIZE num,
1374  const lcb_verbosity_cmd_t *const *commands);
1375 
1384 typedef void (*lcb_verbosity_callback)(lcb_t instance,
1385  const void *cookie,
1386  lcb_error_t error,
1387  const lcb_verbosity_resp_t *resp);
1388 
1389 LIBCOUCHBASE_API
1390 lcb_verbosity_callback lcb_set_verbosity_callback(lcb_t,
1391  lcb_verbosity_callback);
1392 typedef struct lcb_flush_cmd_st {
1393  int version;
1394  union { struct { int unused; } v0; } v;
1395  LCB_DEPR_CTORS_FLUSH
1396 } lcb_flush_cmd_t;
1397 
1398 typedef struct lcb_flush_resp_st {
1399  int version;
1400  union {
1401  struct {
1402  const char *server_endpoint;
1403  } v0;
1404  } v;
1405 } lcb_flush_resp_t;
1406 
1433 LIBCOUCHBASE_API
1434 lcb_error_t lcb_flush(lcb_t instance, const void *cookie,
1435  lcb_SIZE num,
1436  const lcb_flush_cmd_t *const *commands);
1437 
1446 typedef void (*lcb_flush_callback)(lcb_t instance,
1447  const void *cookie,
1448  lcb_error_t error,
1449  const lcb_flush_resp_t *resp);
1450 LIBCOUCHBASE_API
1451 lcb_flush_callback lcb_set_flush_callback(lcb_t, lcb_flush_callback);
1452 
1463 typedef struct {
1465  const char *path;
1466  lcb_SIZE npath;
1467  const void *body;
1468  lcb_SIZE nbody;
1469  lcb_http_method_t method;
1473  int chunked;
1477  const char *content_type;
1478 } lcb_HTTPCMDv0;
1479 
1485 typedef struct {
1486  const char *path;
1487  lcb_SIZE npath;
1488  const void *body;
1489  lcb_SIZE nbody;
1490  lcb_http_method_t method;
1491  int chunked;
1492  const char *content_type;
1493  const char *host;
1494  const char *username;
1495  const char *password;
1496 } lcb_HTTPCMDv1;
1497 
1502 typedef struct lcb_http_cmd_st {
1503  int version;
1504  union {
1505  lcb_HTTPCMDv0 v0;
1506  lcb_HTTPCMDv1 v1;
1507  } v;
1508  LCB_DEPR_CTORS_HTTP
1509 } lcb_http_cmd_t;
1510 
1524 typedef struct {
1525  lcb_http_status_t status;
1526  const char *path;
1527  lcb_SIZE npath;
1528  const char *const *headers;
1529  const void *bytes;
1530  lcb_SIZE nbytes;
1531 } lcb_HTTPRESPv0;
1532 
1533 typedef struct {
1534  int version;
1535  union {
1536  lcb_HTTPRESPv0 v0;
1537  } v;
1538 } lcb_http_resp_t;
1539 
1551 typedef void (*lcb_http_res_callback)(
1552  lcb_http_request_t request, lcb_t instance, const void *cookie,
1553  lcb_error_t error, const lcb_http_resp_t *resp);
1554 
1555 typedef lcb_http_res_callback lcb_http_data_callback;
1556 typedef lcb_http_res_callback lcb_http_complete_callback;
1557 
1566 LIBCOUCHBASE_API
1567 lcb_http_complete_callback
1568 lcb_set_http_complete_callback(lcb_t, lcb_http_complete_callback);
1569 
1579 LIBCOUCHBASE_API
1580 lcb_http_data_callback
1581 lcb_set_http_data_callback(lcb_t, lcb_http_data_callback);
1582 
1675 LIBCOUCHBASE_API
1676 lcb_error_t lcb_make_http_request(lcb_t instance,
1677  const void *command_cookie,
1678  lcb_http_type_t type,
1679  const lcb_http_cmd_t *cmd,
1680  lcb_http_request_t *request);
1681 
1686 #ifdef __cplusplus
1687 }
1688 #endif
1689 #endif
lcb_storage_t operation
Mandatory.
Definition: api-legacy.h:465
Wrapper structure for lcb_ARITHCMDv0.
Definition: api-legacy.h:613
lcb_unlock() Command structure
Definition: api-legacy.h:355
wrapper structure for lcb_get_replica()
Definition: api-legacy.h:267
unsigned char exists_master
Whether the key exists on the master.
Definition: api-legacy.h:1015
lcb_S64 delta
This number will be added to the current value on the server; if this is negative then the current va...
Definition: api-legacy.h:602
Options for lcb_endure3_ctxnew() (wrapper)
Definition: couchbase.h:1419
Single-key command structure for lcb_durability_poll()
Definition: api-legacy.h:962
int from_master
zero if key came from replica
Definition: api-legacy.h:740
lcb_unlock() wrapper response structure
Definition: api-legacy.h:380
lcb_verbosity_level_t
level field for lcb_server_verbosity3 ()
Definition: couchbase.h:2245
Response structure for lcb_server_versions()
Definition: api-legacy.h:1270
lcb_observe() Command wrapper structure
Definition: api-legacy.h:722
unsigned char persisted_master
Whether the key was persisted to the master.
Definition: api-legacy.h:1009
lcb_durability_poll() Command wrapper
Definition: api-legacy.h:980
Get Command Structure.
Definition: api-legacy.h:91
lcb_http_method_t
HTTP Request method enumeration These just enumerate the various types of HTTP request methods suppor...
Definition: couchbase.h:2365
lcb_get_callback lcb_set_get_callback(lcb_t, lcb_get_callback callback)
Set the callback to be invoked when an item is received as a result of an lcb_get() operation...
lcb_cas_t cas
CAS representing current mutation state of the item.
Definition: api-legacy.h:141
Inner response structure for a get operation.
Definition: api-legacy.h:135
const char * path
Definition: api-legacy.h:1486
lcb_storage_t
Values for lcb_CMDSTORE::operation.
Definition: couchbase.h:966
lcb_store() Command structure
Definition: api-legacy.h:447
const void * bytes
Statistic value.
Definition: api-legacy.h:1191
Per-server, per-stat response structure for lcb_server_stats()
Definition: api-legacy.h:1187
lcb_U64 initial
If the create field is true, this is the initial value for the counter iff the item does not yet exis...
Definition: api-legacy.h:608
lcb_unlock() Wrapper structure
Definition: api-legacy.h:364
unsigned char npersisted
how many nodes (including master) this item was persisted to
Definition: api-legacy.h:1018
const void * body
The POST body for HTTP request.
Definition: api-legacy.h:1467
lcb_observe_t
Possible statuses for keys in OBSERVE response.
Definition: couchbase.h:1714
lcb_time_t exptime
Expiration time for the item.
Definition: api-legacy.h:581
Command structure for arithmetic operations This is contained within the lcb_arithmetic_cmd_t structu...
Definition: api-legacy.h:575
unsigned char nreplicated
how many nodes (excluding master) this item was replicated to
Definition: api-legacy.h:1021
Structure representing a synchronization token.
Definition: couchbase.h:577
lcb_time_t exptime
If this parameter is specified and lock is not set then the server will also update the object's expi...
Definition: api-legacy.h:102
const char * content_type
The Content-Type header for request.
Definition: api-legacy.h:1477
lcb_SIZE npath
Length of the path.
Definition: api-legacy.h:1466
lcb_replica_t
Select get-replica mode.
Definition: couchbase.h:843
int index
If strategy is LCB_REPLICA_SELECT, specific the replica index to use.
Definition: api-legacy.h:260
LCB__HKFIELDS lcb_observe_options_t options
<@private
Definition: api-legacy.h:717
lcb_time_t ttr
average time to replicate on this server
Definition: api-legacy.h:742
lcb_unlock() response structure
Definition: api-legacy.h:373
Response structure for lcb_durability_poll()
Definition: api-legacy.h:989
lcb_error_t err
if this entry failed, this contains the reason, e.g.
Definition: api-legacy.h:1000
const char * path
Path used for request.
Definition: api-legacy.h:1526
Command for lcb_get_replica()
Definition: api-legacy.h:254
Wrapper structure for lcb_STORERESPv0.
Definition: api-legacy.h:489
int chunked
If true the client will use lcb_http_data_callback to notify about response and will call lcb_http_co...
Definition: api-legacy.h:1473
lcb_replica_t strategy
Strategy to use.
Definition: api-legacy.h:258
lcb_get() Command Wrapper Structure
Definition: api-legacy.h:126
lcb_time_t ttp
average time to persist on this server
Definition: api-legacy.h:741
lcb_cas_t cas
If present, the server will check that the item's current CAS matches the value specified here...
Definition: api-legacy.h:459
lcb_observe_t status
Status flags.
Definition: api-legacy.h:739
const char * server_endpoint
Server which the statistic is from.
Definition: api-legacy.h:1188
const char * path
A view path string with optional query params (e.g.
Definition: api-legacy.h:1465
void(* lcb_get_callback)(lcb_t instance, const void *cookie, lcb_error_t error, const lcb_get_resp_t *resp)
The callback function for a "get-style" request.
Definition: api-legacy.h:166
lcb_cas_t cas
You must populate this with the CAS.
Definition: api-legacy.h:358
struct lcb_st * lcb_t
Library handle representing a connection to a data bucket.
Definition: couchbase.h:41
Wrapper structure for lcb_STATSRESPv0.
Definition: api-legacy.h:1196
int create
If the item does not exist on the server, set this to true to force the creation of the item...
Definition: api-legacy.h:588
unsigned short nresponses
Total number of observe responses received for the node.
Definition: api-legacy.h:1028
int lock
If this parameter is set then the server will in addition to retrieving the item also lock the item...
Definition: api-legacy.h:118
lcb_observe() Command structure
Definition: api-legacy.h:715
lcb_error_t
Error codes returned by the library.
Definition: error.h:506
const char *const * headers
List of headers.
Definition: api-legacy.h:1528
lcb_get() response wrapper structure
Definition: api-legacy.h:149
Wrapper structure for lcb_make_http_request.
Definition: api-legacy.h:1502
lcb_time_t exptime
Expiration for the item.
Definition: api-legacy.h:464
const void * bytes
Value to store.
Definition: api-legacy.h:450
Structure for lcb_make_http_request()
Definition: api-legacy.h:1463
const void * body
Definition: api-legacy.h:1488
const void * key
Key to retrieve.
Definition: api-legacy.h:92
lcb_U32 flags
Server side flags stored with the item.
Definition: api-legacy.h:140
lcb_U32 flags
User-defined flags stored along with the item.
Definition: api-legacy.h:452
Response structure received for HTTP requests.
Definition: api-legacy.h:1524
const void * key
Statistic name.
Definition: api-legacy.h:1189
lcb_error_t lcb_get(lcb_t instance, const void *command_cookie, lcb_SIZE num, const lcb_get_cmd_t *const *commands)
Get a number of values from the cache.
lcb_SIZE nkey
Key length.
Definition: api-legacy.h:93
lcb_SIZE nbody
Length of the body.
Definition: api-legacy.h:1468
const void * bytes
Body (if any)
Definition: api-legacy.h:1529
lcb_http_status_t status
HTTP status code.
Definition: api-legacy.h:1525
Wrapper structure for lcb_STORECMDv0.
Definition: api-legacy.h:470
lcb_SIZE nbytes
Length of value to store.
Definition: api-legacy.h:451
lcb_http_type_t
The type of HTTP request to execute.
Definition: couchbase.h:2333
lcb_cas_t cas
CAS of the item on this server.
Definition: api-legacy.h:738
v1 is used by the raw http requests.
Definition: api-legacy.h:1485
lcb_cas_t cas
if found with a different CAS, this is the CAS
Definition: api-legacy.h:1003
Response Structure for lcb_observe()
Definition: api-legacy.h:735