Imported Upstream version 1.41.0
[platform/upstream/grpc.git] / include / grpc / impl / codegen / gpr_slice.h
1 /*
2  *
3  * Copyright 2016 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 #ifndef GRPC_IMPL_CODEGEN_GPR_SLICE_H
19 #define GRPC_IMPL_CODEGEN_GPR_SLICE_H
20
21 // IWYU pragma: private
22
23 /** WARNING: Please do not use this header. This was added as a temporary
24  * measure to not break some of the external projects that depend on
25  * gpr_slice_* functions. We are actively working on moving all the
26  * gpr_slice_* references to grpc_slice_* and this file will be removed
27  */
28
29 /* TODO (sreek) - Allowed by default but will be very soon turned off */
30 #define GRPC_ALLOW_GPR_SLICE_FUNCTIONS 1
31
32 #ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS
33
34 #define gpr_slice_refcount grpc_slice_refcount
35 #define gpr_slice grpc_slice
36 #define gpr_slice_buffer grpc_slice_buffer
37
38 #define gpr_slice_ref grpc_slice_ref
39 #define gpr_slice_unref grpc_slice_unref
40 #define gpr_slice_new grpc_slice_new
41 #define gpr_slice_new_with_user_data grpc_slice_new_with_user_data
42 #define gpr_slice_new_with_len grpc_slice_new_with_len
43 #define gpr_slice_malloc grpc_slice_malloc
44 #define gpr_slice_from_copied_string grpc_slice_from_copied_string
45 #define gpr_slice_from_copied_buffer grpc_slice_from_copied_buffer
46 #define gpr_slice_from_static_string grpc_slice_from_static_string
47 #define gpr_slice_sub grpc_slice_sub
48 #define gpr_slice_sub_no_ref grpc_slice_sub_no_ref
49 #define gpr_slice_split_tail grpc_slice_split_tail
50 #define gpr_slice_split_head grpc_slice_split_head
51 #define gpr_slice_cmp grpc_slice_cmp
52 #define gpr_slice_str_cmp grpc_slice_str_cmp
53
54 #define gpr_slice_buffer grpc_slice_buffer
55 #define gpr_slice_buffer_init grpc_slice_buffer_init
56 #define gpr_slice_buffer_destroy grpc_slice_buffer_destroy
57 #define gpr_slice_buffer_add grpc_slice_buffer_add
58 #define gpr_slice_buffer_add_indexed grpc_slice_buffer_add_indexed
59 #define gpr_slice_buffer_addn grpc_slice_buffer_addn
60 #define gpr_slice_buffer_tiny_add grpc_slice_buffer_tiny_add
61 #define gpr_slice_buffer_pop grpc_slice_buffer_pop
62 #define gpr_slice_buffer_reset_and_unref grpc_slice_buffer_reset_and_unref
63 #define gpr_slice_buffer_swap grpc_slice_buffer_swap
64 #define gpr_slice_buffer_move_into grpc_slice_buffer_move_into
65 #define gpr_slice_buffer_trim_end grpc_slice_buffer_trim_end
66 #define gpr_slice_buffer_move_first grpc_slice_buffer_move_first
67 #define gpr_slice_buffer_take_first grpc_slice_buffer_take_first
68
69 #endif /* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */
70
71 #endif /* GRPC_IMPL_CODEGEN_GPR_SLICE_H */