X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Ffiled%2Ffd_plugins.h;h=8ff6b44ff05c75136a0f6eb7d1ef2ec37b751277;hb=5b5283a52a4419158a698a6d7b01f30da6addc9f;hp=f64ba1b17a29bd1e739f99ee9dd88d259e22f4de;hpb=35a0c7aa57e4cb6b544edc3e02730a06c8d27be9;p=bacula%2Fbacula diff --git a/bacula/src/filed/fd_plugins.h b/bacula/src/filed/fd_plugins.h index f64ba1b17a..8ff6b44ff0 100644 --- a/bacula/src/filed/fd_plugins.h +++ b/bacula/src/filed/fd_plugins.h @@ -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. @@ -70,6 +70,25 @@ #include "../win32/filed/vss.h" #endif +/* + * This packet is used for the restore objects + * It is passed to the plugin when restoring + * the object. + */ +struct restore_object_pkt { + int32_t pkt_size; /* size of this packet */ + char *object_name; /* Object name */ + 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 */ +}; + /* * This packet is used for file save info transfer. */ @@ -82,6 +101,10 @@ struct save_pkt { uint32_t flags; /* Bacula internal flags */ bool portable; /* set if data format is portable */ char *cmd; /* command */ + char *object_name; /* Object name to create */ + char *object; /* restore object data to save */ + int32_t object_len; /* restore object length */ + int32_t index; /* restore object index */ int32_t pkt_end; /* end packet sentinel */ }; @@ -150,24 +173,32 @@ typedef enum { bVarSinceTime = 8, bVarAccurate = 9, bVarFileSeen = 10, - bVarVssObject = 11 + bVarVssObject = 11, + bVarVssDllHandle = 12, + bVarWorkingDir = 13 } bVariable; /* Events that are passed to plugin */ typedef enum { - bEventJobStart = 1, - bEventJobEnd = 2, - bEventStartBackupJob = 3, - bEventEndBackupJob = 4, - bEventStartRestoreJob = 5, - bEventEndRestoreJob = 6, - bEventStartVerifyJob = 7, - bEventEndVerifyJob = 8, - bEventBackupCommand = 9, - bEventRestoreCommand = 10, - bEventLevel = 11, - bEventSince = 12, - bEventCancelCommand = 13 + bEventJobStart = 1, + bEventJobEnd = 2, + bEventStartBackupJob = 3, + bEventEndBackupJob = 4, + bEventStartRestoreJob = 5, + bEventEndRestoreJob = 6, + bEventStartVerifyJob = 7, + bEventEndVerifyJob = 8, + bEventBackupCommand = 9, + bEventRestoreCommand = 10, + bEventLevel = 11, + bEventSince = 12, + bEventCancelCommand = 13, /* Executed by an other thread */ + bEventVssBackupAddComponents = 14, + bEventVssRestoreLoadComponentMetadata = 15, + bEventVssRestoreSetComponentsSelected = 16, + bEventRestoreObject = 17, + bEventEndFileSet = 18, + bEventPluginCommand = 19 /* Sent during FileSet creation */ } bEventType; typedef struct s_bEvent { @@ -217,6 +248,12 @@ 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 (*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); } bFuncs;