Debian Codegraph @

lib/mrb/mrb_content_type.c

raw symbols SCIP
1 /*
2 Copyright(C) 2015 Brazil
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #include "../grn_ctx_impl.h"
20
21 #ifdef GRN_WITH_MRUBY
22 #include <mruby.h>
23
24 #include "mrb_ctx.h"
25 #include "mrb_content_type.h"
26
27 void
28 grn_mrb_content_type_init(grn_ctx *ctx)
29 {
30 grn_mrb_data *data = &(ctx->impl->mrb);
31 mrb_state *mrb = data->state;
32 struct RClass *module;
33
34 module = mrb_define_module_under(mrb, data->module, "ContentType");
35
36 mrb_define_const(mrb, module, "NONE",
37 mrb_int_value(mrb, GRN_CONTENT_NONE));
38 mrb_define_const(mrb, module, "TSV",
39 mrb_int_value(mrb, GRN_CONTENT_TSV));
40 mrb_define_const(mrb, module, "JSON",
41 mrb_int_value(mrb, GRN_CONTENT_JSON));
42 mrb_define_const(mrb, module, "XML",
43 mrb_int_value(mrb, GRN_CONTENT_XML));
44 mrb_define_const(mrb, module, "MSGPACK",
45 mrb_int_value(mrb, GRN_CONTENT_MSGPACK));
46 mrb_define_const(mrb, module, "GROONGA_COMMAND_LIST",
47 mrb_int_value(mrb, GRN_CONTENT_GROONGA_COMMAND_LIST));
48 mrb_define_const(mrb, module, "APACHE_ARROW",
49 mrb_int_value(mrb, GRN_CONTENT_APACHE_ARROW));
50 }
51 #endif