From: Kern Sibbald Date: Mon, 28 Jan 2008 15:51:54 +0000 (+0000) Subject: Update X-Git-Tag: Release-7.0.0~5097 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3eaeca716e16046c0a11708bbf2d7ae081e37c4c;p=bacula%2Fbacula Update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6334 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/dir-plugins.c b/bacula/src/dird/dir-plugins.c index 69518b9f42..f2c2986b0b 100644 --- a/bacula/src/dird/dir-plugins.c +++ b/bacula/src/dird/dir-plugins.c @@ -40,8 +40,8 @@ const char *plugin_type = "-dir.so"; /* Forward referenced functions */ -static bpError baculaGetValue(bpContext *ctx, bVariable var, void *value); -static bpError baculaSetValue(bpContext *ctx, bVariable var, void *value); +static bpError baculaGetValue(bpContext *ctx, brVariable var, void *value); +static bpError baculaSetValue(bpContext *ctx, bwVariable var, void *value); static bpError baculaRegisterEvents(bpContext *ctx, ...); static bpError baculaJobMsg(bpContext *ctx, const char *file, int line, int type, time_t mtime, const char *msg); @@ -156,7 +156,7 @@ void free_plugins(JCR *jcr) * * ============================================================== */ -static bpError baculaGetValue(bpContext *ctx, bVariable var, void *value) +static bpError baculaGetValue(bpContext *ctx, brVariable var, void *value) { JCR *jcr = (JCR *)(ctx->bContext); // Dmsg1(dbglvl, "bacula: baculaGetValue var=%d\n", var); @@ -169,22 +169,13 @@ static bpError baculaGetValue(bpContext *ctx, bVariable var, void *value) *((int *)value) = jcr->JobId; Dmsg1(dbglvl, "Bacula: return bVarJobId=%d\n", jcr->JobId); break; - case bVarFDName: - *((char **)value) = my_name; - Dmsg1(dbglvl, "Bacula: return my_name=%s\n", my_name); - break; - case bVarLevel: - case bVarType: - case bVarClient: - case bVarJobName: - case bVarJobStatus: - case bVarSinceTime: + default: break; } return 0; } -static bpError baculaSetValue(bpContext *ctx, bVariable var, void *value) +static bpError baculaSetValue(bpContext *ctx, bwVariable var, void *value) { Dmsg1(dbglvl, "bacula: baculaSetValue var=%d\n", var); return 0; diff --git a/bacula/src/dird/dir-plugins.h b/bacula/src/dird/dir-plugins.h index e25b3265c4..823e55c7ce 100644 --- a/bacula/src/dird/dir-plugins.h +++ b/bacula/src/dird/dir-plugins.h @@ -58,15 +58,36 @@ extern "C" { /* Bacula Variable Ids */ typedef enum { - bVarJobId = 1, - bVarFDName = 2, - bVarLevel = 3, - bVarType = 4, + bVarJob = 1, + bVarLevel = 2, + bVarType = 3, + bVarJobId = 4, bVarClient = 5, - bVarJobName = 6, - bVarJobStatus = 7, - bVarSinceTime = 8 -} bVariable; + bVarNumVols = 6, + bVarPool = 7, + bVarStorage = 8, + bVarCatalog = 9, + bVarMediaType = 10, + bVarJobName = 11, + bVarJobStatus = 12, + bVarPriority = 13, + bVarVolumeName = 14, + bVarCatalogRes = 15, + bVarJobErrors = 16, + bVarJobFiles = 17, + bVarSDJobFiles = 18, + bVarSDErrors = 19, + bVarFDJobStatus = 20, + bVarSDJobStatus = 21 +} brVariable; + +typedef enum { + bwVarJobReport = 1, + bwVarVolumeName = 2, + bwVarPriority = 3, + bwVarJobLevel = 4, +} bwVariable; + typedef enum { bEventJobStart = 1, @@ -87,8 +108,8 @@ typedef struct s_baculaFuncs { uint32_t size; uint32_t interface; bpError (*registerBaculaEvents)(bpContext *ctx, ...); - bpError (*getBaculaValue)(bpContext *ctx, bVariable var, void *value); - bpError (*setBaculaValue)(bpContext *ctx, bVariable var, void *value); + bpError (*getBaculaValue)(bpContext *ctx, brVariable var, void *value); + bpError (*setBaculaValue)(bpContext *ctx, bwVariable var, void *value); bpError (*JobMessage)(bpContext *ctx, const char *file, int line, int type, time_t mtime, const char *msg); bpError (*DebugMessage)(bpContext *ctx, const char *file, int line, diff --git a/bacula/src/dird/pythondir.c b/bacula/src/dird/pythondir.c index c17606e2f4..16a20a007b 100644 --- a/bacula/src/dird/pythondir.c +++ b/bacula/src/dird/pythondir.c @@ -1,16 +1,7 @@ -/* - * - * Bacula interface to Python for the Director - * - * Kern Sibbald, November MMIV - * - * Version $Id$ - * - */ /* Bacula® - The Network Backup Solution - Copyright (C) 2004-2006 Free Software Foundation Europe e.V. + Copyright (C) 2004-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -34,6 +25,15 @@ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * + * Bacula interface to Python for the Director + * + * Kern Sibbald, November MMIV + * + * Version $Id$ + * + */ #include "bacula.h" #include "dird.h"