]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/win_tape_dev.h
Restore win32 dir from Branch-5.2 and update it
[bacula/bacula] / bacula / src / stored / win_tape_dev.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2018 Kern Sibbald
5
6    The original author of Bacula is Kern Sibbald, with contributions
7    from many others, a complete list can be found in the file AUTHORS.
8
9    You may use this file and others of this release according to the
10    license defined in the LICENSE file, which includes the Affero General
11    Public License, v3.0 ("AGPLv3") and some additional permissions and
12    terms pursuant to its AGPLv3 Section 7.
13
14    This notice must be preserved when any source code is
15    conveyed and/or propagated.
16
17    Bacula(R) is a registered trademark of Kern Sibbald.
18 */
19 /*
20  * Inspired by vtape.h
21  */
22 #ifndef __WIN_TAPE_DEV_H_
23 #define __WIN_TAPE_DEV_H_
24
25 class win_tape_dev : public DEVICE {
26 public:
27
28    win_tape_dev() { };
29    ~win_tape_dev() { };
30
31    /* interface from DEVICE */
32    int d_close(int);
33    int d_open(const char *pathname, int flags);
34    int d_ioctl(int fd, ioctl_req_t request, char *op=NULL);
35    ssize_t d_read(int, void *buffer, size_t count);
36    ssize_t d_write(int, const void *buffer, size_t count);
37
38    boffset_t lseek(DCR *dcr, off_t offset, int whence) { return -1; };
39    boffset_t lseek(int fd, off_t offset, int whence);
40    bool open_device(DCR *dcr, int omode);
41
42    int tape_op(struct mtop *mt_com);
43    int tape_get(struct mtget *mt_com);
44    int tape_pos(struct mtpos *mt_com);
45
46 };
47
48 #endif /* __WIN_TAPE_DEV_H_ */