MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
types.h
1 #ifndef MEMCACHED_TYPES_H
2 #define MEMCACHED_TYPES_H 1
3 
4 #include <sys/types.h>
5 #include <stdint.h>
6 
7 #ifdef __WIN32__
8 struct iovec {
9  size_t iov_len;
10  void* iov_base;
11 };
12 #else
13 #include <sys/uio.h>
14 #endif
15 
16 #ifndef bool
17 #define bool char
18 #define false 0
19 #define true 1
20 #endif
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
29  typedef uint32_t rel_time_t;
30 
34  typedef enum {
35  ENGINE_SUCCESS = 0x00,
36  ENGINE_KEY_ENOENT = 0x01,
37  ENGINE_KEY_EEXISTS = 0x02,
38  ENGINE_ENOMEM = 0x03,
39  ENGINE_NOT_STORED = 0x04,
40  ENGINE_EINVAL = 0x05,
41  ENGINE_ENOTSUP = 0x06,
42  ENGINE_EWOULDBLOCK = 0x07,
43  ENGINE_E2BIG = 0x08,
44  ENGINE_WANT_MORE = 0x09,
46  ENGINE_DISCONNECT = 0x0a,
47  ENGINE_EACCESS = 0x0b,
48  ENGINE_NOT_MY_VBUCKET = 0x0c,
49  ENGINE_TMPFAIL = 0x0d,
50  ENGINE_FAILED = 0xff
51  } ENGINE_ERROR_CODE;
52 
56  typedef enum {
57  OPERATION_ADD = 1,
58  OPERATION_SET,
59  OPERATION_REPLACE,
60  OPERATION_APPEND,
61  OPERATION_PREPEND,
62  OPERATION_CAS
63  } ENGINE_STORE_OPERATION;
64 
68  typedef void item;
69 
70  typedef struct {
71  uint64_t cas;
72  rel_time_t exptime;
74  uint32_t nbytes;
75  uint32_t flags;
76  uint8_t clsid;
77  uint16_t nkey;
78  uint16_t nvalue;
80  const void *key;
81  struct iovec value[1];
82  } item_info;
83 
84  typedef struct {
85  const char *username;
86  const char *config;
87  } auth_data_t;
88 
89  /* Forward declaration of the server handle -- to be filled in later */
90  typedef struct server_handle_v1_t SERVER_HANDLE_V1;
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif /* MEMCACHED_TYPES_H */