/*
- * Protypes for stored
+ * Protypes for stored -- Kern Sibbald MM
*
* Version $Id$
*/
/*
- Copyright (C) 2000-2006 Kern Sibbald
+ Bacula® - 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
- version 2 as amended with additional clauses defined in the
- file LICENSE in the main source directory.
+ Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
- 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
- the file LICENSE for additional details.
+ 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
+ License as published by the Free Software Foundation plus additions
+ that are listed in the file LICENSE.
- */
+ 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., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ Bacula® is a registered trademark of John Walker.
+ The licensor of Bacula is the Free Software Foundation Europe
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ Switzerland, email:ftf@fsfeurope.org.
+*/
/* From stored.c */
uint32_t new_VolSessionId();
bool release_device(DCR *dcr);
DCR *new_dcr(JCR *jcr, DEVICE *dev);
void free_dcr(DCR *dcr);
+void detach_dcr_from_dev(DCR *dcr);
/* From askdir.c */
enum get_vol_info_rw {
/* From dev.c */
DEVICE *init_dev(JCR *jcr, DEVRES *device);
-off_t lseek_dev(DEVICE *dev, off_t offset, int whence);
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);
-bool update_pos_dev(DEVICE *dev);
bool load_dev(DEVICE *dev);
-int flush_dev(DEVICE *dev);
int write_block(DEVICE *dev);
uint32_t status_dev(DEVICE *dev);
-bool eod_dev(DEVICE *dev);
-bool fsf_dev(DEVICE *dev, int num);
-bool bsf_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);
/* Get info about device */
char * dev_vol_name(DEVICE *dev);
-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_dvd(DEVICE* dev, int timeout);
-bool unmount_dvd(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(DCR *dcr);
-bool check_can_write_on_non_blank_dvd(DCR *dcr);
+int dvd_open_next_part(DCR *dcr);
+bool dvd_write_part(DCR *dcr);
+bool dvd_close_job(DCR *dcr);
+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(DCR *dcr);
+bool check_can_write_on_non_blank_dvd(DCR *dcr);
+int find_num_dvd_parts(DCR *dcr);
+boffset_t lseek_dvd(DCR *dcr, boffset_t offset, int whence);
+void dvd_remove_empty_part(DCR *dcr);
/* From device.c */
bool open_device(DCR *dcr);
void set_new_volume_parameters(DCR *dcr);
void set_new_file_parameters(DCR *dcr);
bool is_device_unmounted(DEVICE *dev);
-void dev_lock(DEVICE *dev);
-void dev_unlock(DEVICE *dev);
/* From dircmd.c */
void *handle_connection_request(void *arg);
/* From fd_cmds.c */
void run_job(JCR *jcr);
-bool get_bootstrap_file(JCR *jcr, BSOCK *bsock);
+bool get_bootstrap_file(JCR *jcr, BSOCK *bsock);
+void do_fd_commands(JCR *jcr);
/* From job.c */
void stored_free_jcr(JCR *jcr);
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 dvdnow);
-bool write_new_volume_label_to_dev(DCR *dcr, const char *VolName, const char *PoolName, bool dvdnow);
+bool write_new_volume_label_to_dev(DCR *dcr, const char *VolName,
+ const char *PoolName, bool relabel, bool dvdnow);
#define ANSI_VOL_LABEL 0
#define ANSI_EOF_LABEL 1
#define ANSI_EOV_LABEL 2
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);
+bool read_record_from_block(DCR *dcr, DEV_BLOCK *block, DEV_RECORD *rec);
DEV_RECORD *new_record();
void free_record(DEV_RECORD *rec);
void empty_record(DEV_RECORD *rec);