syslog-ng source
python-options.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 Attila Szakacs
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 2 as published
6  * by the Free Software Foundation, or (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * As an additional exemption you are allowed to compile & link against the
18  * OpenSSL libraries as published by the OpenSSL project. See the file
19  * COPYING for details.
20  *
21  */
22 
23 #ifndef _SNG_PYTHON_OPTIONS_H
24 #define _SNG_PYTHON_OPTIONS_H
25 
26 #include "python-module.h"
27 
28 typedef struct _PythonOption PythonOption;
29 
30 PythonOption *python_option_string_new(const gchar *name, const gchar *value);
31 PythonOption *python_option_long_new(const gchar *name, gint64 value);
32 PythonOption *python_option_double_new(const gchar *name, gdouble value);
33 PythonOption *python_option_boolean_new(const gchar *name, gboolean value);
34 PythonOption *python_option_string_list_new(const gchar *name, const GList *value);
35 PythonOption *python_option_template_new(const gchar *name, const gchar *value);
36 
37 PythonOption *python_option_ref(PythonOption *self);
38 void python_option_unref(PythonOption *self);
39 const gchar *python_option_get_name(const PythonOption *self);
40 PyObject *python_option_create_value_py_object(const PythonOption *self);
41 
42 typedef struct _PythonOptions PythonOptions;
43 
44 PythonOptions *python_options_new(void);
45 void python_options_add_option(PythonOptions *self, PythonOption *option);
46 PythonOptions *python_options_clone(const PythonOptions *self);
47 PyObject *python_options_create_py_dict(const PythonOptions *self);
48 void python_options_free(PythonOptions *self);
49 
50 #endif
const gchar * name
Definition: debugger.c:265
PythonOption * python_option_string_new(const gchar *name, const gchar *value)
Definition: python-options.c:130
PyObject * python_options_create_py_dict(const PythonOptions *self)
Definition: python-options.c:335
void python_option_unref(PythonOption *self)
Definition: python-options.c:93
const gchar * python_option_get_name(const PythonOption *self)
Definition: python-options.c:51
PythonOption * python_option_template_new(const gchar *name, const gchar *value)
Definition: python-options.c:291
PyObject * python_option_create_value_py_object(const PythonOption *self)
Definition: python-options.c:57
PythonOption * python_option_string_list_new(const gchar *name, const GList *value)
Definition: python-options.c:246
PythonOption * python_option_ref(PythonOption *self)
Definition: python-options.c:81
PythonOptions * python_options_new(void)
Definition: python-options.c:311
PythonOptions * python_options_clone(const PythonOptions *self)
Definition: python-options.c:318
void python_options_add_option(PythonOptions *self, PythonOption *option)
Definition: python-options.c:329
PythonOption * python_option_long_new(const gchar *name, gint64 value)
Definition: python-options.c:158
void python_options_free(PythonOptions *self)
Definition: python-options.c:368
PythonOption * python_option_double_new(const gchar *name, gdouble value)
Definition: python-options.c:185
PythonOption * python_option_boolean_new(const gchar *name, gboolean value)
Definition: python-options.c:212
Definition: python-options.c:35
Definition: python-options.c:306
GString * value
Definition: test_decode.c:28