|
Packit |
90a5c9 |
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
Packit |
90a5c9 |
* contributor license agreements. See the NOTICE file distributed with
|
|
Packit |
90a5c9 |
* this work for additional information regarding copyright ownership.
|
|
Packit |
90a5c9 |
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
Packit |
90a5c9 |
* (the "License"); you may not use this file except in compliance with
|
|
Packit |
90a5c9 |
* the License. You may obtain a copy of the License at
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* Unless required by applicable law or agreed to in writing, software
|
|
Packit |
90a5c9 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit |
90a5c9 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit |
90a5c9 |
* See the License for the specific language governing permissions and
|
|
Packit |
90a5c9 |
* limitations under the License.
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#ifndef __mod_h2__h2_filter__
|
|
Packit |
90a5c9 |
#define __mod_h2__h2_filter__
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
struct h2_bucket_beam;
|
|
Packit |
90a5c9 |
struct h2_headers;
|
|
Packit |
90a5c9 |
struct h2_stream;
|
|
Packit |
90a5c9 |
struct h2_session;
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
typedef struct h2_filter_cin {
|
|
Packit |
90a5c9 |
apr_pool_t *pool;
|
|
Packit |
90a5c9 |
apr_socket_t *socket;
|
|
Packit |
90a5c9 |
apr_interval_time_t timeout;
|
|
Packit |
90a5c9 |
apr_bucket_brigade *bb;
|
|
Packit |
90a5c9 |
struct h2_session *session;
|
|
Packit |
90a5c9 |
apr_bucket *cur;
|
|
Packit |
90a5c9 |
} h2_filter_cin;
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
h2_filter_cin *h2_filter_cin_create(struct h2_session *session);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
void h2_filter_cin_timeout_set(h2_filter_cin *cin, apr_interval_time_t timeout);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
apr_status_t h2_filter_core_input(ap_filter_t* filter,
|
|
Packit |
90a5c9 |
apr_bucket_brigade* brigade,
|
|
Packit |
90a5c9 |
ap_input_mode_t mode,
|
|
Packit |
90a5c9 |
apr_read_type_e block,
|
|
Packit |
90a5c9 |
apr_off_t readbytes);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/******* observer bucket ******************************************************/
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
typedef enum {
|
|
Packit |
90a5c9 |
H2_BUCKET_EV_BEFORE_DESTROY,
|
|
Packit |
90a5c9 |
H2_BUCKET_EV_BEFORE_MASTER_SEND
|
|
Packit |
90a5c9 |
} h2_bucket_event;
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
extern const apr_bucket_type_t h2_bucket_type_observer;
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
typedef apr_status_t h2_bucket_event_cb(void *ctx, h2_bucket_event event, apr_bucket *b);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#define H2_BUCKET_IS_OBSERVER(e) (e->type == &h2_bucket_type_observer)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
apr_bucket * h2_bucket_observer_make(apr_bucket *b, h2_bucket_event_cb *cb,
|
|
Packit |
90a5c9 |
void *ctx);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
apr_bucket * h2_bucket_observer_create(apr_bucket_alloc_t *list,
|
|
Packit |
90a5c9 |
h2_bucket_event_cb *cb, void *ctx);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
apr_status_t h2_bucket_observer_fire(apr_bucket *b, h2_bucket_event event);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
apr_bucket *h2_bucket_observer_beam(struct h2_bucket_beam *beam,
|
|
Packit |
90a5c9 |
apr_bucket_brigade *dest,
|
|
Packit |
90a5c9 |
const apr_bucket *src);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/******* /.well-known/h2/state handler ****************************************/
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
int h2_filter_h2_status_handler(request_rec *r);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#endif /* __mod_h2__h2_filter__ */
|