diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-13 13:46:40 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-13 14:42:22 +0000 |
commit | 81eb3c648eda46f1f3fa2e6110f16f7022232b28 (patch) | |
tree | 31d3a11a2fdbb3c369256549f53ad4ff27306756 /src/libserver/protocol.h | |
parent | 57b8a62d05a3f177ea1bc768b1d9706bb62d5aed (diff) | |
download | rspamd-81eb3c648eda46f1f3fa2e6110f16f7022232b28.tar.gz rspamd-81eb3c648eda46f1f3fa2e6110f16f7022232b28.zip |
[Feature] Allow to cache and use flexible protocol reply
Diffstat (limited to 'src/libserver/protocol.h')
-rw-r--r-- | src/libserver/protocol.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/libserver/protocol.h b/src/libserver/protocol.h index 164a53d2f..c266c2f99 100644 --- a/src/libserver/protocol.h +++ b/src/libserver/protocol.h @@ -68,13 +68,30 @@ gboolean rspamd_protocol_handle_request (struct rspamd_task *task, void rspamd_protocol_http_reply (struct rspamd_http_message *msg, struct rspamd_task *task); +enum rspamd_protocol_flags { + RSPAMD_PROTOCOL_BASIC = 1 << 0, + RSPAMD_PROTOCOL_METRICS = 1 << 1, + RSPAMD_PROTOCOL_MESSAGES = 1 << 2, + RSPAMD_PROTOCOL_RMILTER = 1 << 3, + RSPAMD_PROTOCOL_DKIM = 1 << 4, + RSPAMD_PROTOCOL_URLS = 1 << 5, + RSPAMD_PROTOCOL_EXTRA = 1 << 6, +}; + +#define RSPAMD_PROTOCOL_DEFAULT (RSPAMD_PROTOCOL_BASIC| \ + RSPAMD_PROTOCOL_METRICS| \ + RSPAMD_PROTOCOL_MESSAGES| \ + RSPAMD_PROTOCOL_RMILTER| \ + RSPAMD_PROTOCOL_DKIM| \ + RSPAMD_PROTOCOL_EXTRA) /** * Write reply to ucl object filling log buffer * @param task * @param logbuf * @return */ -ucl_object_t * rspamd_protocol_write_ucl (struct rspamd_task *task); +ucl_object_t * rspamd_protocol_write_ucl (struct rspamd_task *task, + enum rspamd_protocol_flags flags); /** * Write reply for specified task command |