mod_http2.h 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* Licensed to the Apache Software Foundation (ASF) under one or more
  2. * contributor license agreements. See the NOTICE file distributed with
  3. * this work for additional information regarding copyright ownership.
  4. * The ASF licenses this file to You under the Apache License, Version 2.0
  5. * (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef __MOD_HTTP2_H__
  17. #define __MOD_HTTP2_H__
  18. /** The http2_var_lookup() optional function retrieves HTTP2 environment
  19. * variables. */
  20. APR_DECLARE_OPTIONAL_FN(char *,
  21. http2_var_lookup, (apr_pool_t *, server_rec *,
  22. conn_rec *, request_rec *, char *));
  23. /** An optional function which returns non-zero if the given connection
  24. * or its master connection is using HTTP/2. */
  25. APR_DECLARE_OPTIONAL_FN(int,
  26. http2_is_h2, (conn_rec *));
  27. /*******************************************************************************
  28. * START HTTP/2 request engines (DEPRECATED)
  29. ******************************************************************************/
  30. /* The following functions were introduced for the experimental mod_proxy_http2
  31. * support, but have been abandoned since.
  32. * They are still declared here for backward compatibiliy, in case someone
  33. * tries to build an old mod_proxy_http2 against it, but will disappear
  34. * completely sometime in the future.
  35. */
  36. struct apr_thread_cond_t;
  37. typedef struct h2_req_engine h2_req_engine;
  38. typedef void http2_output_consumed(void *ctx, conn_rec *c, apr_off_t consumed);
  39. typedef apr_status_t http2_req_engine_init(h2_req_engine *engine,
  40. const char *id,
  41. const char *type,
  42. apr_pool_t *pool,
  43. apr_size_t req_buffer_size,
  44. request_rec *r,
  45. http2_output_consumed **pconsumed,
  46. void **pbaton);
  47. APR_DECLARE_OPTIONAL_FN(apr_status_t,
  48. http2_req_engine_push, (const char *engine_type,
  49. request_rec *r,
  50. http2_req_engine_init *einit));
  51. APR_DECLARE_OPTIONAL_FN(apr_status_t,
  52. http2_req_engine_pull, (h2_req_engine *engine,
  53. apr_read_type_e block,
  54. int capacity,
  55. request_rec **pr));
  56. APR_DECLARE_OPTIONAL_FN(void,
  57. http2_req_engine_done, (h2_req_engine *engine,
  58. conn_rec *rconn,
  59. apr_status_t status));
  60. APR_DECLARE_OPTIONAL_FN(void,
  61. http2_get_num_workers, (server_rec *s,
  62. int *minw, int *max));
  63. /*******************************************************************************
  64. * END HTTP/2 request engines (DEPRECATED)
  65. ******************************************************************************/
  66. #endif