GRPC Core  4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gpr_slice.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2016, 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 #ifndef GRPC_IMPL_CODEGEN_GPR_SLICE_H
34 #define GRPC_IMPL_CODEGEN_GPR_SLICE_H
35 
42 /* TODO (sreek) - Allowed by default but will be very soon turned off */
43 #define GRPC_ALLOW_GPR_SLICE_FUNCTIONS 1
44 
45 #ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS
46 
47 #define gpr_slice_refcount grpc_slice_refcount
48 #define gpr_slice grpc_slice
49 #define gpr_slice_buffer grpc_slice_buffer
50 
51 #define gpr_slice_ref grpc_slice_ref
52 #define gpr_slice_unref grpc_slice_unref
53 #define gpr_slice_new grpc_slice_new
54 #define gpr_slice_new_with_user_data grpc_slice_new_with_user_data
55 #define gpr_slice_new_with_len grpc_slice_new_with_len
56 #define gpr_slice_malloc grpc_slice_malloc
57 #define gpr_slice_from_copied_string grpc_slice_from_copied_string
58 #define gpr_slice_from_copied_buffer grpc_slice_from_copied_buffer
59 #define gpr_slice_from_static_string grpc_slice_from_static_string
60 #define gpr_slice_sub grpc_slice_sub
61 #define gpr_slice_sub_no_ref grpc_slice_sub_no_ref
62 #define gpr_slice_split_tail grpc_slice_split_tail
63 #define gpr_slice_split_head grpc_slice_split_head
64 #define gpr_slice_cmp grpc_slice_cmp
65 #define gpr_slice_str_cmp grpc_slice_str_cmp
66 
67 #define gpr_slice_buffer grpc_slice_buffer
68 #define gpr_slice_buffer_init grpc_slice_buffer_init
69 #define gpr_slice_buffer_destroy grpc_slice_buffer_destroy
70 #define gpr_slice_buffer_add grpc_slice_buffer_add
71 #define gpr_slice_buffer_add_indexed grpc_slice_buffer_add_indexed
72 #define gpr_slice_buffer_addn grpc_slice_buffer_addn
73 #define gpr_slice_buffer_tiny_add grpc_slice_buffer_tiny_add
74 #define gpr_slice_buffer_pop grpc_slice_buffer_pop
75 #define gpr_slice_buffer_reset_and_unref grpc_slice_buffer_reset_and_unref
76 #define gpr_slice_buffer_swap grpc_slice_buffer_swap
77 #define gpr_slice_buffer_move_into grpc_slice_buffer_move_into
78 #define gpr_slice_buffer_trim_end grpc_slice_buffer_trim_end
79 #define gpr_slice_buffer_move_first grpc_slice_buffer_move_first
80 #define gpr_slice_buffer_take_first grpc_slice_buffer_take_first
81 
82 #endif /* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */
83 
84 #endif /* GRPC_IMPL_CODEGEN_GPR_SLICE_H */