⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iso9660.h

📁 linux下的MPEG1
💻 H
📖 第 1 页 / 共 2 页
字号:
/*!  Read the Primary Volume Descriptor for an ISO 9660 image.  True is returned if read, and false if there was an error.*/  bool iso9660_ifs_read_pvd (const iso9660_t *p_iso,                              /*out*/ iso9660_pvd_t *p_pvd);/*!  Read the Super block of an ISO 9660 image. This is the   Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume   Descriptor if (Joliet) extensions are acceptable.*/  bool iso9660_fs_read_superblock (CdIo *p_cdio,                                    iso_extension_mask_t iso_extension_mask);/*!  Read the Supper block of an ISO 9660 image. This is the   Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume   Descriptor if (Joliet) extensions are acceptable.*/  bool iso9660_ifs_read_superblock (iso9660_t *p_iso,                                    iso_extension_mask_t iso_extension_mask);/*====================================================  Time conversion  ====================================================*//*!  Set time in format used in ISO 9660 directory index record  from a Unix time structure. */  void iso9660_set_dtime (const struct tm *tm,                           /*out*/ iso9660_dtime_t *idr_date);/*!  Set "long" time in format used in ISO 9660 primary volume descriptor  from a Unix time structure. */  void iso9660_set_ltime (const struct tm *_tm,                           /*out*/ iso9660_ltime_t *p_pvd_date);/*!  Get Unix time structure from format use in an ISO 9660 directory index   record. Even though tm_wday and tm_yday fields are not explicitly in  idr_date, they are calculated from the other fields.  If tm is to reflect the localtime, set "use_localtime" true, otherwise  tm will reported in GMT.*/  void iso9660_get_dtime (const iso9660_dtime_t *idr_date, bool use_localtime,                          /*out*/ struct tm *tm);/*====================================================  Characters used in file and directory and manipulation ====================================================*//*!   Return true if c is a DCHAR - a character that can appear in an an   ISO-9600 level 1 directory name. These are the ASCII capital   letters A-Z, the digits 0-9 and an underscore.*/bool iso9660_isdchar (int c);/*!   Return true if c is an ACHAR -    These are the DCHAR's plus some ASCII symbols including the space    symbol.   */bool iso9660_isachar (int c);/*!   Convert ISO-9660 file name that stored in a directory entry into    what's usually listed as the file name in a listing.   Lowercase name, and remove trailing ;1's or .;1's and   turn the other ;'s into version numbers.   The length of the translated string is returned.*/int iso9660_name_translate(const char *psz_oldname, char *psz_newname);/*!   Convert ISO-9660 file name that stored in a directory entry into   what's usually listed as the file name in a listing.  Lowercase   name if not using Joliet extension. Remove trailing ;1's or .;1's and   turn the other ;'s into version numbers.   The length of the translated string is returned.*/int iso9660_name_translate_ext(const char *old, char *new,                                uint8_t i_joliet_level);  /*!    Pad string src with spaces to size len and copy this to dst. If  len is less than the length of src, dst will be truncated to the  first len characters of src.  src can also be scanned to see if it contains only ACHARs, DCHARs,   7-bit ASCII chars depending on the enumeration _check.  In addition to getting changed, dst is the return value.  Note: this string might not be NULL terminated. */char *iso9660_strncpy_pad(char dst[], const char src[], size_t len,                           enum strncpy_pad_check _check);/*=====================================================================  file/dirname's ======================================================================*//*!  Check that pathname is a valid ISO-9660 directory name.  A valid directory name should not start out with a slash (/),   dot (.) or null byte, should be less than 37 characters long,   have no more than 8 characters in a directory component   which is separated by a /, and consist of only DCHARs.   True is returned if pathname is valid. */bool iso9660_dirname_valid_p (const char pathname[]);/*!    Take pathname and a version number and turn that into a ISO-9660  pathname.  (That's just the pathname followd by ";" and the version  number. For example, mydir/file.ext -> MYDIR/FILE.EXT;1 for version  1. The resulting ISO-9660 pathname is returned.*/char *iso9660_pathname_isofy (const char pathname[], uint16_t i_version);/*!  Check that pathname is a valid ISO-9660 pathname.    A valid pathname contains a valid directory name, if one appears and  the filename portion should be no more than 8 characters for the  file prefix and 3 characters in the extension (or portion after a  dot). There should be exactly one dot somewhere in the filename  portion and the filename should be composed of only DCHARs.    True is returned if pathname is valid. */bool iso9660_pathname_valid_p (const char pathname[]);/*=====================================================================  directory tree ======================================================================*/voidiso9660_dir_init_new (void *dir, uint32_t self, uint32_t ssize,                       uint32_t parent, uint32_t psize,                       const time_t *dir_time);voidiso9660_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);voidiso9660_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);unsigned int iso9660_dir_calc_record_size (unsigned int namelen, unsigned int su_len);/*!   Given a directory pointer, find the filesystem entry that contains   lsn and return information about it.   Returns stat_t of entry if we found lsn, or NULL otherwise. */iso9660_stat_t *iso9660_find_fs_lsn(CdIo *p_cdio, lsn_t i_lsn);/*!   Given a directory pointer, find the filesystem entry that contains   lsn and return information about it.   Returns stat_t of entry if we found lsn, or NULL otherwise. */iso9660_stat_t *iso9660_find_ifs_lsn(const iso9660_t *p_iso, lsn_t i_lsn);/*!  Get file status for pathname into stat. NULL is returned on error. */iso9660_stat_t *iso9660_fs_stat (CdIo *p_cdio, const char pathname[]);  /*!  Get file status for pathname into stat. NULL is returned on error.  pathname version numbers in the ISO 9660  name are dropped, i.e. ;1 is removed and if level 1 ISO-9660 names  are lowercased. */iso9660_stat_t *iso9660_fs_stat_translate (CdIo *p_cdio,                                            const char pathname[],                                            bool b_mode2);/*!  Get file status for pathname into stat. NULL is returned on error. */iso9660_stat_t *iso9660_ifs_stat (iso9660_t *p_iso, const char pathname[]);/*!  Get file status for pathname into stat. NULL is returned on error.  pathname version numbers in the ISO 9660  name are dropped, i.e. ;1 is removed and if level 1 ISO-9660 names  are lowercased. */iso9660_stat_t *iso9660_ifs_stat_translate (iso9660_t *p_iso,                                             const char pathname[]);/*!   Read pathname (a directory) and return a list of iso9660_stat_t  of the files inside that. The caller must free the returned result.*/CdioList * iso9660_fs_readdir (CdIo *p_cdio, const char pathname[],                                bool b_mode2);/*!   Read pathname (a directory) and return a list of iso9660_stat_t  of the files inside that. The caller must free the returned result.*/CdioList * iso9660_ifs_readdir (iso9660_t *p_iso, const char pathname[]);/*!  Return the PVD's application ID.  NULL is returned if there is some problem in getting this. */char * iso9660_get_application_id(iso9660_pvd_t *p_pvd);  /*!    Get the application ID.  psz_app_id is set to NULL if there  is some problem in getting this and false is returned.*/bool iso9660_ifs_get_application_id(iso9660_t *p_iso,                                    /*out*/ char **p_psz_app_id);/*!    Return the Joliet level recognized for p_iso.*/uint8_t iso9660_ifs_get_joliet_level(iso9660_t *p_iso);uint8_t iso9660_get_dir_len(const iso9660_dir_t *p_idr);#if FIXMEuint8_t iso9660_get_dir_size(const iso9660_dir_t *p_idr);lsn_t iso9660_get_dir_extent(const iso9660_dir_t *p_idr);#endif/*!  Return the directory name stored in the iso9660_dir_t  A string is allocated: the caller must deallocate.*/char * iso9660_dir_to_name (const iso9660_dir_t *p_iso9660_dir);  /*!   Return a string containing the preparer id with trailing   blanks removed.*/char *iso9660_get_preparer_id(const iso9660_pvd_t *p_pvd);  /*!    Get the preparer ID.  psz_preparer_id is set to NULL if there  is some problem in getting this and false is returned.*/bool iso9660_ifs_get_preparer_id(iso9660_t *p_iso,                                 /*out*/ char **p_psz_preparer_id);  /*!   Return a string containing the PVD's publisher id with trailing   blanks removed.*/char *iso9660_get_publisher_id(const iso9660_pvd_t *p_pvd);/*!    Get the publisher ID.  psz_publisher_id is set to NULL if there  is some problem in getting this and false is returned.*/bool iso9660_ifs_get_publisher_id(iso9660_t *p_iso,                                  /*out*/ char **p_psz_publisher_id);uint8_t iso9660_get_pvd_type(const iso9660_pvd_t *p_pvd);const char * iso9660_get_pvd_id(const iso9660_pvd_t *p_pvd);int iso9660_get_pvd_space_size(const iso9660_pvd_t *p_pvd);int iso9660_get_pvd_block_size(const iso9660_pvd_t *p_pvd) ;/*! Return the primary volume id version number (of pvd).    If there is an error 0 is returned.  */int iso9660_get_pvd_version(const iso9660_pvd_t *pvd) ;/*!   Return a string containing the PVD's system id with trailing   blanks removed.*/char *iso9660_get_system_id(const iso9660_pvd_t *p_pvd);  /*!    Get the system ID.  psz_system_id is set to NULL if there  is some problem in getting this and false is returned.*/bool iso9660_ifs_get_system_id(iso9660_t *p_iso,                                  /*out*/ char **p_psz_system_id);/*! Return the LSN of the root directory for pvd.    If there is an error CDIO_INVALID_LSN is returned.  */lsn_t iso9660_get_root_lsn(const iso9660_pvd_t *p_pvd);/*!  Return the PVD's volume ID.*/char *iso9660_get_volume_id(const iso9660_pvd_t *p_pvd);/*!    Get the system ID.  psz_system_id is set to NULL if there  is some problem in getting this and false is returned.*/bool iso9660_ifs_get_volume_id(iso9660_t *p_iso,                               /*out*/ char **p_psz_volume_id);/*!  Return the PVD's volumeset ID.  NULL is returned if there is some problem in getting this. */char *iso9660_get_volumeset_id(const iso9660_pvd_t *p_pvd);/*!    Get the systemset ID.  psz_systemset_id is set to NULL if there  is some problem in getting this and false is returned.*/bool iso9660_ifs_get_volumeset_id(iso9660_t *p_iso,                                  /*out*/ char **p_psz_volumeset_id);/* pathtable *//*! Zero's out pathable. Do this first. */void iso9660_pathtable_init (void *pt);unsigned int iso9660_pathtable_get_size (const void *pt);uint16_tiso9660_pathtable_l_add_entry (void *pt, const char name[], uint32_t extent,                               uint16_t parent);uint16_tiso9660_pathtable_m_add_entry (void *pt, const char name[], uint32_t extent,                               uint16_t parent);/*=====================================================================                 Volume Descriptors======================================================================*/voidiso9660_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);void iso9660_set_evd (void *pd);/*!  Return true if ISO 9660 image has extended attrributes (XA).*/bool iso9660_ifs_is_xa (const iso9660_t * p_iso);#ifdef __cplusplus}#endif /* __cplusplus */#endif /* __CDIO_ISO9660_H__ *//*  * Local variables: *  c-file-style: "gnu" *  tab-width: 8 *  indent-tabs-mode: nil * End: */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -