Motr  M0
filterc.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2017-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_FDMI_FILTERC_H__
26 #define __MOTR_FDMI_FILTERC_H__
27 
28 #include "rpc/rpclib.h"
29 #include "conf/confc.h"
30 #include "fdmi/fdmi.h"
31 
32 struct m0_motr;
33 
42 struct m0_filterc_ctx;
43 struct m0_filterc_iter;
44 
57  struct m0_reqh *reqh);
63  void (*fco_stop)(struct m0_filterc_ctx *ctx);
77  enum m0_fdmi_rec_type_id rec_type_id,
78  struct m0_filterc_iter *iter);
89  int (*fco_get_next)(struct m0_filterc_iter *iter,
90  struct m0_conf_fdmi_filter **out);
96  void (*fco_close)(struct m0_filterc_iter *iter);
97 };
98 
99 extern const struct m0_filterc_ops filterc_def_ops;
100 
108  const struct m0_filterc_ops *fcc_ops;
109 };
110 
125 };
126 
133 M0_INTERNAL void m0_filterc_ctx_init(struct m0_filterc_ctx *ctx,
134  const struct m0_filterc_ops *ops);
135 
140 M0_INTERNAL void m0_filterc_ctx_fini(struct m0_filterc_ctx *ctx);
141 
144 #endif /* __MOTR_FDMI_FDMI_SERVICE_H__ */
145 
146 /*
147  * Local variables:
148  * c-indentation-style: "K&R"
149  * c-basic-offset: 8
150  * tab-width: 8
151  * fill-column: 80
152  * scroll-step: 1
153  * End:
154  */
155 /*
156  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
157  */
struct m0_conf_fdmi_filter * fci_cur_flt
Definition: filterc.h:124
const struct m0_filterc_ops filterc_def_ops
Definition: filterc.c:41
int(* fco_open)(struct m0_filterc_ctx *ctx, enum m0_fdmi_rec_type_id rec_type_id, struct m0_filterc_iter *iter)
Definition: filterc.h:76
int(* fco_get_next)(struct m0_filterc_iter *iter, struct m0_conf_fdmi_filter **out)
Definition: filterc.h:89
struct m0_filterc_ctx * fci_filterc_ctx
Definition: filterc.h:122
const struct m0_filterc_ops * fcc_ops
Definition: filterc.h:108
void(* fco_stop)(struct m0_filterc_ctx *ctx)
Definition: filterc.h:63
M0_INTERNAL void m0_filterc_ctx_init(struct m0_filterc_ctx *ctx, const struct m0_filterc_ops *ops)
Definition: filterc.c:49
M0_INTERNAL void m0_filterc_ctx_fini(struct m0_filterc_ctx *ctx)
Definition: filterc.c:80
struct m0_confc * fcc_confc
Definition: filterc.h:106
Definition: reqh.h:94
m0_fdmi_rec_type_id
Definition: fdmi.h:234
static struct fdmi_ctx ctx
Definition: main.c:80
Definition: setup.h:354
struct m0_reqh reqh
Definition: rm_foms.c:48
int(* fco_start)(struct m0_filterc_ctx *ctx, struct m0_reqh *reqh)
Definition: filterc.h:56
Definition: nucleus.c:42
#define out(...)
Definition: gen.c:41
struct m0_fom_ops ops
Definition: io_foms.c:623
struct m0_conf_obj * fci_dir
Definition: filterc.h:123
void(* fco_close)(struct m0_filterc_iter *iter)
Definition: filterc.h:96