]> git.sesse.net Git - vlc/blob - extras/MacOSX_dvdioctl/DVDioctl.h
* additional enhancements to the OS X DVD ioctl module
[vlc] / extras / MacOSX_dvdioctl / DVDioctl.h
1 /*****************************************************************************
2  * DVDioctl.h: Linux-like DVD driver for Darwin and MacOS X
3  *****************************************************************************
4  * Copyright (C) 2001 VideoLAN
5  * $Id: DVDioctl.h,v 1.2 2001/04/04 02:49:18 sam Exp $
6  *
7  * Authors: Samuel Hocevar <sam@zoy.org>
8  *
9  * The contents of this file constitute Original Code as defined in and
10  * are subject to the Apple Public Source License Version 1.1 (the
11  * "License").  You may not use this file except in compliance with the
12  * License.  Please obtain a copy of the License at
13  * http://www.apple.com/publicsource and read it before using this file.
14  * 
15  * This Original Code and all software distributed under the License are
16  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
20  * License for the specific language governing rights and limitations
21  * under the License.
22  *****************************************************************************/
23
24 #if defined(KERNEL)
25 /* Everything has already been defined */
26 #else
27 enum DVDKeyFormat
28 {
29     kCSSAGID        = 0x00,
30     kChallengeKey   = 0x01,
31     kKey1           = 0x02,
32     kKey2           = 0x03,
33     kTitleKey       = 0x04,
34     kASF            = 0x05,
35     kSetRegion      = 0x06,
36     kRPCState       = 0x08,
37     kCSS2AGID       = 0x10,
38     kCPRMAGID       = 0x11,
39     kInvalidateAGID = 0x3f
40 };
41
42 enum DVDKeyClass
43 {
44     kCSS_CSS2_CPRM  = 0x00,
45     kRSSA           = 0x01
46 };
47 #endif
48
49 typedef struct dvdioctl_data
50 {
51     void         *p_buffer;
52
53 #if defined(KERNEL)
54     UInt32        i_lba;
55     UInt8         i_agid;
56 #else
57     u32           i_lba;
58     u8            i_agid;
59 #endif
60
61     int           i_keyclass;
62     int           i_keyformat;
63
64 } dvdioctl_data_t;
65
66 #define IODVD_READ_STRUCTURE _IOWR('B', 1, dvdioctl_data_t)
67 #define IODVD_SEND_KEY       _IOWR('B', 2, dvdioctl_data_t)
68 #define IODVD_REPORT_KEY     _IOWR('B', 3, dvdioctl_data_t)
69