diff options
-rw-r--r-- | src/include/microhttpd2.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h index 295baca9..d9b152f9 100644 --- a/src/include/microhttpd2.h +++ b/src/include/microhttpd2.h | |||
@@ -2489,8 +2489,13 @@ enum MHD_FIXED_ENUM_MHD_APP_SET_ MHD_HTTP_PostEncoding | |||
2489 | 2489 | ||
2490 | /** | 2490 | /** |
2491 | * Predefined list of headers | 2491 | * Predefined list of headers |
2492 | * To be filled with HPACK static data | ||
2492 | */ | 2493 | */ |
2493 | enum MHD_PredefinedHeader; | 2494 | enum MHD_PredefinedHeader |
2495 | { | ||
2496 | MHD_PREDEF_ACCEPT_CHARSET = 15, | ||
2497 | MHD_PREDEF_ACCEPT_LANGUAGE = 17 | ||
2498 | }; | ||
2494 | 2499 | ||
2495 | /** | 2500 | /** |
2496 | * Get text version of the predefined header. | 2501 | * Get text version of the predefined header. |
@@ -2938,7 +2943,7 @@ union MHD_WorkModeParam | |||
2938 | * Work mode parameters for #MHD_WM_EXTERNAL_EVENT_LOOP_CB_LEVEL and | 2943 | * Work mode parameters for #MHD_WM_EXTERNAL_EVENT_LOOP_CB_LEVEL and |
2939 | * #MHD_WM_EXTERNAL_EVENT_LOOP_CB_EDGE modes | 2944 | * #MHD_WM_EXTERNAL_EVENT_LOOP_CB_EDGE modes |
2940 | */ | 2945 | */ |
2941 | MHD_SocketRegistrationUpdateCallback v_external_event_loop_cb; | 2946 | struct MHD_WorkModeExternalEventLoopCBParam v_external_event_loop_cb; |
2942 | /** | 2947 | /** |
2943 | * Number of worker threads for #MHD_WM_WORKER_THREADS. | 2948 | * Number of worker threads for #MHD_WM_WORKER_THREADS. |
2944 | * If set to one, then daemon starts with single worker thread that process | 2949 | * If set to one, then daemon starts with single worker thread that process |
@@ -6775,9 +6780,9 @@ struct MHD_ConnectionOptionAndValue | |||
6775 | */ | 6780 | */ |
6776 | # define MHD_C_OPTION_TIMEOUT(timeout) \ | 6781 | # define MHD_C_OPTION_TIMEOUT(timeout) \ |
6777 | MHD_NOWARN_COMPOUND_LITERALS_ \ | 6782 | MHD_NOWARN_COMPOUND_LITERALS_ \ |
6778 | (const struct MHD_ConnectionOptionAndValue) \ | 6783 | (const struct MHD_ConnectionOptionAndValue) \ |
6779 | { \ | 6784 | { \ |
6780 | .opt = (option), \ | 6785 | .opt = (MHD_C_O_TIMEOUT), \ |
6781 | .val.v_timeout = (timeout) \ | 6786 | .val.v_timeout = (timeout) \ |
6782 | } \ | 6787 | } \ |
6783 | MHD_RESTORE_WARN_COMPOUND_LITERALS_ | 6788 | MHD_RESTORE_WARN_COMPOUND_LITERALS_ |
@@ -6788,7 +6793,7 @@ struct MHD_ConnectionOptionAndValue | |||
6788 | */ | 6793 | */ |
6789 | # define MHD_C_OPTION_TERMINATE() \ | 6794 | # define MHD_C_OPTION_TERMINATE() \ |
6790 | MHD_NOWARN_COMPOUND_LITERALS_ \ | 6795 | MHD_NOWARN_COMPOUND_LITERALS_ \ |
6791 | (const struct MHD_ConnectionOptionAndValue) \ | 6796 | (const struct MHD_ConnectionOptionAndValue) \ |
6792 | { \ | 6797 | { \ |
6793 | .opt = (MHD_C_O_END) \ | 6798 | .opt = (MHD_C_O_END) \ |
6794 | } \ | 6799 | } \ |
@@ -6810,7 +6815,7 @@ MHD_C_OPTION_TIMEOUT (unsigned int timeout) | |||
6810 | { | 6815 | { |
6811 | struct MHD_ConnectionOptionAndValue opt_val; | 6816 | struct MHD_ConnectionOptionAndValue opt_val; |
6812 | 6817 | ||
6813 | opt_val.opt = option; | 6818 | opt_val.opt = MHD_C_O_TIMEOUT; |
6814 | opt_val.val.v_timeout = timeout; | 6819 | opt_val.val.v_timeout = timeout; |
6815 | 6820 | ||
6816 | return opt_val; | 6821 | return opt_val; |
@@ -8171,7 +8176,7 @@ MHD_NOWARN_VARIADIC_MACROS_ | |||
8171 | */ | 8176 | */ |
8172 | # define MHD_RESPONSE_OPTIONS_SET(response,...) \ | 8177 | # define MHD_RESPONSE_OPTIONS_SET(response,...) \ |
8173 | MHD_NOWARN_COMPOUND_LITERALS_ \ | 8178 | MHD_NOWARN_COMPOUND_LITERALS_ \ |
8174 | MHD_response_options_set (daemon, \ | 8179 | MHD_response_options_set (response, \ |
8175 | ((const struct MHD_ResponseOptionAndValue[]) \ | 8180 | ((const struct MHD_ResponseOptionAndValue[]) \ |
8176 | {__VA_ARGS__, MHD_R_OPTION_TERMINATE ()}), \ | 8181 | {__VA_ARGS__, MHD_R_OPTION_TERMINATE ()}), \ |
8177 | MHD_OPTIONS_ARRAY_MAX_SIZE) \ | 8182 | MHD_OPTIONS_ARRAY_MAX_SIZE) \ |
@@ -8181,7 +8186,7 @@ MHD_C_DECLRATIONS_FINISH_HERE_ | |||
8181 | # include <vector> | 8186 | # include <vector> |
8182 | MHD_C_DECLRATIONS_START_HERE_ | 8187 | MHD_C_DECLRATIONS_START_HERE_ |
8183 | /** | 8188 | /** |
8184 | * Set the requested options for the daemon. | 8189 | * Set the requested options for the response. |
8185 | * | 8190 | * |
8186 | * If any option fail other options may be or may be not applied. | 8191 | * If any option fail other options may be or may be not applied. |
8187 | * | 8192 | * |
@@ -8190,16 +8195,16 @@ MHD_C_DECLRATIONS_START_HERE_ | |||
8190 | * MHD_RESPONE_OPTIONS_SET(d, MHD_R_OPTION_REUSABLE(MHD_YES), | 8195 | * MHD_RESPONE_OPTIONS_SET(d, MHD_R_OPTION_REUSABLE(MHD_YES), |
8191 | * MHD_R_OPTION_TERMINATION_CALLBACK(func, cls)) | 8196 | * MHD_R_OPTION_TERMINATION_CALLBACK(func, cls)) |
8192 | * | 8197 | * |
8193 | * @param daemon the daemon to set the options | 8198 | * @param response the response to set the option |
8194 | * @param ... the list of the options, each option must be created | 8199 | * @param ... the list of the options, each option must be created |
8195 | * by helpers MHD_D_OPTION_NameOfOption(option_value) | 8200 | * by helpers MHD_RESPONSE_OPTION_NameOfOption(option_value) |
8196 | * @return ::MHD_SC_OK on success, | 8201 | * @return ::MHD_SC_OK on success, |
8197 | * error code otherwise | 8202 | * error code otherwise |
8198 | */ | 8203 | */ |
8199 | # define MHD_DAEMON_OPTIONS_SET(daemon,...) \ | 8204 | # define MHD_RESPONSE_OPTIONS_SET(response,...) \ |
8200 | MHD_NOWARN_CPP_INIT_LIST_ \ | 8205 | MHD_NOWARN_CPP_INIT_LIST_ \ |
8201 | MHD_daemon_options_set (daemon, \ | 8206 | MHD_response_options_set (response, \ |
8202 | (std::vector<struct MHD_DaemonOptionAndValue> \ | 8207 | (std::vector<struct MHD_ResponseOptionAndValue> \ |
8203 | {__VA_ARGS__,MHD_R_OPTION_TERMINATE ()}).data (), \ | 8208 | {__VA_ARGS__,MHD_R_OPTION_TERMINATE ()}).data (), \ |
8204 | MHD_OPTIONS_ARRAY_MAX_SIZE) \ | 8209 | MHD_OPTIONS_ARRAY_MAX_SIZE) \ |
8205 | MHD_RESTORE_WARN_CPP_INIT_LIST_ | 8210 | MHD_RESTORE_WARN_CPP_INIT_LIST_ |