libcdio  2.1.0
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 
143  int udf_get_logical_volume_id(udf_t *p_udf, /*out*/ char *psz_logvolid,
144  unsigned int i_logvolid);
145 
149  udf_dirent_t *udf_fopen(udf_dirent_t *p_udf_root, const char *psz_name);
150 
188  char *udf_mode_string (mode_t i_mode, char *psz_str);
189 
190  bool udf_get_lba(const udf_file_entry_t *p_udf_fe,
191  /*out*/ uint32_t *start, /*out*/ uint32_t *end);
192 
193 #ifdef __cplusplus
194 }
195 #endif /* __cplusplus */
196 
197 #include <cdio/udf_time.h>
198 #include <cdio/udf_file.h>
199 
200 #endif /*UDF_H*/
uint16_t partition_num_t
Definition: udf.h:33
uint8_t * sector
Definition: udf.h:49
int udf_get_volumeset_id(udf_t *p_udf, uint8_t *volsetid, unsigned int i_volsetid)
driver_return_code_t
Definition: device.h:205
Definitions based on ECMA-167 3rd edition (June 1997) See http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-167.pdf.
int32_t lsn_t
Definition: types.h:266
uint32_t i_loc
Definition: udf.h:47
driver_return_code_t udf_read_sectors(const udf_t *p_udf, void *ptr, lsn_t i_start, long int i_blocks)
char * udf_mode_string(mode_t i_mode, char *psz_str)
struct udf_dirent_s udf_dirent_t
udf_t * p_udf
Definition: udf.h:45
struct udf_file_s udf_file_t
Definition: udf.h:37
Definition: udf.h:39
udf_fileid_desc_t * fid
Definition: udf.h:50
bool b_dir
Definition: udf.h:41
udf_t * udf_open(const char *psz_path)
uint32_t i_part_start
Definition: udf.h:46
The top-level header for libcdio: the CD Input and Control library. Applications include this for any...
struct udf_s udf_t
Definition: udf.h:36
udf_enum1_t debug_udf_enum1
uint32_t i_loc_end
Definition: udf.h:47
udf_dirent_t * udf_get_root(udf_t *p_udf, bool b_any_partition, partition_num_t i_partition)
udf_dirent_t * udf_fopen(udf_dirent_t *p_udf_root, const char *psz_name)
bool udf_close(udf_t *p_udf)
Routines involving UDF file operations.
int16_t udf_get_part_number(const udf_t *p_udf)
int udf_get_volume_id(udf_t *p_udf, char *psz_volid, unsigned int i_volid)
udf_enum1_t
Definition: udf.h:62
int udf_get_logical_volume_id(udf_t *p_udf, char *psz_logvolid, unsigned int i_logvolid)
Definition: ecma_167.h:735
various POSIX definitions.
Definition: udf.h:63
bool udf_get_lba(const udf_file_entry_t *p_udf_fe, uint32_t *start, uint32_t *end)
uint64_t dir_left
Definition: udf.h:48
bool b_parent
Definition: udf.h:42
char * psz_name
Definition: udf.h:40
udf_file_entry_t fe
Definition: udf.h:53
UDF time conversion and access files.
Definition: ecma_167.h:578