]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/fd_plugins.h
As it seems Linux doesn't comply to its own manpages.
[bacula/bacula] / bacula / src / filed / fd_plugins.h
index c17e3bc695238afcc7564063bf656c9b08239a22..f5c80678dd62dbbf060bbd54ae65490ea0e2922a 100644 (file)
@@ -6,7 +6,7 @@
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation, which is 
    listed in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -81,7 +81,9 @@ struct restore_object_pkt {
    char *object;                      /* restore object data to save */
    int32_t object_type;               /* FT_xx for this file */             
    int32_t object_len;                /* restore object length */
+   int32_t object_full_len;           /* restore object uncompressed length */
    int32_t object_index;              /* restore object index */
+   int32_t object_compression;        /* set to compression type */
    int32_t stream;                    /* attribute stream id */
    uint32_t JobId;                    /* JobId object came from */
    int32_t pkt_end;                   /* end packet sentinel */
@@ -99,6 +101,7 @@ struct save_pkt {
    uint32_t flags;                    /* Bacula internal flags */
    bool portable;                     /* set if data format is portable */
    char *cmd;                         /* command */
+   uint32_t delta_seq;                /* Delta sequence number */
    char *object_name;                 /* Object name to create */
    char *object;                      /* restore object data to save */
    int32_t object_len;                /* restore object length */
@@ -125,6 +128,7 @@ struct restore_pkt {
    const char *RegexWhere;            /* regex where */
    int replace;                       /* replace flag */
    int create_status;                 /* status from createFile() */
+   uint32_t delta_seq;                /* Delta sequence number */
    int32_t pkt_end;                   /* end packet sentinel */
 };
 
@@ -173,7 +177,13 @@ typedef enum {
   bVarFileSeen  = 10,
   bVarVssObject = 11,
   bVarVssDllHandle = 12,
-  bVarWorkingDir = 13
+  bVarWorkingDir = 13,
+  bVarWhere      = 14,
+  bVarRegexWhere = 15,
+  bVarExePath    = 16,
+  bVarVersion    = 17,
+  bVarDistName   = 18,
+  bVarBEEF       = 19
 } bVariable;
 
 /* Events that are passed to plugin */
@@ -190,12 +200,21 @@ typedef enum {
   bEventRestoreCommand                  = 10,
   bEventLevel                           = 11,
   bEventSince                           = 12,
-  bEventCancelCommand                   = 13,
-  bEventVssBackupAddComponents          = 14,
+  bEventCancelCommand                   = 13, /* Executed by another thread */
+  bEventVssBackupAddComponents          = 14, /* Just before bEventVssPrepareSnapshot */
   bEventVssRestoreLoadComponentMetadata = 15,
   bEventVssRestoreSetComponentsSelected = 16,
   bEventRestoreObject                   = 17,
-  bEventEndFileSet                      = 18
+  bEventEndFileSet                      = 18,
+  bEventPluginCommand                   = 19, /* Sent during FileSet creation */
+  bEventVssBeforeCloseRestore           = 20,
+
+  /* Add drives to VSS snapshot 
+   *  argument: char[27] drivelist
+   * You need to add them without duplicates, 
+   * see fd_common.h add_drive() copy_drives() to get help
+   */
+  bEventVssPrepareSnapshot              = 21
 } bEventType;
 
 typedef struct s_bEvent {
@@ -245,10 +264,13 @@ typedef struct s_baculaFuncs {
        size_t size);
    void (*baculaFree)(bpContext *ctx, const char *file, int line, void *mem);
    bRC (*AddExclude)(bpContext *ctx, const char *file);
-   bRC (*baculaAddInclude)(bpContext *ctx, const char *file);
-   bRC (*baculaAddIncludeOptions)(bpContext *ctx, const char *opts);
-   bRC (*baculaAddRegexToInclude)(bpContext *ctx, const char *item, int type);
-   bRC (*baculaAddWildToInclude)(bpContext *ctx, const char *item, int type);
+   bRC (*AddInclude)(bpContext *ctx, const char *file);
+   bRC (*AddOptions)(bpContext *ctx, const char *opts);
+   bRC (*AddRegex)(bpContext *ctx, const char *item, int type);
+   bRC (*AddWild)(bpContext *ctx, const char *item, int type);
+   bRC (*NewOptions)(bpContext *ctx);
+   bRC (*NewInclude)(bpContext *ctx);
+   bRC (*checkChanges)(bpContext *ctx, struct save_pkt *sp);
 } bFuncs;
 
 
@@ -267,7 +289,7 @@ typedef enum {
 
 
 #define FD_PLUGIN_MAGIC     "*FDPluginData*" 
-#define FD_PLUGIN_INTERFACE_VERSION  4
+#define FD_PLUGIN_INTERFACE_VERSION  5
 
 typedef struct s_pluginInfo {
    uint32_t size;