Motr  M0
fop_item_type.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2013-2020 Seagate Technology LLC and/or its Affiliates
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  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 #pragma once
24 
25 #ifndef __MOTR_FOP_FOP_ONWIRE_H__
26 #define __MOTR_FOP_FOP_ONWIRE_H__
27 
28 #include "rpc/rpc_helpers.h"
29 
30 struct m0_rpc_item;
31 struct m0_rpc_item_type;
32 
49 M0_INTERNAL int
51  struct m0_rpc_item *item,
52  struct m0_bufvec_cursor *cur);
53 
64 M0_INTERNAL int
66  struct m0_rpc_item **item_out,
67  struct m0_bufvec_cursor *cur);
68 
75 M0_INTERNAL m0_bcount_t m0_fop_payload_size(const struct m0_rpc_item *item);
76 
77 M0_INTERNAL int m0_fop_item_encdec(struct m0_rpc_item *item,
78  struct m0_bufvec_cursor *cur,
79  enum m0_xcode_what what);
80 
81 void m0_fop_item_get(struct m0_rpc_item *item);
82 void m0_fop_item_put(struct m0_rpc_item *item);
83 
86 /* __MOTR_FOP_FOP_ONWIRE_H__ */
87 #endif
88 
89 /*
90  * Local variables:
91  * c-indentation-style: "K&R"
92  * c-basic-offset: 8
93  * tab-width: 8
94  * fill-column: 80
95  * scroll-step: 1
96  * End:
97  */
static struct buffer * cur(struct m0_addb2_mach *mach, m0_bcount_t space)
Definition: addb2.c:791
uint64_t m0_bcount_t
Definition: types.h:77
m0_xcode_what
Definition: xcode.h:647
static struct m0_rpc_item * item
Definition: item.c:56
M0_INTERNAL m0_bcount_t m0_fop_payload_size(const struct m0_rpc_item *item)
Definition: fop_item_type.c:32
M0_INTERNAL int m0_fop_item_type_default_encode(const struct m0_rpc_item_type *item_type, struct m0_rpc_item *item, struct m0_bufvec_cursor *cur)
Definition: fop_item_type.c:47
M0_INTERNAL int m0_fop_item_type_default_decode(const struct m0_rpc_item_type *item_type, struct m0_rpc_item **item_out, struct m0_bufvec_cursor *cur)
Definition: fop_item_type.c:58
void m0_fop_item_put(struct m0_rpc_item *item)
M0_INTERNAL int m0_fop_item_encdec(struct m0_rpc_item *item, struct m0_bufvec_cursor *cur, enum m0_xcode_what what)
Definition: fop_item_type.c:95
void m0_fop_item_get(struct m0_rpc_item *item)