Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00025 #ifndef __CDIO_MMC_UTIL_H__
00026 #define __CDIO_MMC_UTIL_H__
00027
00028 #include <cdio/device.h>
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033
00036 typedef enum {
00037 CDIO_MMC_FEATURE_PROF_NON_REMOVABLE = 0x0001,
00039 CDIO_MMC_FEATURE_PROF_REMOVABLE = 0x0002,
00041 CDIO_MMC_FEATURE_PROF_MO_ERASABLE = 0x0003,
00044 CDIO_MMC_FEATURE_PROF_MO_WRITE_ONCE = 0x0004,
00046 CDIO_MMC_FEATURE_PROF_AS_MO = 0x0005,
00048 CDIO_MMC_FEATURE_PROF_CD_ROM = 0x0008,
00050 CDIO_MMC_FEATURE_PROF_CD_R = 0x0009,
00052 CDIO_MMC_FEATURE_PROF_CD_RW = 0x000A,
00055 CDIO_MMC_FEATURE_PROF_DVD_ROM = 0x0010,
00056 CDIO_MMC_FEATURE_PROF_DVD_R_SEQ = 0x0011,
00058 CDIO_MMC_FEATURE_PROF_DVD_RAM = 0x0012,
00059 CDIO_MMC_FEATURE_PROF_DVD_RW_RO = 0x0013,
00061 CDIO_MMC_FEATURE_PROF_DVD_RW_SEQ = 0x0014,
00063 CDIO_MMC_FEATURE_PROF_DVD_R_DL_SEQ = 0x0015,
00065 CDIO_MMC_FEATURE_PROF_DVD_R_DL_JR = 0x0016,
00067 CDIO_MMC_FEATURE_PROF_DVD_PRW = 0x001A,
00068 CDIO_MMC_FEATURE_PROF_DVD_PR = 0x001B,
00069 CDIO_MMC_FEATURE_PROF_DDCD_ROM = 0x0020,
00070 CDIO_MMC_FEATURE_PROF_DDCD_R = 0x0021,
00071 CDIO_MMC_FEATURE_PROF_DDCD_RW = 0x0022,
00072 CDIO_MMC_FEATURE_PROF_DVD_PRW_DL = 0x002A,
00073 CDIO_MMC_FEATURE_PROF_DVD_PR_DL = 0x002B,
00076 CDIO_MMC_FEATURE_PROF_BD_ROM = 0x0040,
00077 CDIO_MMC_FEATURE_PROF_BD_SEQ = 0x0041,
00079 CDIO_MMC_FEATURE_PROF_BD_R_RANDOM = 0x0042,
00080 CDIO_MMC_FEATURE_PROF_BD_RE = 0x0043,
00082 CDIO_MMC_FEATURE_PROF_HD_DVD_ROM = 0x0050,
00083 CDIO_MMC_FEATURE_PROF_HD_DVD_R = 0x0051,
00084 CDIO_MMC_FEATURE_PROF_HD_DVD_RAM = 0x0052,
00086 CDIO_MMC_FEATURE_PROF_NON_CONFORM = 0xFFFF,
00088 } cdio_mmc_feature_profile_t;
00089
00094 const char *mmc_feature2str( int i_feature );
00095
00104 void mmc_get_drive_cap ( CdIo_t *p_cdio,
00105 cdio_drive_read_cap_t *p_read_cap,
00106 cdio_drive_write_cap_t *p_write_cap,
00107 cdio_drive_misc_cap_t *p_misc_cap);
00108
00112 const char *mmc_feature_profile2str( int i_feature_profile );
00113
00114 bool mmc_is_disctype_bd(cdio_mmc_feature_profile_t disctype);
00115 bool mmc_is_disctype_cdrom(cdio_mmc_feature_profile_t disctype);
00116 bool mmc_is_disctype_dvd(cdio_mmc_feature_profile_t disctype);
00117 bool mmc_is_disctype_hd_dvd (cdio_mmc_feature_profile_t disctype);
00118 bool mmc_is_disctype_overwritable (cdio_mmc_feature_profile_t disctype);
00119 bool mmc_is_disctype_rewritable(cdio_mmc_feature_profile_t disctype);
00120
00122 #define MMC_READ_TIMEOUT_DEFAULT 3*60*1000
00123
00128 extern uint32_t mmc_read_timeout_ms;
00129
00133 extern const char mmc_sense_key2str[16][40];
00134
00138 #define MMC_TIMEOUT_DEFAULT 6000
00139
00144 extern uint32_t mmc_timeout_ms;
00145
00146 #ifdef __cplusplus
00147 }
00148 #endif
00149
00150 #endif
00151
00152
00153
00154
00155
00156
00157