diff options
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_ */ |