Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
#undef _POSIX_C_SOURCE
#include <Python.h>
-extern char *configfile;
-extern struct s_jl joblevels[];
-extern JCR *get_jcr_from_PyObject(PyObject *self);
-extern PyObject *find_method(PyObject *eventsObject, PyObject *method,
- const char *name);
+#include <lib/pythonlib.h>
+extern struct s_jl joblevels[];
static PyObject *set_job_events(PyObject *self, PyObject *arg);
static PyObject *job_run(PyObject *self, PyObject *arg);
{NULL, NULL, 0, NULL} /* last item */
};
-
struct s_vars {
const char *name;
const char *fmt;
case 0: /* Job */
return Py_BuildValue((char *)getvars[i].fmt, jcr->job->hdr.name);
case 1: /* level */
- return Py_BuildValue((char *)getvars[i].fmt, job_level_to_str(jcr->JobLevel));
+ return Py_BuildValue((char *)getvars[i].fmt, job_level_to_str(jcr->get_JobLevel()));
case 2: /* type */
- return Py_BuildValue((char *)getvars[i].fmt, job_type_to_str(jcr->JobType));
+ return Py_BuildValue((char *)getvars[i].fmt, job_type_to_str(jcr->get_JobType()));
case 3: /* JobId */
return Py_BuildValue((char *)getvars[i].fmt, jcr->JobId);
case 4: /* Client */
}
for (i=0; joblevels[i].level_name; i++) {
if (strcmp(strval, joblevels[i].level_name) == 0) {
- if (joblevels[i].job_type == jcr->JobType) {
- jcr->JobLevel = joblevels[i].level;
- jcr->jr.JobLevel = jcr->JobLevel;
+ if (joblevels[i].job_type == jcr->get_JobType()) {
+ jcr->set_JobLevel(joblevels[i].level);
+ jcr->jr.JobLevel = jcr->get_JobLevel();
return 0;
}
}