diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-30 14:58:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-30 14:58:42 +0100 |
commit | 6c2c1d2be538108d2e3da9af207b0edf57f3a250 (patch) | |
tree | 13a0785b838afb82910acae35538ce5d200e66bd /src/libserver/worker_util.h | |
parent | 2445d1680b3d3a2b5c80deb285e857a0337e44d5 (diff) | |
download | rspamd-6c2c1d2be538108d2e3da9af207b0edf57f3a250.tar.gz rspamd-6c2c1d2be538108d2e3da9af207b0edf57f3a250.zip |
Unify webui send functions.
Diffstat (limited to 'src/libserver/worker_util.h')
-rw-r--r-- | src/libserver/worker_util.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/libserver/worker_util.h b/src/libserver/worker_util.h index c8b7c1000..2372375ba 100644 --- a/src/libserver/worker_util.h +++ b/src/libserver/worker_util.h @@ -76,4 +76,30 @@ struct rspamd_custom_controller_command { rspamd_controller_func_t handler; }; +/** + * Send error using HTTP and JSON output + * @param entry router entry + * @param code error code + * @param error_msg error message + */ +void rspamd_controller_send_error (struct rspamd_http_connection_entry *entry, + gint code, + const gchar *error_msg); + +/** + * Send a custom string using HTTP + * @param entry router entry + * @param str string to send + */ +void rspamd_controller_send_string (struct rspamd_http_connection_entry *entry, + const gchar *str); + +/** + * Send UCL using HTTP and JSON serialization + * @param entry router entry + * @param obj object to send + */ +void rspamd_controller_send_ucl (struct rspamd_http_connection_entry *entry, + ucl_object_t *obj); + #endif /* WORKER_UTIL_H_ */ |