GRPC Core 0.10.0.0

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
incoming_metadata.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright 2015, Google Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above
13 * copyright notice, this list of conditions and the following disclaimer
14 * in the documentation and/or other materials provided with the
15 * distribution.
16 * * Neither the name of Google Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
33
34 #ifndef GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H
35 #define GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H
36
37 #include "src/core/transport/transport.h"
38
39 typedef struct {
40 grpc_linked_mdelem *elems;
41 size_t count;
42 size_t capacity;
43 gpr_timespec deadline;
44 } grpc_chttp2_incoming_metadata_buffer;
45
46 typedef struct {
47 grpc_linked_mdelem *elems;
48 } grpc_chttp2_incoming_metadata_live_op_buffer;
49
51 void grpc_chttp2_incoming_metadata_buffer_init(
52 grpc_chttp2_incoming_metadata_buffer *buffer);
53 void grpc_chttp2_incoming_metadata_buffer_destroy(
54 grpc_chttp2_incoming_metadata_buffer *buffer);
55 void grpc_chttp2_incoming_metadata_buffer_reset(
56 grpc_chttp2_incoming_metadata_buffer *buffer);
57
58 void grpc_chttp2_incoming_metadata_buffer_add(
59 grpc_chttp2_incoming_metadata_buffer *buffer, grpc_mdelem *elem);
60 void grpc_chttp2_incoming_metadata_buffer_set_deadline(
61 grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline);
62
66 void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into(
67 grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb);
68
69 void grpc_incoming_metadata_buffer_move_to_referencing_sopb(
70 grpc_chttp2_incoming_metadata_buffer *src,
71 grpc_chttp2_incoming_metadata_buffer *dst, grpc_stream_op_buffer *sopb);
72
73 void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op(
74 grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb,
75 grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer);
76
77 void grpc_chttp2_incoming_metadata_live_op_buffer_end(
78 grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer);
79
80 #endif /* GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H */
grpc_chttp2_incoming_metadata_live_op_buffer
Definition: incoming_metadata.h:46
transport.h
grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into
void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb)
extend sopb with a metadata batch; this must be post-processed by grpc_chttp2_incoming_metadata_buffe...
Definition: incoming_metadata.c:78
grpc_incoming_metadata_buffer_move_to_referencing_sopb
void grpc_incoming_metadata_buffer_move_to_referencing_sopb(grpc_chttp2_incoming_metadata_buffer *src, grpc_chttp2_incoming_metadata_buffer *dst, grpc_stream_op_buffer *sopb)
Definition: incoming_metadata.c:101
grpc_chttp2_incoming_metadata_buffer::deadline
gpr_timespec deadline
Definition: incoming_metadata.h:43
grpc_chttp2_incoming_metadata_buffer_set_deadline
void grpc_chttp2_incoming_metadata_buffer_set_deadline(grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline)
Definition: incoming_metadata.c:67
grpc_chttp2_incoming_metadata_buffer::capacity
size_t capacity
Definition: incoming_metadata.h:42
grpc_chttp2_incoming_metadata_buffer_destroy
void grpc_chttp2_incoming_metadata_buffer_destroy(grpc_chttp2_incoming_metadata_buffer *buffer)
Definition: incoming_metadata.c:48
grpc_chttp2_incoming_metadata_buffer_init
void grpc_chttp2_incoming_metadata_buffer_init(grpc_chttp2_incoming_metadata_buffer *buffer)
assumes everything initially zeroed
Definition: incoming_metadata.c:43
grpc_mdelem
Definition: metadata.h:78
grpc_chttp2_incoming_metadata_live_op_buffer::elems
grpc_linked_mdelem * elems
Definition: incoming_metadata.h:47
grpc_linked_mdelem
Definition: stream_op.h:76
grpc_chttp2_incoming_metadata_buffer
Definition: incoming_metadata.h:39
grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op
void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb, grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer)
Definition: incoming_metadata.c:130
gpr_timespec
Definition: time.h:60
grpc_chttp2_incoming_metadata_buffer::elems
grpc_linked_mdelem * elems
Definition: incoming_metadata.h:40
grpc_stream_op_buffer
A stream op buffer is a wrapper around stream operations that is dynamically extendable.
Definition: stream_op.h:176
grpc_chttp2_incoming_metadata_buffer_reset
void grpc_chttp2_incoming_metadata_buffer_reset(grpc_chttp2_incoming_metadata_buffer *buffer)
grpc_chttp2_incoming_metadata_buffer_add
void grpc_chttp2_incoming_metadata_buffer_add(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_mdelem *elem)
Definition: incoming_metadata.c:57
grpc_chttp2_incoming_metadata_buffer::count
size_t count
Definition: incoming_metadata.h:41
grpc_chttp2_incoming_metadata_live_op_buffer_end
void grpc_chttp2_incoming_metadata_live_op_buffer_end(grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer)
Definition: incoming_metadata.c:72