xref: /titanic_50/usr/src/cmd/cdrw/main.h (revision 711890bc9379ceea66272dc8d4981812224ea86e)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_MAIN_H
28 #define	_MAIN_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #include "device.h"
37 
38 extern int debug;
39 
40 extern int		use_media_stated_capacity;
41 extern int		keep_disc_open;
42 extern int		requested_speed;
43 extern int		simulation;
44 extern int		verbose;
45 extern char		*image_file;
46 extern char		*blanking_type;
47 extern int		audio_type;
48 extern cd_device	*target;		/* Default target device */
49 extern int		extract_track_no;
50 extern char		*extract_file;
51 extern char		*alt_tmp_dir;
52 extern char		*copy_src;
53 extern int		vol_running;
54 extern int		cflag, tflag;
55 extern uid_t		ruid, cur_uid;
56 extern int		device_type;
57 extern int		write_mode;
58 
59 #define	TAO_MODE	0
60 #define	DAO_MODE	1	/* not implimented for CD yet only DVD */
61 
62 #define	CD_RW		1		/* CD_RW/CD-R	*/
63 #define	DVD_MINUS	2		/* DVD-RW/DVD-R	*/
64 
65 /*
66  * DVD+RW is listed differently from DVD+R since DVD+RW requires
67  * that we format the media priot to writing, this cannot be
68  * done for DVD+R since it is write once media, we treat the
69  * media as pre-formatted.
70  */
71 #define	DVD_PLUS	3		/* DVD+R	*/
72 #define	DVD_PLUS_W	4		/* DVD+RW	*/
73 
74 #define	ALL		0	/* erase the complete media, slow */
75 #define	FAST		1	/* only erases the leadin and TOC */
76 #define	SESSION		6	/* erases the last session */
77 #define	LEADOUT		5	/* erases the leadout of the media */
78 #define	CLEAR		1	/* same as fast, used for fixing media */
79 
80 int setup_target(int flag);
81 
82 void info(void);
83 void list(void);
84 void write_image(void);
85 void blank(void);
86 void write_audio(char **argv, int start_argc, int argc);
87 void extract_audio(void);
88 void copy_cd(void);
89 
90 #ifdef	__cplusplus
91 }
92 #endif
93 
94 #endif /* _MAIN_H */
95