1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3  * Libbrasero-media
4  * Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr>
5  *
6  * Libbrasero-media is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * The Libbrasero-media authors hereby grant permission for non-GPL compatible
12  * GStreamer plugins to be used and distributed together with GStreamer
13  * and Libbrasero-media. This permission is above and beyond the permissions granted
14  * by the GPL license by which Libbrasero-media is covered. If you modify this code
15  * you may extend this exception to your version of the code, but you are not
16  * obligated to do so. If you do not wish to do so, delete this exception
17  * statement from your version.
18  *
19  * Libbrasero-media is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to:
26  * 	The Free Software Foundation, Inc.,
27  * 	51 Franklin Street, Fifth Floor
28  * 	Boston, MA  02110-1301, USA.
29  */
30 
31 #include <glib.h>
32 
33 #include "scsi-base.h"
34 
35 #ifndef _BURN_GET_PERFORMANCE_H
36 #define _BURN_GET_PERFORMANCE_H
37 
38 G_BEGIN_DECLS
39 
40 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
41 
42 struct _BraseroScsiGetPerfHdr {
43 	uchar len	[4];
44 
45 	uchar except	:1;
46 	uchar wrt	:1;
47 	uchar reserved0	:6;
48 
49 	uchar reserved1	[3];
50 };
51 
52 struct _BraseroScsiWrtSpdDesc {
53 	uchar mrw	:1;
54 	uchar exact	:1;
55 	uchar rdd	:1;
56 	uchar wrc	:1;
57 	uchar reserved0	:3;
58 
59 	uchar reserved1	[3];
60 
61 	uchar capacity	[4];
62 	uchar rd_speed	[4];
63 	uchar wr_speed	[4];
64 };
65 
66 #else
67 
68 struct _BraseroScsiGetPerfHdr {
69 	uchar len	[4];
70 
71 	uchar reserved0	:6;
72 	uchar wrt	:1;
73 	uchar except	:1;
74 
75 	uchar reserved1	[3];
76 };
77 
78 struct _BraseroScsiWrtSpdDesc {
79 	uchar reserved0	:3;
80 	uchar wrc	:1;
81 	uchar rdd	:1;
82 	uchar exact	:1;
83 	uchar mrw	:1;
84 
85 	uchar reserved1	[3];
86 
87 	uchar capacity	[4];
88 	uchar rd_speed	[4];
89 	uchar wr_speed	[4];
90 };
91 
92 #endif
93 
94 typedef struct _BraseroScsiGetPerfHdr BraseroScsiGetPerfHdr;
95 typedef struct _BraseroScsiWrtSpdDesc BraseroScsiWrtSpdDesc;
96 
97 struct _BraseroScsiGetPerfData {
98 	BraseroScsiGetPerfHdr hdr;
99 	gpointer data;			/* depends on the request */
100 };
101 typedef struct _BraseroScsiGetPerfData BraseroScsiGetPerfData;
102 
103 G_END_DECLS
104 
105 #endif /* _BURN_GET_PERFORMANCE_H */
106 
107 
108