From: Kern Sibbald Date: Thu, 3 Jan 2008 16:32:57 +0000 (+0000) Subject: Plugin update X-Git-Tag: Release-3.0.0~2059 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=82e739c5045861d12fe1a08a9998b8d352269b7c;p=bacula%2Fbacula Plugin update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6189 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/plugins/fd/example-plugin-fd.c b/bacula/src/plugins/fd/example-plugin-fd.c index fd5e6326c0..13315586f5 100644 --- a/bacula/src/plugins/fd/example-plugin-fd.c +++ b/bacula/src/plugins/fd/example-plugin-fd.c @@ -129,9 +129,18 @@ static bpError setPluginValue(bpContext *ctx, pVariable var, void *value) static bpError handlePluginEvent(bpContext *ctx, bEvent *event) { char *name; - printf("plugin: HandleEvent Event=%d\n", event->eventType); + switch (event->eventType) { + case bEventJobStart: + printf("plugin: HandleEvent JobStart\n"); + break; + case bEventJobEnd: + printf("plugin: HandleEvent JobEnd\n"); + break; + } bfuncs->getBaculaValue(ctx, bVarFDName, (void *)&name); printf("FD Name=%s\n", name); + bfuncs->JobMessage(ctx, __FILE__, __LINE__, 1, 0, "JobMesssage message"); + bfuncs->DebugMessage(ctx, __FILE__, __LINE__, 1, "DebugMesssage message"); return 0; } diff --git a/bacula/src/plugins/fd/main.c b/bacula/src/plugins/fd/main.c index 98c8ef7898..9c6710be6c 100644 --- a/bacula/src/plugins/fd/main.c +++ b/bacula/src/plugins/fd/main.c @@ -32,7 +32,6 @@ * Kern Sibbald, October 2007 */ #include "bacula.h" -#include #include "lib/plugin.h" #include "plugin-fd.h" diff --git a/bacula/src/plugins/fd/plugin-fd.h b/bacula/src/plugins/fd/plugin-fd.h index 21167c2eb3..80aea4ab78 100644 --- a/bacula/src/plugins/fd/plugin-fd.h +++ b/bacula/src/plugins/fd/plugin-fd.h @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2007 Free Software Foundation Europe e.V. + Copyright (C) 2007-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.