]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/protos.h
- Apply Mike Acar's suggestion when looking for the next volume
[bacula/bacula] / bacula / src / stored / protos.h
index fa45a7354faa88c0892ce8a69fb3626f6501d501..6898968a29311199d8f2627c68c9e2d6e6c16dc3 100644 (file)
@@ -39,14 +39,14 @@ enum get_vol_info_rw {
    GET_VOL_INFO_FOR_WRITE,
    GET_VOL_INFO_FOR_READ
 };
-bool    dir_get_volume_info(JCR *jcr, enum get_vol_info_rw);
-bool    dir_find_next_appendable_volume(JCR *jcr);
-bool    dir_update_volume_info(JCR *jcr, bool label);
-bool    dir_ask_sysop_to_create_appendable_volume(JCR *jcr);
-bool    dir_ask_sysop_to_mount_volume(JCR *jcr);
-bool    dir_update_file_attributes(JCR *jcr, DEV_RECORD *rec);
+bool    dir_get_volume_info(DCR *dcr, enum get_vol_info_rw);
+bool    dir_find_next_appendable_volume(DCR *dcr);
+bool    dir_update_volume_info(DCR *dcr, bool label);
+bool    dir_ask_sysop_to_create_appendable_volume(DCR *dcr);
+bool    dir_ask_sysop_to_mount_volume(DCR *dcr);
+bool    dir_update_file_attributes(DCR *dcr, DEV_RECORD *rec);
 bool    dir_send_job_status(JCR *jcr);
-bool    dir_create_jobmedia_record(JCR *jcr);
+bool    dir_create_jobmedia_record(DCR *dcr);
 
 /* authenticate.c */
 int     authenticate_director(JCR *jcr);
@@ -82,14 +82,14 @@ 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);
-int      truncate_dev(DEVICE *dev);
+bool     truncate_dev(DEVICE *dev);
 void     term_dev(DEVICE *dev);
 char *   strerror_dev(DEVICE *dev);
 void     clrerror_dev(DEVICE *dev, int func);
-int      update_pos_dev(DEVICE *dev);
+bool     update_pos_dev(DEVICE *dev);
 int      rewind_dev(DEVICE *dev);
-int      load_dev(DEVICE *dev);
-int      offline_dev(DEVICE *dev);
+bool     load_dev(DEVICE *dev);
+bool     offline_dev(DEVICE *dev);
 int      flush_dev(DEVICE *dev);
 int      weof_dev(DEVICE *dev, int num);
 int      write_block(DEVICE *dev);
@@ -97,16 +97,16 @@ int      write_dev(DEVICE *dev, char *buf, size_t len);
 int      read_dev(DEVICE *dev, char *buf, size_t len);
 uint32_t status_dev(DEVICE *dev);
 int      eod_dev(DEVICE *dev);
-int      fsf_dev(DEVICE *dev, int num);
-int      fsr_dev(DEVICE *dev, int num);
-int      bsf_dev(DEVICE *dev, int num);
-int      bsr_dev(DEVICE *dev, int num);
+bool     fsf_dev(DEVICE *dev, int num);
+bool     fsr_dev(DEVICE *dev, int num);
+bool     bsf_dev(DEVICE *dev, int num);
+bool     bsr_dev(DEVICE *dev, int num);
 void     attach_jcr_to_device(DEVICE *dev, JCR *jcr);
 void     detach_jcr_from_device(DEVICE *dev, JCR *jcr);
 JCR     *next_attached_jcr(DEVICE *dev, JCR *jcr);
-int      dev_can_write(DEVICE *dev);
+bool     dev_can_write(DEVICE *dev);
 int      offline_or_rewind_dev(DEVICE *dev);
-int      reposition_dev(DEVICE *dev, uint32_t file, uint32_t block);
+bool     reposition_dev(DEVICE *dev, uint32_t file, uint32_t block);
 void     init_dev_wait_timers(DEVICE *dev);
 bool     double_dev_wait_time(DEVICE *dev);
 
@@ -116,11 +116,11 @@ char *   dev_name(DEVICE *dev);
 char *   dev_vol_name(DEVICE *dev);
 uint32_t dev_block(DEVICE *dev);
 uint32_t dev_file(DEVICE *dev);
-int      dev_is_tape(DEVICE *dev);
+bool     dev_is_tape(DEVICE *dev);
 
 /* From device.c */
-int      open_device(JCR *jcr, DEVICE *dev);
-int      first_open_device(DEVICE *dev);
+bool     open_device(JCR *jcr, DEVICE *dev);
+bool     first_open_device(DEVICE *dev);
 bool     fixup_device_block_write_error(DCR *dcr, DEV_BLOCK *block);
 void     _lock_device(const char *file, int line, DEVICE *dev);
 void     _unlock_device(const char *file, int line, DEVICE *dev);
@@ -128,9 +128,12 @@ void     _block_device(const char *file, int line, DEVICE *dev, int state);
 void     _unblock_device(const char *file, int line, DEVICE *dev);
 void     _steal_device_lock(const char *file, int line, DEVICE *dev, bsteal_lock_t *hold, int state);
 void     _give_back_device_lock(const char *file, int line, DEVICE *dev, bsteal_lock_t *hold);
-void     set_new_volume_parameters(JCR *jcr, DEVICE *dev);
-void     set_new_file_parameters(JCR *jcr, DEVICE *dev); 
-int      device_is_unmounted(DEVICE *dev);
+void     set_new_volume_parameters(DCR *dcr);
+void     set_new_file_parameters(DCR *dcr);
+bool     device_is_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); 
@@ -171,9 +174,10 @@ void     release_volume(JCR *jcr, DEVICE *dev);
 void     mark_volume_in_error(JCR *jcr, DEVICE *dev);
 
 /* From autochanger.c */
-int      autoload_device(JCR *jcr, DEVICE *dev, int writing, BSOCK *dir);
-int      autochanger_list(JCR *jcr, DEVICE *dev, BSOCK *dir);
-void     invalidate_slot_in_catalog(JCR *jcr, DEVICE *dev);
+int      autoload_device(DCR *dcr, int writing, BSOCK *dir);
+bool     autochanger_list(DCR *dcr, BSOCK *dir);
+void     invalidate_slot_in_catalog(DCR *dcr);
+char    *edit_device_codes(JCR *jcr, char *omsg, const char *imsg, const char *cmd);
 
 
 /* From parse_bsr.c */