Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/lib-dict/dict-client.h @ 9575:0a00dcc4f0ea HEAD
lib-storage: Allow shared namespace prefix to use %variable modifiers.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 26 May 2010 17:07:51 +0100 |
parents | a1b92a251bb9 |
children |
rev | line source |
---|---|
6410
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
4517
diff
changeset
|
1 #ifndef DICT_CLIENT_H |
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
4517
diff
changeset
|
2 #define DICT_CLIENT_H |
3793 | 3 |
4517
e661182eab75
Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4516
diff
changeset
|
4 #include "dict.h" |
e661182eab75
Berkeley DB dict support is now enabled only when using --with-db configure option.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4516
diff
changeset
|
5 |
9174
eed86bcc33aa
dict proxy: Use base_dir as the default dict-server location.
Timo Sirainen <tss@iki.fi>
parents:
8664
diff
changeset
|
6 #define DEFAULT_DICT_SERVER_SOCKET_FNAME "dict-server" |
3793 | 7 |
4516
aa2f73a4df26
Dictionary changes: Added support for defining value's type. Key is still always a string. Added support for sorting the iteration replies. Added dict_unset(). Added Berkeley DB support. Most of the code written by Tianyan Liu.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4393
diff
changeset
|
8 #define DICT_CLIENT_PROTOCOL_MAJOR_VERSION 2 |
3793 | 9 #define DICT_CLIENT_PROTOCOL_MINOR_VERSION 0 |
10 | |
11 #define DICT_CLIENT_MAX_LINE_LENGTH (64*1024) | |
12 | |
13 enum { | |
4516
aa2f73a4df26
Dictionary changes: Added support for defining value's type. Key is still always a string. Added support for sorting the iteration replies. Added dict_unset(). Added Berkeley DB support. Most of the code written by Tianyan Liu.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4393
diff
changeset
|
14 /* <major-version> <minor-version> <value type> <user> <dict name> */ |
3793 | 15 DICT_PROTOCOL_CMD_HELLO = 'H', |
16 | |
17 DICT_PROTOCOL_CMD_LOOKUP = 'L', /* <key> */ | |
4516
aa2f73a4df26
Dictionary changes: Added support for defining value's type. Key is still always a string. Added support for sorting the iteration replies. Added dict_unset(). Added Berkeley DB support. Most of the code written by Tianyan Liu.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4393
diff
changeset
|
18 DICT_PROTOCOL_CMD_ITERATE = 'I', /* <flags> <path> */ |
3793 | 19 |
20 DICT_PROTOCOL_CMD_BEGIN = 'B', /* <id> */ | |
21 DICT_PROTOCOL_CMD_COMMIT = 'C', /* <id> */ | |
8664
446775a31754
dict proxy: Handle async commits better.
Timo Sirainen <tss@iki.fi>
parents:
8300
diff
changeset
|
22 DICT_PROTOCOL_CMD_COMMIT_ASYNC = 'D', /* <id> */ |
3793 | 23 DICT_PROTOCOL_CMD_ROLLBACK = 'R', /* <id> */ |
24 | |
25 DICT_PROTOCOL_CMD_SET = 'S', /* <id> <key> <value> */ | |
4516
aa2f73a4df26
Dictionary changes: Added support for defining value's type. Key is still always a string. Added support for sorting the iteration replies. Added dict_unset(). Added Berkeley DB support. Most of the code written by Tianyan Liu.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4393
diff
changeset
|
26 DICT_PROTOCOL_CMD_UNSET = 'U', /* <id> <key> */ |
3793 | 27 DICT_PROTOCOL_CMD_ATOMIC_INC = 'A' /* <id> <key> <diff> */ |
28 }; | |
29 | |
30 enum { | |
31 DICT_PROTOCOL_REPLY_OK = 'O', /* <value> */ | |
32 DICT_PROTOCOL_REPLY_NOTFOUND = 'N', | |
9361
a1b92a251bb9
dict: Added support for async commits. Changed dict_atomic_inc() behavior.
Timo Sirainen <tss@iki.fi>
parents:
9174
diff
changeset
|
33 DICT_PROTOCOL_REPLY_FAIL = 'F', |
a1b92a251bb9
dict: Added support for async commits. Changed dict_atomic_inc() behavior.
Timo Sirainen <tss@iki.fi>
parents:
9174
diff
changeset
|
34 DICT_PROTOCOL_REPLY_ASYNC_COMMIT = 'A' |
3793 | 35 }; |
36 | |
37 const char *dict_client_escape(const char *src); | |
38 const char *dict_client_unescape(const char *src); | |
39 | |
40 #endif |