34#ifndef CDIO_ISO9660_H_
35#define CDIO_ISO9660_H_
61#ifndef EMPTY_ARRAY_SIZE
62#define EMPTY_ARRAY_SIZE 0
72#define ISODCL(from, to) ((to) - (from) + 1)
74#define MIN_TRACK_SIZE 4*75
75#define MIN_ISO_SIZE MIN_TRACK_SIZE
148#define ISO_MAX_PUBLISHER_ID 128
151#define ISO_MAX_APPLICATION_ID 128
154#define ISO_MAX_VOLUME_ID 32
157#define ISO_MAX_VOLUMESET_ID 128
164#define ISO_STANDARD_ID "CD001"
166#define CDIO_EXTENT_BLOCKS(size) ((size + (ISO_BLOCKSIZE - 1)) / ISO_BLOCKSIZE)
540#ifndef DO_NOT_WANT_COMPATIBILITY
589#define ISO_EXTENSION_ALL 0xFF
590#define ISO_EXTENSION_NONE 0x00
591#define ISO_EXTENSION_JOLIET \
592 (ISO_EXTENSION_JOLIET_LEVEL1 | \
593 ISO_EXTENSION_JOLIET_LEVEL2 | \
594 ISO_EXTENSION_JOLIET_LEVEL3 )
693 lsn_t start,
long int i_size);
826 uint8_t i_joliet_level);
885 uint32_t parent, uint32_t psize,
886 const time_t *dir_time);
890 const void *ssu_data,
unsigned int ssu_size,
891 uint32_t parent, uint32_t psize,
892 const void *psu_data,
unsigned int psu_size,
893 const time_t *dir_time);
897 uint32_t size, uint8_t file_flags,
899 unsigned int su_size,
const time_t *entry_time);
935 char **ppsz_full_filename);
1016 const char psz_path[]);
1040 const char psz_path[]);
1262 uint32_t extent, uint16_t parent);
1265 uint32_t extent, uint16_t parent);
1272 const char application_id[],
1273 const char publisher_id[],
const char preparer_id[],
1274 uint32_t iso_size,
const void *root_dir,
1275 uint32_t path_table_l_extent,
1276 uint32_t path_table_m_extent,
1277 uint32_t path_table_size,
const time_t *pvd_time);
1287#ifndef DO_NOT_WANT_COMPATIBILITY
1289#define iso9660_isdchar iso9660_is_dchar
1290#define iso9660_isachar iso9660_is_achar
The top-level header for libcdio: the CD Input and Control library. Applications include this for any...
struct _CdIo CdIo_t
Definition cdio.h:47
The top-level header for list-related data structures.
struct _CdioList CdioList_t
Definition ds.h:33
uint64_t iso733_t
Definition iso9660.h:56
uint8_t iso_extension_mask_t
Definition iso9660.h:573
enum iso_extension_enum_s iso_extension_enums
iso9660_t * iso9660_open_fuzzy(const char *psz_path, uint16_t i_fuzz)
enum iso_vd_enum_s iso_vd_enums
CdioList_t * iso9660_fs_readdir(CdIo_t *p_cdio, const char psz_path[])
iso9660_stat_t * iso9660_fs_stat(CdIo_t *p_cdio, const char psz_path[])
void iso9660_stat_free(iso9660_stat_t *p_stat)
bool iso9660_ifs_get_preparer_id(iso9660_t *p_iso, cdio_utf8_t **p_psz_preparer_id)
bool iso9660_ifs_get_system_id(iso9660_t *p_iso, cdio_utf8_t **p_psz_system_id)
PRAGMA_BEGIN_PACKED struct iso9660_dtime_s GNUC_PACKED
iso9660_t * iso9660_open_fuzzy_ext(const char *psz_path, iso_extension_mask_t iso_extension_mask, uint16_t i_fuzz)
uint8_t iso9660_get_pvd_type(const iso9660_pvd_t *p_pvd)
char * iso9660_get_system_id(const iso9660_pvd_t *p_pvd)
enum iso_flag_enum_s iso_flag_enums
void iso9660_set_dtime_with_timezone(const struct tm *p_tm, int timezone, iso9660_dtime_t *p_idr_date)
char achar_t
Definition iso9660.h:58
iso_extension_enum_s
Definition iso9660.h:580
@ ISO_EXTENSION_JOLIET_LEVEL3
Definition iso9660.h:583
@ ISO_EXTENSION_JOLIET_LEVEL2
Definition iso9660.h:582
@ ISO_EXTENSION_ROCK_RIDGE
Definition iso9660.h:584
@ ISO_EXTENSION_HIGH_SIERRA
Definition iso9660.h:585
@ ISO_EXTENSION_JOLIET_LEVEL1
Definition iso9660.h:581
const char * iso9660_get_pvd_id(const iso9660_pvd_t *p_pvd)
bool iso9660_get_dtime(const iso9660_dtime_t *idr_date, bool b_localtime, struct tm *p_tm)
uint16_t iso9660_pathtable_m_add_entry(void *pt, const char name[], uint32_t extent, uint16_t parent)
#define ISO_MAX_VOLUMESET_ID
Maximum number of characters in a volume-set id.
Definition iso9660.h:157
iso9660_stat_t * iso9660_ifs_find_lsn_with_path(iso9660_t *p_iso, lsn_t i_lsn, char **ppsz_path)
struct _iso9660_s iso9660_t
Definition iso9660.h:598
char * iso9660_get_preparer_id(const iso9660_pvd_t *p_pvd)
uint16_t iso721_t
Definition iso9660.h:51
char * iso9660_dir_to_name(const iso9660_dir_t *p_iso9660_dir)
bool iso9660_ifs_get_volumeset_id(iso9660_t *p_iso, cdio_utf8_t **p_psz_volumeset_id)
uint8_t iso9660_ifs_get_joliet_level(iso9660_t *p_iso)
uint32_t iso723_t
Definition iso9660.h:53
iso9660_stat_t * iso9660_ifs_stat(iso9660_t *p_iso, const char psz_path[])
bool iso9660_ifs_read_pvd(const iso9660_t *p_iso, iso9660_pvd_t *p_pvd)
bool iso9660_fs_read_superblock(CdIo_t *p_cdio, iso_extension_mask_t iso_extension_mask)
int iso9660_get_pvd_version(const iso9660_pvd_t *pvd)
bool iso9660_ifs_read_superblock(iso9660_t *p_iso, iso_extension_mask_t iso_extension_mask)
bool iso9660_dirname_valid_p(const char psz_path[])
void iso9660_pathtable_init(void *pt)
bool iso9660_ifs_fuzzy_read_superblock(iso9660_t *p_iso, iso_extension_mask_t iso_extension_mask, uint16_t i_fuzz)
#define ISO_MAX_PUBLISHER_ID
Maximum number of characters in a publisher id.
Definition iso9660.h:148
bool iso9660_fs_read_pvd(const CdIo_t *p_cdio, iso9660_pvd_t *p_pvd)
void iso9660_set_dtime(const struct tm *tm, iso9660_dtime_t *idr_date)
uint8_t iso711_t
ISO 9660 Integer and Character types.
Definition iso9660.h:49
enum strncpy_pad_check strncpy_pad_check_t
lsn_t iso9660_get_root_lsn(const iso9660_pvd_t *p_pvd)
int iso9660_get_pvd_block_size(const iso9660_pvd_t *p_pvd)
void iso9660_filelist_free(CdioISO9660FileList_t *p_filelist)
mode_t iso9660_get_posix_filemode(const iso9660_stat_t *p_iso_dirent)
int iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname, uint8_t i_joliet_level)
iso9660_stat_t * iso9660_fs_find_lsn_with_path(CdIo_t *p_cdio, lsn_t i_lsn, char **ppsz_full_filename)
bool iso9660_ifs_get_application_id(iso9660_t *p_iso, cdio_utf8_t **p_psz_app_id)
iso_vd_enum_s
Definition iso9660.h:120
@ ISO_VD_BOOT_RECORD
Definition iso9660.h:121
@ ISO_VD_PRIMARY
Definition iso9660.h:122
@ ISO_VD_PARITION
Definition iso9660.h:124
@ ISO_VD_SUPPLEMENTARY
Definition iso9660.h:123
@ ISO_VD_END
Definition iso9660.h:125
bool iso9660_get_ltime(const iso9660_ltime_t *p_ldate, struct tm *p_tm)
uint8_t iso9660_get_dir_len(const iso9660_dir_t *p_idr)
void iso9660_set_ltime(const struct tm *_tm, iso9660_ltime_t *p_pvd_date)
iso9660_stat_t * iso9660_find_fs_lsn(CdIo_t *p_cdio, lsn_t i_lsn)
unsigned int iso9660_pathtable_get_size(const void *pt)
#define ISO_STANDARD_ID
Definition iso9660.h:164
void iso9660_dir_init_new(void *dir, uint32_t self, uint32_t ssize, uint32_t parent, uint32_t psize, const time_t *dir_time)
char * iso9660_strncpy_pad(char dst[], const char src[], size_t len, enum strncpy_pad_check _check)
unsigned int iso9660_dir_calc_record_size(unsigned int namelen, unsigned int su_len)
void iso9660_dirlist_free(CdioISO9660DirList_t *p_filelist)
#define ISODCL(from, to)
Definition iso9660.h:72
int iso9660_name_translate(const char *psz_oldname, char *psz_newname)
bool iso9660_ifs_get_volume_id(iso9660_t *p_iso, cdio_utf8_t **p_psz_volume_id)
CdioList_t CdioISO9660DirList_t
A data type for a list of ISO9660 statbuf drectory pointer returned from the variious Cdio iso9660 re...
Definition iso9660.h:521
enum iso_enum1_s iso_enums1
long int iso9660_iso_seek_read(const iso9660_t *p_iso, void *ptr, lsn_t start, long int i_size)
uint32_t iso732_t
Definition iso9660.h:55
char * iso9660_get_application_id(iso9660_pvd_t *p_pvd)
iso_enum1_s
Definition iso9660.h:83
@ ISO_BLOCKSIZE
Definition iso9660.h:96
@ LEN_ISONAME
Definition iso9660.h:86
@ ISO_PVD_SECTOR
Definition iso9660.h:84
@ ISO_MAX_PREPARER_ID
Definition iso9660.h:92
@ ISO_EVD_SECTOR
Definition iso9660.h:85
@ MAX_ISOPATHNAME
Definition iso9660.h:94
@ ISO_MAX_SYSTEM_ID
Definition iso9660.h:88
@ MAX_ISONAME
Definition iso9660.h:90
char * iso9660_pathname_isofy(const char psz_path[], uint16_t i_version)
char * iso9660_get_publisher_id(const iso9660_pvd_t *p_pvd)
CdioList_t * iso9660_ifs_readdir(iso9660_t *p_iso, const char psz_path[])
int iso9660_get_pvd_space_size(const iso9660_pvd_t *p_pvd)
iso9660_stat_t * iso9660_ifs_find_lsn(iso9660_t *p_iso, lsn_t i_lsn)
iso9660_stat_t * iso9660_fs_find_lsn(CdIo_t *p_cdio, lsn_t i_lsn)
void iso9660_set_pvd(void *pd, const char volume_id[], const char application_id[], const char publisher_id[], const char preparer_id[], uint32_t iso_size, const void *root_dir, uint32_t path_table_l_extent, uint32_t path_table_m_extent, uint32_t path_table_size, const time_t *pvd_time)
strncpy_pad_check
Definition iso9660.h:172
@ ISO9660_NOCHECK
Definition iso9660.h:173
@ ISO9660_7BIT
Definition iso9660.h:174
@ ISO9660_DCHARS
Definition iso9660.h:176
@ ISO9660_ACHARS
Definition iso9660.h:175
bool iso9660_close(iso9660_t *p_iso)
void iso9660_dir_add_entry_su(void *dir, const char filename[], uint32_t extent, uint32_t size, uint8_t file_flags, const void *su_data, unsigned int su_size, const time_t *entry_time)
bool iso9660_is_achar(int c)
void iso9660_set_evd(void *pd)
uint16_t iso722_t
Definition iso9660.h:52
void iso9660_dir_init_new_su(void *dir, uint32_t self, uint32_t ssize, const void *ssu_data, unsigned int ssu_size, uint32_t parent, uint32_t psize, const void *psu_data, unsigned int psu_size, const time_t *dir_time)
bool iso9660_ifs_is_xa(const iso9660_t *p_iso)
bool iso9660_ifs_get_publisher_id(iso9660_t *p_iso, cdio_utf8_t **p_psz_publisher_id)
#define ISO_MAX_VOLUME_ID
Maximum number of characters in a volume id.
Definition iso9660.h:154
CdioISO9660DirList_t * iso9660_dirlist_new(void)
iso9660_stat_t * iso9660_ifs_stat_translate(iso9660_t *p_iso, const char psz_path[])
char * iso9660_get_volume_id(const iso9660_pvd_t *p_pvd)
uint16_t iso9660_pathtable_l_add_entry(void *pt, const char name[], uint32_t extent, uint16_t parent)
CdioISO9660FileList_t * iso9660_filelist_new(void)
bool iso9660_pathname_valid_p(const char psz_path[])
void iso9660_set_ltime_with_timezone(const struct tm *_tm, int timezone, iso9660_ltime_t *p_pvd_date)
char * iso9660_get_volumeset_id(const iso9660_pvd_t *p_pvd)
char dchar_t
Definition iso9660.h:59
#define EMPTY_ARRAY_SIZE
Definition iso9660.h:62
bool_3way_t iso9660_have_rr(iso9660_t *p_iso, uint64_t u_file_limit)
iso9660_t * iso9660_open_ext(const char *psz_path, iso_extension_mask_t iso_extension_mask)
uint32_t iso731_t
Definition iso9660.h:54
bool iso9660_is_dchar(int c)
iso_flag_enum_s
Definition iso9660.h:107
@ ISO_RECORD
Definition iso9660.h:112
@ ISO_FILE
Definition iso9660.h:108
@ ISO_DRESERVED1
Definition iso9660.h:114
@ ISO_MULTIEXTENT
Definition iso9660.h:116
@ ISO_ASSOCIATED
Definition iso9660.h:111
@ ISO_EXISTENCE
Definition iso9660.h:109
@ ISO_DRESERVED2
Definition iso9660.h:115
@ ISO_DIRECTORY
Definition iso9660.h:110
@ ISO_PROTECTION
Definition iso9660.h:113
iso9660_t * iso9660_open(const char *psz_path)
iso9660_stat_t * iso9660_fs_stat_translate(CdIo_t *p_cdio, const char psz_path[])
#define ISO_MAX_APPLICATION_ID
Maximum number of characters in an application id.
Definition iso9660.h:151
PRAGMA_END_PACKED typedef CdioList_t CdioISO9660FileList_t
A data type for a list of ISO9660 statbuf file pointers returned from the various Cdio iso9660 readdi...
Definition iso9660.h:515
int8_t iso712_t
Definition iso9660.h:50
various POSIX definitions.
Things related to the Rock Ridge Interchange Protocol (RRIP)
Format of an ISO-9660 directory record.
Definition iso9660.h:250
char str[1]
Definition iso9660.h:286
iso711_t file_unit_size
Definition iso9660.h:263
union iso9660_dir_s::@11 filename
iso711_t len
Definition iso9660.h:285
uint8_t file_flags
Definition iso9660.h:260
iso733_t size
Definition iso9660.h:256
iso723_t volume_sequence_number
Definition iso9660.h:271
iso711_t length
Definition iso9660.h:251
iso711_t interleave_gap
Definition iso9660.h:267
iso733_t extent
Definition iso9660.h:254
iso711_t xa_length
Definition iso9660.h:252
iso9660_dtime_t recording_time
Definition iso9660.h:259
ISO-9660 shorter-format time structure. See ECMA 9.1.5.
Definition iso9660.h:186
iso711_t dt_day
Definition iso9660.h:190
iso711_t dt_month
Definition iso9660.h:188
iso712_t dt_gmtoff
Definition iso9660.h:194
iso711_t dt_year
Definition iso9660.h:187
iso711_t dt_second
Definition iso9660.h:193
iso711_t dt_minute
Definition iso9660.h:192
iso711_t dt_hour
Definition iso9660.h:191
ISO-9660 longer-format time structure.
Definition iso9660.h:209
iso712_t lt_gmtoff
Definition iso9660.h:224
char lt_year[ISODCL(1, 4)]
Definition iso9660.h:210
char lt_second[ISODCL(13, 14)]
Definition iso9660.h:220
char lt_day[ISODCL(7, 8)]
Definition iso9660.h:217
char lt_hour[ISODCL(9, 10)]
Definition iso9660.h:218
char lt_minute[ISODCL(11, 12)]
Definition iso9660.h:219
char lt_month[ISODCL(5, 6)]
Definition iso9660.h:213
char lt_hsecond[ISODCL(15, 16)]
Definition iso9660.h:221
ISO-9660 Primary Volume Descriptor.
Definition iso9660.h:293
iso711_t type
Definition iso9660.h:294
dchar_t volume_set_id[ISO_MAX_VOLUMESET_ID]
Definition iso9660.h:323
iso723_t logical_block_size
Definition iso9660.h:307
iso731_t type_l_path_table
Definition iso9660.h:309
iso9660_ltime_t expiration_date
Definition iso9660.h:379
achar_t system_id[ISO_MAX_SYSTEM_ID]
Definition iso9660.h:299
dchar_t abstract_file_id[37]
Definition iso9660.h:368
uint8_t unused3[32]
Definition iso9660.h:304
iso9660_dir_t root_directory_record
Definition iso9660.h:317
char unused1[1]
Definition iso9660.h:298
char application_data[512]
Definition iso9660.h:388
dchar_t copyright_file_id[37]
Definition iso9660.h:361
iso9660_ltime_t modification_date
Definition iso9660.h:375
achar_t application_id[ISO_MAX_APPLICATION_ID]
Definition iso9660.h:349
iso711_t file_structure_version
Definition iso9660.h:386
uint8_t unused4[1]
Definition iso9660.h:387
dchar_t volume_id[ISO_MAX_VOLUME_ID]
Definition iso9660.h:300
achar_t publisher_id[ISO_MAX_PUBLISHER_ID]
Definition iso9660.h:327
iso723_t volume_set_size
Definition iso9660.h:305
iso731_t opt_type_l_path_table
Definition iso9660.h:311
iso711_t version
Definition iso9660.h:297
iso9660_ltime_t effective_date
Definition iso9660.h:382
iso732_t type_m_path_table
Definition iso9660.h:313
uint8_t unused2[8]
Definition iso9660.h:301
iso733_t path_table_size
Definition iso9660.h:308
achar_t preparer_id[ISO_MAX_PREPARER_ID]
Definition iso9660.h:338
iso723_t volume_sequence_number
Definition iso9660.h:306
iso9660_ltime_t creation_date
Definition iso9660.h:372
char root_directory_filename
Definition iso9660.h:320
dchar_t bibliographic_file_id[37]
Definition iso9660.h:370
iso733_t volume_space_size
Definition iso9660.h:302
iso732_t opt_type_m_path_table
Definition iso9660.h:315
uint8_t unused5[653]
Definition iso9660.h:390
Unix stat-like version of iso9660_dir.
Definition iso9660.h:532
uint32_t size
Definition iso9660.h:545
char filename[EMPTY_ARRAY_SIZE]
Definition iso9660.h:568
struct tm tm
Definition iso9660.h:536
uint32_t secsize
Definition iso9660.h:546
bool b_xa
Definition iso9660.h:567
@ _STAT_DIR
Definition iso9660.h:566
@ _STAT_FILE
Definition iso9660.h:566
uint64_t total_size
Definition iso9660.h:560
enum iso9660_stat_s::@12 type
iso9660_xa_t xa
Definition iso9660.h:565
iso_rock_statbuf_t rr
Definition iso9660.h:534
lsn_t lsn
Definition iso9660.h:538
ISO-9660 Supplementary Volume Descriptor.
Definition iso9660.h:402
iso731_t type_l_path_table
Definition iso9660.h:422
iso731_t opt_type_l_path_table
Definition iso9660.h:424
char application_data[512]
Definition iso9660.h:502
dchar_t copyright_file_id[37]
Definition iso9660.h:475
achar_t application_id[ISO_MAX_APPLICATION_ID]
Definition iso9660.h:463
iso711_t version
Definition iso9660.h:407
char flags
Definition iso9660.h:408
achar_t system_id[ISO_MAX_SYSTEM_ID]
Definition iso9660.h:409
uint8_t unused5[653]
Definition iso9660.h:504
dchar_t bibliographic_file_id[37]
Definition iso9660.h:484
iso9660_ltime_t effective_date
Definition iso9660.h:496
dchar_t volume_id[ISO_MAX_VOLUME_ID]
Definition iso9660.h:411
char escape_sequences[32]
Definition iso9660.h:416
uint8_t unused4[1]
Definition iso9660.h:501
achar_t publisher_id[ISO_MAX_PUBLISHER_ID]
Definition iso9660.h:439
iso723_t volume_set_size
Definition iso9660.h:417
dchar_t volume_set_id[ISO_MAX_VOLUMESET_ID]
Definition iso9660.h:437
iso733_t path_table_size
Definition iso9660.h:420
achar_t preparer_id[ISO_MAX_PREPARER_ID]
Definition iso9660.h:451
iso9660_ltime_t creation_date
Definition iso9660.h:486
char unused2[8]
Definition iso9660.h:413
iso723_t logical_block_size
Definition iso9660.h:419
iso733_t volume_space_size
Definition iso9660.h:414
iso9660_ltime_t expiration_date
Definition iso9660.h:493
iso732_t type_m_path_table
Definition iso9660.h:427
char root_directory_filename
Definition iso9660.h:434
iso711_t file_structure_version
Definition iso9660.h:500
iso711_t type
Definition iso9660.h:403
dchar_t abstract_file_id[37]
Definition iso9660.h:482
iso9660_ltime_t modification_date
Definition iso9660.h:489
iso723_t volume_sequence_number
Definition iso9660.h:418
iso9660_dir_t root_directory_record
Definition iso9660.h:432
iso732_t opt_type_m_path_table
Definition iso9660.h:429
"Extended Architecture" according to the Philips Yellow Book.
Definition xa.h:101
Common type definitions used pervasively in libcdio.
bool_3way_t
Definition types.h:220
char cdio_utf8_t
UTF-8 char definition.
Definition types.h:218
#define PRAGMA_BEGIN_PACKED
Definition types.h:152
#define PRAGMA_END_PACKED
Definition types.h:153
int32_t lsn_t
Definition types.h:250
Things related to the ISO-9660 XA (Extended Attributes) format.