]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/protos.h
Additional message plus exclusion fix
[bacula/bacula] / bacula / src / stored / protos.h
index efb5a559cb498c3a594cbd627201b5c40d696a1a..6f0b4db6ff706138c63f6e916c017c5540f4e106 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2003 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
 uint32_t new_VolSessionId();
 
 /* From acquire.c */
-int      acquire_device_for_append(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+DEVICE  *acquire_device_for_append(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
 int      acquire_device_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
-int      ready_dev_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
-int      release_device(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+int      release_device(JCR *jcr, DEVICE *dev);
 
 /* From askdir.c */
-int     dir_get_volume_info(JCR *jcr);
+int     dir_get_volume_info(JCR *jcr, int writing);
 int     dir_find_next_appendable_volume(JCR *jcr);
 int     dir_update_volume_info(JCR *jcr, VOLUME_CAT_INFO *vol, int relabel);
 int     dir_ask_sysop_to_mount_next_volume(JCR *jcr, DEVICE *dev);
@@ -54,13 +53,20 @@ void    init_block_write(DEV_BLOCK *block);
 void    empty_block(DEV_BLOCK *block);
 void    free_block(DEV_BLOCK *block);
 int     write_block_to_device(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
-int     write_block_to_dev(DEVICE *dev, DEV_BLOCK *block);
+int     write_block_to_dev(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
 int     read_block_from_device(DEVICE *dev, DEV_BLOCK *block);
 int     read_block_from_dev(DEVICE *dev, DEV_BLOCK *block);
 
+/* From butil.c -- utilities for SD tool programs */
+void    print_ls_output(char *fname, char *link, int type, struct stat *statp);
+JCR    *setup_jcr(char *name, char *device, BSR *bsr); 
+DEVICE *setup_to_access_device(JCR *jcr, int read_access);
+void    display_error_status(DEVICE *dev);
+DEVRES *find_device_res(char *device_name, int read_access);
+
 
 /* From dev.c */
-DEVICE  *init_dev(DEVICE *dev, char *device);
+DEVICE  *init_dev(DEVICE *dev, DEVRES *device);
 int      open_dev(DEVICE *dev, char *VolName, int mode);
 void     close_dev(DEVICE *dev);
 void     force_close_dev(DEVICE *dev);
@@ -130,6 +136,7 @@ void     handle_filed_connection(BSOCK *fd, char *job_name);
 /* From label.c */
 int      read_dev_volume_label(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
 void     create_session_label(JCR *jcr, DEV_RECORD *rec, int label);
+void     create_volume_label(DEVICE *dev, char *VolName);
 int      write_volume_label_to_dev(JCR *jcr, DEVRES *device, char *VolName, char *PoolName);
 int      write_session_label(JCR *jcr, DEV_BLOCK *block, int label);
 int      write_volume_label_to_block(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
@@ -145,6 +152,7 @@ int match_bsr(BSR *bsr, DEV_RECORD *rec, VOLUME_LABEL *volrec,
 /* From mount.c */
 int      mount_next_write_volume(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, int release);
 int      mount_next_read_volume(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+int      autoload_device(JCR *jcr, DEVICE *dev, int writing, BSOCK *dir);
 
 
 /* From parse_bsr.c */
@@ -158,9 +166,14 @@ extern void create_vol_list(JCR *jcr);
 
 /* From record.c */
 char   *FI_to_ascii(int fi);
-char   *stream_to_ascii(int stream);
+char   *stream_to_ascii(int stream, int fi);
 int     write_record_to_block(DEV_BLOCK *block, DEV_RECORD *rec);
 int     can_write_record_to_block(DEV_BLOCK *block, DEV_RECORD *rec);
 int     read_record_from_block(DEV_BLOCK *block, DEV_RECORD *rec); 
 DEV_RECORD *new_record();
 void    free_record(DEV_RECORD *rec);
+
+/* From read_record.c */
+int read_records(JCR *jcr,  DEVICE *dev, 
+       void record_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec),
+       int mount_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block));