libcdio  2.0.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*/
udf_enum1_t
udf_enum1_t
Definition: udf.h:62
udf_file_entry_s
Definition: ecma_167.h:731
udf_read_sectors
driver_return_code_t udf_read_sectors(const udf_t *p_udf, void *ptr, lsn_t i_start, long int i_blocks)
udf_time.h
UDF time conversion and access files.
cdio.h
The top-level header for libcdio: the CD Input and Control library. Applications include this for any...
lsn_t
int32_t lsn_t
Definition: types.h:266
driver_return_code_t
driver_return_code_t
Definition: device.h:205
udf_get_part_number
int16_t udf_get_part_number(const udf_t *p_udf)
udf_fileid_desc_s
Definition: ecma_167.h:577
udf_dirent_s::i_loc
uint32_t i_loc
Definition: udf.h:47
udf_file.h
Routines involving UDF file operations.
udf_dirent_s::fid
udf_fileid_desc_t * fid
Definition: udf.h:50
udf_dirent_s::i_part_start
uint32_t i_part_start
Definition: udf.h:46
udf_dirent_s::p_udf
udf_t * p_udf
Definition: udf.h:45
udf_get_volumeset_id
int udf_get_volumeset_id(udf_t *p_udf, uint8_t *volsetid, unsigned int i_volsetid)
udf_dirent_s::sector
uint8_t * sector
Definition: udf.h:49
udf_dirent_s
Definition: udf.h:39
udf_get_volume_id
int udf_get_volume_id(udf_t *p_udf, char *psz_volid, unsigned int i_volid)
ecma_167.h
Definitions based on ECMA-167 3rd edition (June 1997) See http://www.ecma-international....
udf_dirent_s::i_loc_end
uint32_t i_loc_end
Definition: udf.h:47
udf_fopen
udf_dirent_t * udf_fopen(udf_dirent_t *p_udf_root, const char *psz_name)
udf_get_lba
bool udf_get_lba(const udf_file_entry_t *p_udf_fe, uint32_t *start, uint32_t *end)
udf_file_t
struct udf_file_s udf_file_t
Definition: udf.h:37
udf_mode_string
char * udf_mode_string(mode_t i_mode, char *psz_str)
udf_open
udf_t * udf_open(const char *psz_path)
udf_get_logical_volume_id
int udf_get_logical_volume_id(udf_t *p_udf, char *psz_logvolid, unsigned int i_logvolid)
debug_udf_enum1
udf_enum1_t debug_udf_enum1
UDF_BLOCKSIZE
@ UDF_BLOCKSIZE
Definition: udf.h:63
partition_num_t
uint16_t partition_num_t
Definition: udf.h:33
udf_get_root
udf_dirent_t * udf_get_root(udf_t *p_udf, bool b_any_partition, partition_num_t i_partition)
udf_t
struct udf_s udf_t
Definition: udf.h:36
udf_dirent_s::b_parent
bool b_parent
Definition: udf.h:42
udf_dirent_s::psz_name
char * psz_name
Definition: udf.h:40
posix.h
various POSIX definitions.
udf_dirent_s::fe
udf_file_entry_t fe
Definition: udf.h:53
udf_dirent_s::dir_left
uint64_t dir_left
Definition: udf.h:48
udf_close
bool udf_close(udf_t *p_udf)
udf_dirent_s::b_dir
bool b_dir
Definition: udf.h:41
udf_dirent_t
struct udf_dirent_s udf_dirent_t

Generated for libcdio by doxygen 1.8.17