syslog-ng source
python-bookmark.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 One Identity
3  * Copyright (c) 2020 László Várady
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * As an additional exemption you are allowed to compile & link against the
20  * OpenSSL libraries as published by the OpenSSL project. See the file
21  * COPYING for details.
22  *
23  */
24 
25 #ifndef _SNG_PYTHON_BOOKMARK_H
26 #define _SNG_PYTHON_BOOKMARK_H
27 
28 #include "python-module.h"
29 #include "ack-tracker/bookmark.h"
30 
31 typedef struct _PyBookmark
32 {
33  PyObject_HEAD
34  PyObject *data;
35  PyObject *save;
36 } PyBookmark;
37 
38 extern PyTypeObject py_bookmark_type;
39 
40 int py_is_bookmark(PyObject *obj);
41 PyBookmark *py_bookmark_new(PyObject *data, PyObject *save);
42 void py_bookmark_fill(Bookmark *bookmark, PyBookmark *py_bookmark);
43 
44 PyBookmark *bookmark_to_py_bookmark(Bookmark *bookmark);
45 
46 void py_bookmark_global_init(void);
47 
48 #endif
PyTypeObject py_bookmark_type
Definition: python-bookmark.c:105
PyBookmark * py_bookmark_new(PyObject *data, PyObject *save)
Definition: python-bookmark.c:52
void py_bookmark_fill(Bookmark *bookmark, PyBookmark *py_bookmark)
Definition: python-bookmark.c:88
void py_bookmark_global_init(void)
Definition: python-bookmark.c:119
PyBookmark * bookmark_to_py_bookmark(Bookmark *bookmark)
Definition: python-bookmark.c:68
int py_is_bookmark(PyObject *obj)
Definition: python-bookmark.c:38
Definition: python-bookmark.h:32
PyObject_HEAD PyObject * data
Definition: python-bookmark.h:34
PyObject * save
Definition: python-bookmark.h:35