]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/dir_plugins.h
ebl Add writable variable to director plugin interface
[bacula/bacula] / bacula / src / dird / dir_plugins.h
index 68362429adceb8d022c61985e8451e0025011777..5d5a4df516fc3d38c0d6646685bcd4da984c2399 100644 (file)
@@ -69,42 +69,48 @@ extern "C" {
  *                                                                          *
  ****************************************************************************/
 
-/* Bacula Variable Ids */
+/* Bacula Variable Ids */       /* return value */
 typedef enum {
-  bVarJob       = 1,
-  bVarLevel     = 2,
-  bVarType      = 3,
-  bVarJobId     = 4,
-  bVarClient    = 5,
-  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
+  bVarJob       = 1,            // string
+  bVarLevel     = 2,            // int   
+  bVarType      = 3,            // int   
+  bVarJobId     = 4,            // int   
+  bVarClient    = 5,            // string
+  bVarNumVols   = 6,            // int   
+  bVarPool      = 7,            // string
+  bVarStorage   = 8,            // string
+  bVarWriteStorage = 9,         // string
+  bVarReadStorage  = 10,        // string
+  bVarCatalog   = 11,           // string
+  bVarMediaType = 12,           // string
+  bVarJobName   = 13,           // string
+  bVarJobStatus = 14,           // int   
+  bVarPriority  = 15,           // int   
+  bVarVolumeName = 16,          // string
+  bVarCatalogRes = 17,          // NYI      
+  bVarJobErrors  = 18,          // int   
+  bVarJobFiles   = 19,          // int   
+  bVarSDJobFiles = 20,          // int   
+  bVarSDErrors   = 21,          // int   
+  bVarFDJobStatus = 22,         // int   
+  bVarSDJobStatus = 23          // int   
 } brVariable;
 
 typedef enum {
   bwVarJobReport  = 1,
   bwVarVolumeName = 2,
   bwVarPriority   = 3,
-  bwVarJobLevel   = 4,
+  bwVarJobLevel   = 4
 } bwVariable;
 
 
 typedef enum {
   bEventJobStart      = 1,
   bEventJobEnd        = 2,
+  bEventJobInit       = 3,
+  bEventJobRun        = 4,
+  bEventVolumePurged  = 5,
+  bEventNewVolume     = 6
 } bEventType;
 
 typedef struct s_bEvent {
@@ -129,12 +135,13 @@ typedef struct s_baculaFuncs {
        int level, const char *msg);
 } bFuncs;
 
-/* Bacula Subroutines */
+/* Bacula Core Routines -- not used within a plugin */
+#ifdef DIRECTOR_DAEMON
 void load_dir_plugins(const char *plugin_dir);
 void new_plugins(JCR *jcr);
 void free_plugins(JCR *jcr);
 void generate_plugin_event(JCR *jcr, bEventType event, void *value=NULL);
-
+#endif
 
 
 /****************************************************************************
@@ -155,12 +162,12 @@ typedef enum {
 typedef struct s_pluginInfo {
    uint32_t size;
    uint32_t version;
-   char *plugin_magic;
-   char *plugin_license;
-   char *plugin_author;
-   char *plugin_date;
-   char *plugin_version;
-   char *plugin_description;
+   const char *plugin_magic;
+   const char *plugin_license;
+   const char *plugin_author;
+   const char *plugin_date;
+   const char *plugin_version;
+   const char *plugin_description;
 } pInfo;
 
 typedef struct s_pluginFuncs {