• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /** WARNING: Please do not use this header. This was added as a temporary
22  * measure to not break some of the external projects that depend on
23  * gpr_slice_* functions. We are actively working on moving all the
24  * gpr_slice_* references to grpc_slice_* and this file will be removed
25  */
26 
27 /* TODO (sreek) - Allowed by default but will be very soon turned off */
28 #define GRPC_ALLOW_GPR_SLICE_FUNCTIONS 1
29 
30 #ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS
31 
32 #define gpr_slice_refcount grpc_slice_refcount
33 #define gpr_slice grpc_slice
34 #define gpr_slice_buffer grpc_slice_buffer
35 
36 #define gpr_slice_ref grpc_slice_ref
37 #define gpr_slice_unref grpc_slice_unref
38 #define gpr_slice_new grpc_slice_new
39 #define gpr_slice_new_with_user_data grpc_slice_new_with_user_data
40 #define gpr_slice_new_with_len grpc_slice_new_with_len
41 #define gpr_slice_malloc grpc_slice_malloc
42 #define gpr_slice_from_copied_string grpc_slice_from_copied_string
43 #define gpr_slice_from_copied_buffer grpc_slice_from_copied_buffer
44 #define gpr_slice_from_static_string grpc_slice_from_static_string
45 #define gpr_slice_sub grpc_slice_sub
46 #define gpr_slice_sub_no_ref grpc_slice_sub_no_ref
47 #define gpr_slice_split_tail grpc_slice_split_tail
48 #define gpr_slice_split_head grpc_slice_split_head
49 #define gpr_slice_cmp grpc_slice_cmp
50 #define gpr_slice_str_cmp grpc_slice_str_cmp
51 
52 #define gpr_slice_buffer grpc_slice_buffer
53 #define gpr_slice_buffer_init grpc_slice_buffer_init
54 #define gpr_slice_buffer_destroy grpc_slice_buffer_destroy
55 #define gpr_slice_buffer_add grpc_slice_buffer_add
56 #define gpr_slice_buffer_add_indexed grpc_slice_buffer_add_indexed
57 #define gpr_slice_buffer_addn grpc_slice_buffer_addn
58 #define gpr_slice_buffer_tiny_add grpc_slice_buffer_tiny_add
59 #define gpr_slice_buffer_pop grpc_slice_buffer_pop
60 #define gpr_slice_buffer_reset_and_unref grpc_slice_buffer_reset_and_unref
61 #define gpr_slice_buffer_swap grpc_slice_buffer_swap
62 #define gpr_slice_buffer_move_into grpc_slice_buffer_move_into
63 #define gpr_slice_buffer_trim_end grpc_slice_buffer_trim_end
64 #define gpr_slice_buffer_move_first grpc_slice_buffer_move_first
65 #define gpr_slice_buffer_take_first grpc_slice_buffer_take_first
66 
67 #endif /* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */
68 
69 #endif /* GRPC_IMPL_CODEGEN_GPR_SLICE_H */
70