]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/findlib/protos.h
Restore win32 dir from Branch-5.2 and update it
[bacula/bacula] / bacula / src / findlib / protos.h
index 0d17d1342ed7b0733ba746f96e9a5728b623859c..90eb6da75aad7878f15d0193fe16612c217d5a88 100644 (file)
@@ -1,79 +1,91 @@
 /*
- * Prototypes for finlib directory of Bacula
- *
- *   Version $Id$
- */
-/*
-   Copyright (C) 2000-2003 Kern Sibbald and John Walker
+   Bacula(R) - The Network Backup Solution
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   Copyright (C) 2000-2017 Kern Sibbald
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
 
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   You may use this file and others of this release according to the
+   license defined in the LICENSE file, which includes the Affero General
+   Public License, v3.0 ("AGPLv3") and some additional permissions and
+   terms pursuant to its AGPLv3 Section 7.
 
+   This notice must be preserved when any source code is 
+   conveyed and/or propagated.
+
+   Bacula(R) is a registered trademark of Kern Sibbald.
+*/
+/*
+ * Prototypes for finlib directory of Bacula
+ *
  */
 
 /* from attribs.c */
-void     encode_stat            (char *buf, struct stat *statp, uint32_t LinkFI);
-void     decode_stat            (char *buf, struct stat *statp, uint32_t *LinkFI);
-int      encode_attribsEx       (void *jcr, char *attribsEx, FF_PKT *ff_pkt);
-int set_attributes(void *jcr, char *fname, char *ofile, char *lname,
-                  int type, int stream, struct stat *statp, 
-                  char *attribsEx, BFILE *ofd);
+bool check_directory_acl(char **last_dir, alist *dir_acl, const char *path);
+
+void    encode_stat       (char *buf, struct stat *statp, int stat_size, int32_t LinkFI, int data_stream);
+int     decode_stat       (char *buf, struct stat *statp, int stat_size, int32_t *LinkFI);
+int32_t decode_LinkFI     (char *buf, struct stat *statp, int stat_size);
+int     encode_attribsEx  (JCR *jcr, char *attribsEx, FF_PKT *ff_pkt);
+bool    set_attributes    (JCR *jcr, ATTR *attr, BFILE *ofd);
+int     select_data_stream(FF_PKT *ff_pkt);
 
 /* from create_file.c */
-int create_file(void *jcr, char *fname, char *ofile, char *lname,
-               int type, int stream, struct stat *statp, 
-               char *attribsEx, BFILE *ofd, int replace, int win_io);
+int    create_file       (JCR *jcr, ATTR *attr, BFILE *ofd, int replace);
 
 /* From find.c */
 FF_PKT *init_find_files();
-void set_find_options(FF_PKT *ff, int incremental, time_t mtime);
-int find_files(JCR *jcr, FF_PKT *ff, int sub(FF_PKT *ff_pkt, void *hpkt), void *pkt);
-int term_find_files(FF_PKT *ff);
+void set_find_snapshot_function(FF_PKT *ff, 
+                                bool convert_path(JCR *jcr, FF_PKT *ff, dlist *filelist, dlistString *node));
+void  set_find_options(FF_PKT *ff, int incremental, time_t mtime);
+void set_find_changed_function(FF_PKT *ff, bool check_fct(JCR *jcr, FF_PKT *ff));
+int   find_files(JCR *jcr, FF_PKT *ff, int file_sub(JCR *, FF_PKT *ff_pkt, bool),
+                 int plugin_sub(JCR *, FF_PKT *ff_pkt, bool));
+int   match_files(JCR *jcr, FF_PKT *ff, int sub(JCR *, FF_PKT *ff_pkt, bool));
+int   term_find_files(FF_PKT *ff);
+bool  is_in_fileset(FF_PKT *ff);
+bool accept_file(FF_PKT *ff);
 
 /* From match.c */
-void init_include_exclude_files(FF_PKT *ff);
-void term_include_exclude_files(FF_PKT *ff);
-void add_fname_to_include_list(FF_PKT *ff, int prefixed, char *fname);
-void add_fname_to_exclude_list(FF_PKT *ff, char *fname);
-int file_is_excluded(FF_PKT *ff, char *file);
-int file_is_included(FF_PKT *ff, char *file);
-struct s_included_file *get_next_included_file(FF_PKT *ff, 
-                          struct s_included_file *inc);
+void  init_include_exclude_files(FF_PKT *ff);
+void  term_include_exclude_files(FF_PKT *ff);
+void  add_fname_to_include_list(FF_PKT *ff, int prefixed, const char *fname);
+void  add_fname_to_exclude_list(FF_PKT *ff, const char *fname);
+int   file_is_excluded(FF_PKT *ff, const char *file);
+int   file_is_included(FF_PKT *ff, const char *file);
+struct s_included_file *get_next_included_file(FF_PKT *ff,
+                           struct s_included_file *inc);
 
 /* From find_one.c */
-int find_one_file(JCR *jcr, FF_PKT *ff, int handle_file(FF_PKT *ff_pkt, void *hpkt), 
-              void *pkt, char *p, dev_t parent_device, int top_level);
-int term_find_one(FF_PKT *ff);
-
+int   find_one_file(JCR *jcr, FF_PKT *ff,
+               int handle_file(JCR *jcr, FF_PKT *ff_pkt, bool top_level),
+               char *p, dev_t parent_device, bool top_level);
+int   term_find_one(FF_PKT *ff);
+bool  has_file_changed(JCR *jcr, FF_PKT *ff_pkt);
+bool check_changes(JCR *jcr, FF_PKT *ff_pkt);
+void ff_pkt_set_link_digest(FF_PKT *ff_pkt,
+                            int32_t digest_stream, const char *digest, uint32_t len);
 
 /* From get_priv.c */
-void get_backup_privileges(void *jcr, int ignore_errors);
+int enable_backup_privileges(JCR *jcr, int ignore_errors);
 
 
 /* from makepath.c */
-int make_path(void *jcr, const char *argpath, int mode,
-          int parent_mode, uid_t owner, gid_t group,
-          int preserve_existing, char *verbose_fmt_string);
-
-/* from file_io.c */
-ssize_t  bread(BFILE *bfd, void *buf, size_t count);
-int     bopen(BFILE *bfd, const char *fname, int flags, mode_t mode);
-int     bclose(BFILE *bfd);
-ssize_t  bread(BFILE *bfd, void *buf, size_t count);
-ssize_t  bwrite(BFILE *bfd, void *buf, size_t count);
-off_t   blseek(BFILE *bfd, off_t offset, int whence);
-int     is_bopen(BFILE *bfd);
-void    binit(BFILE *bfd, int use_win_api);
-char   *berror(BFILE *bfd);
+bool makepath(ATTR *attr, const char *path, mode_t mode,
+           mode_t parent_mode, uid_t owner, gid_t group,
+           int keep_dir_modes);
+void free_path_list(JCR *jcr);
+bool path_list_lookup(JCR *jcr, char *fname);
+bool path_list_add(JCR *jcr, uint32_t len, char *fname);
+
+
+/* from fstype.c */
+bool fstype(FF_PKT *ff_pkt, char *fs, int fslen);
+bool fstype_equals(const char *fname, const char *fstype_name);
+
+/* from drivetype.c */
+bool drivetype(const char *fname, char *fs, int fslen);
+
+/* from bfile.c -- see bfile.h */
+/* from namedpipe.c -- see namedpipe.h */