src/plugins/sd/example-plugin-sd.c
static bRC handlePluginEvent(bpContext *ctx, bsdEvent *event, void *value)
{
   char *name;
   switch (event->eventType) {
   case bsdEventJobStart:
      printf("example-plugin-sd: HandleEvent JobStart :%s:\n", (char *)value);
      break;
   case bsdEventJobEnd:
      printf("example-plugin-sd: HandleEvent JobEnd\n");
      break;
   }
   bfuncs->getBaculaValue(ctx, bsdVarJobName, (void *)&name);
   printf("Job Name=%s\n", name);
   bfuncs->JobMessage(ctx, __FILE__, __LINE__, 1, 0, "JobMesssage message");
   bfuncs->DebugMessage(ctx, __FILE__, __LINE__, 1, "DebugMesssage message");
   return bRC_OK;
}
/*
 * Handle an event that was generated in Bacula
 */
Handle an event that was generated in Bacula
Handle an event that was generated in Bacula
static bRC handlePluginEvent(bpContext *ctx, bsdEvent *event, void *value)
{
   char *name;
   switch (event->eventType) {
   case bsdEventJobStart:
      printf("example-plugin-sd: HandleEvent JobStart :%s:\n", (char *)value);
      break;
   case bsdEventJobEnd:
      printf("example-plugin-sd: HandleEvent JobEnd\n");
      break;
   }
   bfuncs->getBaculaValue(ctx, bsdVarJobName, (void *)&name);
   printf("Job Name=%s\n", name);
   bfuncs->JobMessage(ctx, __FILE__, __LINE__, 1, 0, "JobMesssage message");
   bfuncs->DebugMessage(ctx, __FILE__, __LINE__, 1, "DebugMesssage message");
   return bRC_OK;
}
static bRC handlePluginEvent ( bpContext * ctx , bsdEvent * event , void * value ) { char * name ; switch ( event -> eventType ) { case bsdEventJobStart : printf ( " \n " , ( char * ) value ) ; break ; case bsdEventJobEnd : printf ( " \n " ) ; break ; } bfuncs -> getBaculaValue ( ctx , bsdVarJobName , ( void * ) & name ) ; printf ( " \n " , name ) ; bfuncs -> JobMessage ( ctx , __FILE__ , __LINE__ , 1 , 0 , " " ) ; bfuncs -> DebugMessage ( ctx , __FILE__ , __LINE__ , 1 , " " ) ; return bRC_OK ; }
Handle an event that was generated in Bacula
Handle an event that was generated in Bacula