forked from mnunberg/perl-Couchbase-Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
idx_constants.pl
executable file
·125 lines (100 loc) · 2.08 KB
/
idx_constants.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
use ExtUtils::H2PM;
module "Couchbase::Client::IDXConst";
use_export;
$ENV{C_INCLUDE_PATH} = './';
include "sys/types.h";
include "perl-couchbase.h";
include "perl-couchbase-async.h";
my @const_bases = qw(
CTORIDX_SERVERS
CTORIDX_USERNAME
CTORIDX_PASSWORD
CTORIDX_BUCKET
CTORIDX_STOREFLAGS
CTORIDX_MYFLAGS
CTORIDX_COMP_THRESHOLD
CTORIDX_COMP_METHODS
CTORIDX_SERIALIZE_METHODS
RETIDX_VALUE
RETIDX_ERRSTR
RETIDX_CAS
RETIDX_ERRNUM
);
constant("PLCB_$_", name => $_) for (@const_bases);
my @ctor_flags = qw(
USE_COMPAT_FLAGS
USE_COMPRESSION
USE_STORABLE
USE_CONVERT_UTF8
);
constant("PLCBf_$_", name => "f$_") for (@ctor_flags);
my @async_bases = qw(
CTORIDX_CBEVMOD
CTORIDX_CBERR
CTORIDX_CBTIMERMOD
CTORIDX_CBWAITDONE
CTORIDX_BLESS_EVENT
);
constant("PLCBA_$_", name => $_) for (@async_bases);
my @event_bases = qw(
READ_EVENT
WRITE_EVENT
);
constant("LIBCOUCHBASE_$_", name => "COUCHBASE_$_") for (@event_bases);
my @async_reqidx = qw(
KEY
VALUE
EXP
CAS
ARITH_DELTA
ARITH_INITIAL
STAT_ARGS
);
constant("PLCBA_REQIDX_$_", name => "REQIDX_$_") for (@async_reqidx);
my @async_commands = qw(
SET
GET
ADD
REPLACE
APPEND
PREPEND
REMOVE
TOUCH
ARITHMETIC
STATS
FLUSH
);
constant("PLCBA_CMD_$_") for (@async_commands);
my @async_reqtypes = qw(
SINGLE
MULTI
);
constant("PLCBA_REQTYPE_$_", name => "REQTYPE_$_") for (@async_reqtypes);
my @async_cbtypes = qw(
COMPLETION
INCREMENTAL
);
constant("PLCBA_CBTYPE_$_", name => "CBTYPE_$_") for @async_cbtypes;
my @evidx_constants = qw(
FD
DUPFH
WATCHFLAGS
STATEFLAGS
OPAQUE
PLDATA
);
constant("PLCBA_EVIDX_$_", name => "EVIDX_$_") for (@evidx_constants);
my @evactions = qw(
WATCH
UNWATCH
SUSPEND
RESUME
);
constant("PLCBA_EVACTION_$_", name => "EVACTION_$_") for (@evactions);
my @evstates = qw(
INITIALIZED
ACTIVE
SUSPENDED
);
constant("PLCBA_EVSTATE_$_", name => "EVSTATE_$_") for (@evstates);
write_output($ARGV[0]);