dvdread_internal.h
1 /*
2  * This file is part of libdvdread.
3  *
4  * libdvdread is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * libdvdread is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with libdvdread; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef LIBDVDREAD_DVDREAD_INTERNAL_H
20 #define LIBDVDREAD_DVDREAD_INTERNAL_H
21 
22 #include <stdint.h>
23 #include <sys/types.h>
24 
25 #ifdef _WIN32
26 # include <unistd.h>
27 #endif /* _WIN32 */
28 
29 #include "dvdread/dvd_reader.h"
30 
31 #define CHECK_VALUE(arg) \
32  if(!(arg)) { \
33  fprintf(stderr, "\n*** libdvdread: CHECK_VALUE failed in %s:%i ***" \
34  "\n*** for %s ***\n\n", \
35  __FILE__, __LINE__, # arg ); \
36  }
37 
38 enum TagIdentifier {
39  /* ECMA 167 3/7.2.1 */
40  PrimaryVolumeDescriptor = 1,
41  AnchorVolumeDescriptorPointer = 2,
42  VolumeDescriptorPointer = 3,
43  ImplementationUseVolumeDescriptor = 4,
44  PartitionDescriptor = 5,
45  LogicalVolumeDescriptor = 6,
46  UnallocatedSpaceDescriptor = 7,
47  TerminatingDescriptor = 8,
48  LogicalVolumeIntegrityDescriptor = 9,
49  /* ECMA 167 4/7.2.1 */
50  FileSetDescriptor = 256,
51  FileIdentifierDescriptor = 257,
52  AllocationExtentDescriptor = 258,
53  IndirectEntry = 259,
54  TerminalEntry = 260,
55  FileEntry = 261,
56  ExtendedAttributeHeaderDescriptor = 262,
57  UnallocatedSpaceEntry = 263,
58  SpaceBitmapDescriptor = 264,
59  PartitionIntegrityEntry = 265,
60  ExtendedFileEntry = 266,
61 };
62 
63 int InternalUDFReadBlocksRaw(const dvd_reader_t *device, uint32_t lb_number,
64  size_t block_count, unsigned char *data, int encrypted);
65 
66 void *GetUDFCacheHandle(dvd_reader_t *device);
67 void SetUDFCacheHandle(dvd_reader_t *device, void *cache);
68 void FreeUDFCache(void *cache);
69 
70 #endif /* LIBDVDREAD_DVDREAD_INTERNAL_H */
Definition: dvd_reader.c:82