X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fmicrohttpd-util.h;h=df4d003eb95eaf943c34d54c741a2d48118fa872;hb=1910cd0e05f7661986680e0a4472f4e857f90787;hp=20ad76990c1dcedab49e0635e02efd9bd2b41b87;hpb=b1e2b33c5258f1cefcee55116ac5d049478c804d;p=elogind.git diff --git a/src/journal/microhttpd-util.h b/src/journal/microhttpd-util.h index 20ad76990..df4d003eb 100644 --- a/src/journal/microhttpd-util.h +++ b/src/journal/microhttpd-util.h @@ -22,7 +22,33 @@ #pragma once #include +#include #include "macro.h" -void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_attr_(2, 0); +void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_(2, 0); + +/* respond_oom() must be usable with return, hence this form. */ +#define respond_oom(connection) log_oom(), mhd_respond_oom(connection) + +int mhd_respondf(struct MHD_Connection *connection, + unsigned code, + const char *format, ...) _printf_(3,4); + +int mhd_respond(struct MHD_Connection *connection, + unsigned code, + const char *message); + +int mhd_respond_oom(struct MHD_Connection *connection); + +int check_permissions(struct MHD_Connection *connection, int *code); + +#ifdef HAVE_GNUTLS +void log_func_gnutls(int level, const char *message); + +/* This is additionally filtered by our internal log level, so it + * should be set fairly high to capture all potentially interesting + * events without overwhelming detail. + */ +#define GNUTLS_LOG_LEVEL 6 +#endif