]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/plugins.h
kes Correctly detect Ubuntu systems, and add ubuntu platform directory.
[bacula/bacula] / bacula / src / lib / plugins.h
index 032083230981b55941fc0e0a76994c9a30d54bf2..990f5985aeb58ef842d6957b9099d3efac66fbca 100644 (file)
@@ -57,8 +57,13 @@ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
 
 extern DLL_IMP_EXP alist *plugin_list;
 
-/* Universal return code from all functions */
-typedef int32_t bpError;
+/* Universal return codes from all functions */
+typedef enum {
+  bRC_OK    = 0,                         /* OK */
+  bRC_Stop  = 1,                         /* Stop calling other plugins */
+  bRC_Error = 2,                         /* Some kind of error */
+  bRC_More  = 3,                         /* More files to backup */
+} bRC;
 
 /* Context packet as first argument of all functions */
 typedef struct s_bpContext {
@@ -67,8 +72,8 @@ typedef struct s_bpContext {
 } bpContext;
 
 extern "C" {
-typedef bpError (*t_loadPlugin)(void *binfo, void *bfuncs, void **pinfo, void **pfuncs);
-typedef bpError (*t_unloadPlugin)(void);
+typedef bRC (*t_loadPlugin)(void *binfo, void *bfuncs, void **pinfo, void **pfuncs);
+typedef bRC (*t_unloadPlugin)(void);
 }
 
 class Plugin {