/* 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);
*
* ==============================================================
*/
-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);
*((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;
/* 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,
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,
-/*
- *
- * 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.
(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"