Imported Upstream version 2.5.0
[debian/amanda] / changer-src / libscsi.h
1 /*
2  *      $Id: libscsi.h,v 1.9 2000/06/25 18:48:11 ant Exp $
3  *
4  *      libscsi.h -- library header for routines to handle the changer
5  *                      support for chio based systems
6  *
7  *      Author: Eric Schnoebelen, eric@cirr.com
8  *      based on work by: Larry Pyeatt,  pyeatt@cs.colostate.edu 
9  *      Copyright: 1997, Eric Schnoebelen
10  *              
11  *      Michael C. Povel 03.06.98 added function eject_tape
12  */
13
14 #ifndef LIBSCSI_H
15 #define LIBSCSI_H
16
17 #include "amanda.h"
18
19 /*
20  * This function gets the actual cleaning state of the drive 
21  */
22 int get_clean_state P((char *tape));
23
24 /*
25  * This function gets the next empty slot from the changer
26  * (From this slot the tape is loaded ...)
27  */
28 int GetCurrentSlot P((int fd, int drive));
29
30 /*
31  * Eject the actual tape from the tapedrive
32  */
33 void eject_tape P((char *tape, int type));
34
35
36 /* 
37  * is the specified slot empty?
38  */
39 int isempty P((int fd, int slot));
40
41 /*
42  * find the first empty slot 
43  */
44 int find_empty P((int fd, int start, int count));
45
46 /*
47  * returns one if there is a tape loaded in the drive 
48  */
49 int drive_loaded P((int fd, int drivenum));
50
51
52 /*
53  * unloads the drive, putting the tape in the specified slot 
54  */
55 int unload P((int fd, int drive, int slot));
56
57 /*
58  * moves tape from the specified slot into the drive 
59  */
60 int load P((int fd, int drive, int slot));
61
62 /* 
63  * return the number of slots in the robot
64  */
65 int get_slot_count P((int fd));
66
67 /*
68  * return the number of drives in the robot
69  */
70 int get_drive_count P((int fd));
71
72 #endif  /* !LIBSCSI_H */