1 /* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 #ifndef __mod_h2__h2_task_output__
17 #define __mod_h2__h2_task_output__
19 /* h2_task_output reads a HTTP/1 response from the brigade and applies
20 * them to a h2_output_converter. The brigade is setup as the output brigade
21 * for our pseudo httpd conn_rec that is handling a specific h2_task.
24 struct apr_thread_cond_t;
33 } h2_task_output_state_t;
35 typedef struct h2_task_output h2_task_output;
37 struct h2_task_output {
39 h2_task_output_state_t state;
40 struct h2_from_h1 *from_h1;
41 unsigned int trailers_passed : 1;
44 h2_task_output *h2_task_output_create(struct h2_task *task, apr_pool_t *pool);
46 void h2_task_output_destroy(h2_task_output *output);
48 apr_status_t h2_task_output_write(h2_task_output *output,
50 apr_bucket_brigade* brigade);
52 void h2_task_output_close(h2_task_output *output);
54 int h2_task_output_has_started(h2_task_output *output);
56 #endif /* defined(__mod_h2__h2_task_output__) */