libcdio  0.83
udf.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2005, 2006, 2008, 2010 Rocky Bernstein <rocky@gnu.org>
3 
4  This program 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 3 of the License, or
7  (at your option) any later version.
8 
9  This program 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
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
26 #ifndef UDF_H
27 #define UDF_H
28 
29 #include <cdio/cdio.h>
30 #include <cdio/ecma_167.h>
31 #include <cdio/posix.h>
32 
33 typedef uint16_t partition_num_t;
34 
36 typedef struct udf_s udf_t;
37 typedef struct udf_file_s udf_file_t;
38 
39 typedef struct udf_dirent_s {
40  char *psz_name;
41  bool b_dir; /* true if this entry is a directory. */
42  bool b_parent; /* True if has parent directory (e.g. not root
43  directory). If not set b_dir will probably
44  be true. */
46  uint32_t i_part_start;
47  uint32_t i_loc, i_loc_end;
48  uint64_t dir_left;
49  uint8_t *sector;
51 
52  /* This field has to come last because it is variable in length. */
54 } udf_dirent_t;;
55 
56 
57 
62 typedef enum {
64 } udf_enum1_t;
65 
71 
72 #ifdef __cplusplus
73 extern "C" {
74 #endif /* __cplusplus */
75 
79  bool udf_close (udf_t *p_udf);
80 
87  driver_return_code_t udf_read_sectors (const udf_t *p_udf, void *ptr,
88  lsn_t i_start, long int i_blocks);
89 
96  udf_t *udf_open (const char *psz_path);
97 
102  int16_t udf_get_part_number(const udf_t *p_udf);
103 
112  udf_dirent_t *udf_get_root (udf_t *p_udf, bool b_any_partition,
113  partition_num_t i_partition);
114 
121  int udf_get_volume_id(udf_t *p_udf, /*out*/ char *psz_volid,
122  unsigned int i_volid);
123 
133  int udf_get_volumeset_id(udf_t *p_udf, /*out*/ uint8_t *volsetid,
134  unsigned int i_volsetid);
135 
139  udf_dirent_t *udf_fopen(udf_dirent_t *p_udf_root, const char *psz_name);
140 
178  char *udf_mode_string (mode_t i_mode, char *psz_str);
179 
180  bool udf_get_lba(const udf_file_entry_t *p_udf_fe,
181  /*out*/ uint32_t *start, /*out*/ uint32_t *end);
182 
183 #ifdef __cplusplus
184 }
185 #endif /* __cplusplus */
186 
187 #include <cdio/udf_time.h>
188 #include <cdio/udf_file.h>
189 
190 #endif /*UDF_H*/

Generated for libcdio by doxygen 1.8.1.1