]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/tape_dev.h
Big backport from Enterprise
[bacula/bacula] / bacula / src / stored / tape_dev.h
index 557e340d25036465d3205de2b60dbb216d302b55..b6d9a74a78cf4d9c59af7a286a60dcc3e9405f21 100644 (file)
@@ -1,7 +1,7 @@
-/*                                                              [vssfs.c] IQ
+/*
    Bacula(R) - The Network Backup Solution
 
-   Copyright (C) 2000-2016 Kern Sibbald
+   Copyright (C) 2000-2017 Kern Sibbald
 
    The original author of Bacula is Kern Sibbald, with contributions
    from many others, a complete list can be found in the file AUTHORS.
@@ -11,7 +11,7 @@
    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 
+   This notice must be preserved when any source code is
    conveyed and/or propagated.
 
    Bacula(R) is a registered trademark of Kern Sibbald.
 #ifndef __TAPE_DEV_
 #define __TAPE_DEV_
 
+struct ALERT {
+   char *Volume;
+   utime_t alert_time;
+   char alerts[10];
+};
+
 class tape_dev : public DEVICE {
 public:
 
@@ -31,15 +37,35 @@ public:
 
    /* DEVICE virtual functions that we redefine with our tape code */
    bool fsf(int num);
-   bool offline();
+   bool offline(DCR *dcr);
    bool rewind(DCR *dcr);
    bool bsf(int num);
    void lock_door();
    void unlock_door();
-   bool reposition(DCR *dcr, uint32_t rfile, uint32_t rblock);
+   bool reposition(DCR *dcr, uint64_t raddr);
    bool mount(int timeout);
    bool unmount(int timeout);
    bool mount_tape(int mount, int dotimeout);
+   bool weof(DCR *dcr, int num);
+   bool eod(DCR *dcr);
+   bool is_eod_valid(DCR *dcr);
+   void set_ateof();
+   bool open_device(DCR *dcr, int omode);
+   void term(DCR *dcr);
+   const char *print_type();
+   DEVICE *get_dev(DCR *dcr);
+   uint32_t get_hi_addr();
+   uint32_t get_low_addr();
+   uint64_t get_full_addr();
+   bool end_of_volume(DCR *dcr);
+   char *print_addr(char *buf, int32_t buf_len);
+   char *print_addr(char *buf, int32_t maxlen, boffset_t addr);
+   bool get_tape_alerts(DCR *dcr);
+   void show_tape_alerts(DCR *dcr, alert_list_type type,
+      alert_list_which which, alert_cb alert_callback);
+   int delete_alerts();
+
+   alist *alert_list;
 };
 
 #endif /* __TAPE_DEV_ */