Next: Building Bacula Plugins Up: Bacula FD Plugin API Previous: Plugin Entry Points Contents Index
Subsections

- bRC registerBaculaEvents(bpContext *ctx, ...)
- bRC getBaculaValue(bpContext *ctx, bVariable var, void *value)
- bRC setBaculaValue(bpContext *ctx, bVariable var, void *value)
- bRC JobMessage(bpContext *ctx, const char *file, int line, int type, utime_t mtime, const char *fmt, ...)
- bRC DebugMessage(bpContext *ctx, const char *file, int line, int level, const char *fmt, ...)
- void baculaMalloc(bpContext *ctx, const char *file, int line, size_t size)
- void baculaFree(bpContext *ctx, const char *file, int line, void *mem)

# Bacula Plugin Entrypoints

When Bacula calls one of your plugin entrypoints, you can call back to the entrypoints in Bacula that were supplied during the xxx plugin call to get or set information within Bacula.

## bRC registerBaculaEvents(bpContext *ctx, ...)

This Bacula entrypoint will allow you to register to receive events that are not autmatically passed to your plugin by default. This entrypoint currently is unimplemented.

## bRC getBaculaValue(bpContext *ctx, bVariable var, void *value)

Calling this entrypoint, you can obtain specific values that are available in Bacula. The following Variables can be referenced:

- bVarJobId returns an int
- bVarFDName returns a char *
- bVarLevel returns an int
- bVarClient returns a char *
- bVarJobName returns a char *
- bVarJobStatus returns an int
- bVarSinceTime returns an int (time_t)
- bVarAccurate returns an int

## bRC setBaculaValue(bpContext *ctx, bVariable var, void *value)

Calling this entrypoint allows you to set particular values in Bacula. The only variable that can currently be set is bVarFileSeen and the value passed is a char * that points to the full filename for a file that you are indicating has been seen and hence is not deleted.

## bRC JobMessage(bpContext *ctx, const char *file, int line, int type, utime_t mtime, const char *fmt, ...)

This call permits you to put a message in the Job Report.

## bRC DebugMessage(bpContext *ctx, const char *file, int line, int level, const char *fmt, ...)

This call permits you to print a debug message.

## void baculaMalloc(bpContext *ctx, const char *file, int line, size_t size)

This call permits you to obtain memory from Bacula's memory allocator.

## void baculaFree(bpContext *ctx, const char *file, int line, void *mem)

This call permits you to free memory obtained from Bacula's memory allocator.

Next: Building Bacula Plugins Up: Bacula FD Plugin API Previous: Plugin Entry Points Contents Index