]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/protos.h
Apply SunOS patch for ACLs submitted by David Duchscher.
[bacula/bacula] / bacula / src / stored / protos.h
index 6fee3a0e8aa1edd0675af68a0092d05742275366..2dc535451e2a7044be36f8b237d17af8d2a1d9de 100644 (file)
@@ -3,24 +3,18 @@
  *
  *   Version $Id$
  */
-
 /*
    Copyright (C) 2000-2005 Kern Sibbald
 
    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.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    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.
-
-   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.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
@@ -28,9 +22,7 @@
 uint32_t new_VolSessionId();
 
 /* From acquire.c */
-bool     reserve_device_for_append(DCR *dcr);
 DCR     *acquire_device_for_append(DCR *dcr);
-bool     reserve_device_for_read(DCR *dcr);
 DCR     *acquire_device_for_read(DCR *dcr);
 bool     release_device(DCR *dcr);
 DCR     *new_dcr(JCR *jcr, DEVICE *dev);
@@ -57,10 +49,12 @@ int     authenticate_director(JCR *jcr);
 int     authenticate_filed(JCR *jcr);
 
 /* From autochanger.c */
+bool     init_autochangers();
 int      autoload_device(DCR *dcr, int writing, BSOCK *dir);
 bool     autochanger_cmd(DCR *dcr, BSOCK *dir, const char *cmd);
-void     mark_volume_not_inchanger(DCR *dcr);
-char    *edit_device_codes(DCR *dcr, char *omsg, const char *cmd);
+bool     unload_autochanger(DCR *dcr, int loaded);
+char    *edit_device_codes(DCR *dcr, char *omsg, const char *imsg, const char *cmd);
+int      get_autochanger_loaded_slot(DCR *dcr);
 
 /* From block.c */
 void    dump_block(DEV_BLOCK *b, const char *msg);
@@ -87,15 +81,10 @@ void    display_tape_error_status(JCR *jcr, DEVICE *dev);
 
 
 /* From dev.c */
-DEVICE  *init_dev(JCR *jcr, DEVICE *dev, DEVRES *device);
-int      open_dev(DEVICE *dev, char *VolName, int mode);
+DEVICE  *init_dev(JCR *jcr, DEVRES *device);
 off_t    lseek_dev(DEVICE *dev, off_t offset, int whence);
-int      open_first_part(DEVICE *dev);
-int      open_next_part(DEVICE *dev);
-int      open_guess_name_dev(DEVICE *dev);
-void     close_dev(DEVICE *dev);
-void     force_close_dev(DEVICE *dev);
-bool     truncate_dev(DEVICE *dev);
+bool     can_open_mounted_dev(DEVICE *dev);
+bool     truncate_dev(DCR *dcr);
 void     term_dev(DEVICE *dev);
 char *   strerror_dev(DEVICE *dev);
 void     clrerror_dev(DEVICE *dev, int func);
@@ -117,6 +106,7 @@ JCR     *next_attached_jcr(DEVICE *dev, JCR *jcr);
 bool     offline_or_rewind_dev(DEVICE *dev);
 bool     reposition_dev(DEVICE *dev, uint32_t file, uint32_t block);
 void     init_device_wait_timers(DCR *dcr);
+void     init_jcr_device_wait_timers(JCR *jcr);
 bool     double_dev_wait_time(DEVICE *dev);
 
 /* Get info about device */
@@ -125,12 +115,22 @@ uint32_t dev_block(DEVICE *dev);
 uint32_t dev_file(DEVICE *dev);
 
 /* From dvd.c */
+int  dvd_open_next_part(DCR *dcr);
+bool dvd_write_part(DCR *dcr); 
 bool dvd_close_job(DCR *dcr);
-
+bool mount_dev(DEVICE* dev, int timeout);
+bool unmount_dev(DEVICE* dev, int timeout);
+void update_free_space_dev(DEVICE *dev);
+void make_mounted_dvd_filename(DEVICE *dev, POOL_MEM &archive_name);
+void make_spooled_dvd_filename(DEVICE *dev, POOL_MEM &archive_name);
+bool truncate_dvd_dev(DCR *dcr);
+bool check_can_write_on_non_blank_dvd(DCR *dcr);
 
 /* From device.c */
 bool     open_device(DCR *dcr);
