1 /* OGMDvd - A wrapper library around libdvdread
2  * Copyright (C) 2009-2012 Olivier Rolland <billl@users.sourceforge.net>
3  *
4  * Code from dvd+rw-tools
5  * Copyright (C) Andy Polyakov <appro@fy.chalmers.se>
6  *
7  * dvd+rw-tools is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * dvd+rw-tools is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  */
21 
22 #ifndef __OGMDVD_TRANSPORT_H__
23 #define __OGMDVD_TRANSPORT_H__
24 
25 #include <stdio.h>
26 
27 typedef enum
28 {
29   NONE,
30   READ,
31   WRITE
32 } Direction;
33 
34 typedef struct _Scsi_Command Scsi_Command;
35 
36 Scsi_Command *  scsi_command_new_from_fd   (int fd);
37 void            scsi_command_free          (Scsi_Command  *cmd);
38 
39 void            scsi_command_set           (Scsi_Command  *cmd,
40                                             size_t        index,
41                                             unsigned char value);
42 int             scsi_command_transport     (Scsi_Command  *cmd,
43                                             Direction     dir,
44                                             void          *buf,
45                                             size_t        sz);
46 
47 #endif /* __OGMDVD_TRANSPORT_H__ */
48 
49