1 /*
2    BAREOS® - Backup Archiving REcovery Open Sourced
3 
4    Copyright (C) 2020-2020 Bareos GmbH & Co. KG
5 
6    This program is Free Software; you can redistribute it and/or
7    modify it under the terms of version three of the GNU Affero General Public
8    License as published by the Free Software Foundation and included
9    in the file LICENSE.
10 
11    This program is distributed in the hope that it will be useful, but
12    WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14    Affero General Public License for more details.
15 
16    You should have received a copy of the GNU Affero General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19    02110-1301, USA.
20 */
21 
22 #ifndef BAREOS_CORE_SRC_PLUGINS_FILED_PYTHON_PLUGIN_PRIVATE_CONTEXT_H_
23 #define BAREOS_CORE_SRC_PLUGINS_FILED_PYTHON_PLUGIN_PRIVATE_CONTEXT_H_
24 
25 struct plugin_private_context {
26   int32_t backup_level; /* Backup level e.g. Full/Differential/Incremental */
27   utime_t since;        /* Since time for Differential/Incremental */
28   bool python_loaded;   /* Plugin has python module loaded ? */
29   bool python_path_set; /* Python plugin search path is set ? */
30   char* plugin_options; /* Plugin Option string */
31   char* module_path;    /* Plugin Module Path */
32   char* module_name;    /* Plugin Module Name */
33   char* fname;          /* Next filename to save */
34   char* link;           /* Target symlink points to */
35   char* object_name;    /* Restore Object Name */
36   char* object;         /* Restore Object Content */
37   PyThreadState*
38       interpreter;   /* Python interpreter for this instance of the plugin */
39   PyObject* pModule; /* Python Module entry point */
40   PyObject* pyModuleFunctionsDict; /* Python Dictionary */
41 };
42 
43 
44 #endif  // BAREOS_CORE_SRC_PLUGINS_FILED_PYTHON_PLUGIN_PRIVATE_CONTEXT_H_
45