-bool     first_open_device(DEVICE *dev);
+void     close_device(DEVICE *dev);
+void     force_close_device(DEVICE *dev);
+bool     first_open_device(DCR *dcr);
 bool     fixup_device_block_write_error(DCR *dcr);
 void     _lock_device(const char *file, int line, DEVICE *dev);
 void     _unlock_device(const char *file, int line, DEVICE *dev);
@@ -140,10 +140,9 @@ void     _steal_device_lock(const char *file, int line, DEVICE *dev, bsteal_lock
 void     _give_back_device_lock(const char *file, int line, DEVICE *dev, bsteal_lock_t *hold);
 void     set_new_volume_parameters(DCR *dcr);
 void     set_new_file_parameters(DCR *dcr);
-bool     device_is_unmounted(DEVICE *dev);
+bool     is_device_unmounted(DEVICE *dev);
 void     dev_lock(DEVICE *dev);
 void     dev_unlock(DEVICE *dev);
-const char *edit_blocked_reason(DEVICE *dev);
 
 /* From dircmd.c */
 void     *handle_connection_request(void *arg);
@@ -160,7 +159,7 @@ void     handle_filed_connection(BSOCK *fd, char *job_name);
 
 /* From label.c */
 int      read_dev_volume_label(DCR *dcr);
-int      read_dev_volume_label_guess(DCR *dcr, bool write);
+int      read_dvd_volume_label(DCR *dcr, bool write);
 void     create_session_label(DCR *dcr, DEV_RECORD *rec, int label);
 void     create_volume_label(DEVICE *dev, const char *VolName, const char *PoolName);
 bool     write_new_volume_label_to_dev(DCR *dcr, const char *VolName, const char *PoolName);
@@ -188,21 +187,20 @@ bool     match_set_eof(BSR *bsr, DEV_RECORD *rec);
 /* From mount.c */
 bool     mount_next_write_volume(DCR *dcr, bool release);
 bool     mount_next_read_volume(DCR *dcr);
-void     release_volume(DCR *ddr);
 void     mark_volume_in_error(DCR *dcr);
 
 /* From parse_bsr.c */
 BSR     *parse_bsr(JCR *jcr, char *lf);
 void     dump_bsr(BSR *bsr, bool recurse);
 void     free_bsr(BSR *bsr);
-VOL_LIST *new_vol();
-int      add_vol(JCR *jcr, VOL_LIST *vol);
-void     free_vol_list(JCR *jcr);
-void     create_vol_list(JCR *jcr);
+VOL_LIST *new_restore_volume();
+int      add_restore_volume(JCR *jcr, VOL_LIST *vol);
+void     free_restore_volume_list(JCR *jcr);
+void     create_restore_volume_list(JCR *jcr);
 
 /* From record.c */
-const char *FI_to_ascii(int fi);
-const char *stream_to_ascii(int stream, int fi);
+const char *FI_to_ascii(char *buf, int fi);
+const char *stream_to_ascii(char *buf, int stream, int fi);
 bool        write_record_to_block(DEV_BLOCK *block, DEV_RECORD *rec);
 bool        can_write_record_to_block(DEV_BLOCK *block, DEV_RECORD *rec);
 bool        read_record_from_block(DEV_BLOCK *block, DEV_RECORD *rec);
@@ -215,6 +213,18 @@ bool read_records(DCR *dcr,
        bool record_cb(DCR *dcr, DEV_RECORD *rec),
        bool mount_cb(DCR *dcr));
 
+/* From reserve.c */
+void    release_volume(DCR *dcr);
+VOLRES *new_volume(DCR *dcr, const char *VolumeName);
+VOLRES *find_volume(const char *VolumeName);
+bool    free_volume(DEVICE *dev);
+void    free_unused_volume(DCR *dcr);
+void    create_volume_list();
+void    free_volume_list();
+void    list_volumes(BSOCK *user);
+bool    is_volume_in_use(DCR *dcr);
+
+
 /* From spool.c */
 bool    begin_data_spool          (DCR *dcr);
 bool    discard_data_spool        (DCR *dcr);
@@ -228,4 +238,4 @@ void    list_spool_stats          (BSOCK *bs);
 
 /* From wait.c */
 int wait_for_sysop(DCR *dcr);
-bool wait_for_device(DCR *dcr, const char *msg, bool first);
+bool wait_for_device(JCR *jcr, bool first);