dvdcss.h

Go to the documentation of this file.
00001 
00011 /*
00012  * Copyright (C) 1998-2008 VideoLAN
00013  * $Id$
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 #if defined(LIBDVDCSS_EXPORTS)
00060 #define LIBDVDCSS_EXPORT __declspec(dllexport) extern
00061 #elif defined(LIBDVDCSS_IMPORTS)
00062 #define LIBDVDCSS_EXPORT __declspec(dllimport) extern
00063 #else
00064 #define LIBDVDCSS_EXPORT extern
00065 #endif
00066 
00067 /*
00068  * Our version number. The variable name contains the interface version.
00069  */
00070 LIBDVDCSS_EXPORT char *        dvdcss_interface_2;
00071 
00072 
00073 /*
00074  * Exported prototypes.
00075  */
00076 LIBDVDCSS_EXPORT dvdcss_t dvdcss_open  ( char *psz_target );
00077 LIBDVDCSS_EXPORT int      dvdcss_close ( dvdcss_t );
00078 LIBDVDCSS_EXPORT int      dvdcss_seek  ( dvdcss_t,
00079                                int i_blocks,
00080                                int i_flags );
00081 LIBDVDCSS_EXPORT int      dvdcss_read  ( dvdcss_t,
00082                                void *p_buffer,
00083                                int i_blocks,
00084                                int i_flags );
00085 LIBDVDCSS_EXPORT int      dvdcss_readv ( dvdcss_t,
00086                                void *p_iovec,
00087                                int i_blocks,
00088                                int i_flags );
00089 LIBDVDCSS_EXPORT char *   dvdcss_error ( dvdcss_t );
00090 
00091 LIBDVDCSS_EXPORT int      dvdcss_is_scrambled ( dvdcss_t );
00092 
00093 
00094 /*
00095  * Deprecated stuff.
00096  */
00097 #ifndef _DOXYGEN_SKIP_ME
00098 #define dvdcss_title(a,b) dvdcss_seek(a,b,DVDCSS_SEEK_KEY)
00099 #define dvdcss_handle dvdcss_t
00100 #endif
00101 
00102 
00103 #ifdef __cplusplus
00104 }
00105 #endif
00106 
00107 #endif /* DVDCSS_DVDCSS_H  */