dvdcss.h

Go to the documentation of this file.
00001 
00011 /*
00012  * Copyright (C) 1998-2002 VideoLAN
00013  * $Id: dvdcss.h,v 1.5 2002/12/11 13:12:10 sam Exp $
00014  *
00015  * This program is free software; you can redistribute it and/or modify
00016  * it under the terms of the GNU General Public License as published by
00017  * the Free Software Foundation; either version 2 of the License, or
00018  * (at your option) any later version.
00019  *
00020  * This program is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023  * GNU General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU General Public License
00026  * along with this program; if not, write to the Free Software
00027  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00028  */
00029 
00030 #ifndef _DVDCSS_DVDCSS_H
00031 #ifndef _DOXYGEN_SKIP_ME
00032 #define _DVDCSS_DVDCSS_H 1
00033 #endif
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00040 typedef struct dvdcss_s* dvdcss_t;
00041 
00042 
00044 #define DVDCSS_BLOCK_SIZE      2048
00045 
00047 #define DVDCSS_NOFLAGS         0
00048 
00050 #define DVDCSS_READ_DECRYPT    (1 << 0)
00051 
00053 #define DVDCSS_SEEK_MPEG       (1 << 0)
00054 
00056 #define DVDCSS_SEEK_KEY        (1 << 1)
00057 
00058 
00059 /*
00060  * Our version number. The variable name contains the interface version.
00061  */
00062 extern char *        dvdcss_interface_2;
00063 
00064 
00065 /*
00066  * Exported prototypes.
00067  */
00068 extern dvdcss_t dvdcss_open  ( char *psz_target );
00069 extern int      dvdcss_close ( dvdcss_t );
00070 extern int      dvdcss_seek  ( dvdcss_t,
00071                                int i_blocks,
00072                                int i_flags );
00073 extern int      dvdcss_read  ( dvdcss_t,
00074                                void *p_buffer,
00075                                int i_blocks,
00076                                int i_flags );
00077 extern int      dvdcss_readv ( dvdcss_t,
00078                                void *p_iovec,
00079                                int i_blocks,
00080                                int i_flags );
00081 extern char *   dvdcss_error ( dvdcss_t );
00082 
00083 
00084 /*
00085  * Deprecated stuff.
00086  */
00087 #ifndef _DOXYGEN_SKIP_ME
00088 #define dvdcss_title(a,b) dvdcss_seek(a,b,DVDCSS_SEEK_KEY)
00089 #define dvdcss_handle dvdcss_t
00090 #endif
00091 
00092 
00093 #ifdef __cplusplus
00094 }
00095 #endif
00096 
00097 #endif /* <dvdcss/dvdcss.h> */