CDROM.py 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. # Generated by h2py from /usr/include/linux/cdrom.h
  2. # Included from linux/types.h
  3. # Included from asm/types.h
  4. # Included from asm-generic/int-ll64.h
  5. # Included from asm/bitsperlong.h
  6. # Included from asm-generic/bitsperlong.h
  7. __BITS_PER_LONG = 32
  8. __INT32_TYPE__ = int
  9. # Included from linux/posix_types.h
  10. # Included from linux/stddef.h
  11. __FD_SETSIZE = 1024
  12. # Included from asm/posix_types.h
  13. # Included from asm-generic/posix_types.h
  14. # Included from asm/byteorder.h
  15. # Included from linux/byteorder/big_endian.h
  16. __BIG_ENDIAN = 4321
  17. # Included from linux/swab.h
  18. # Included from asm/swab.h
  19. def __swab16(x): return \
  20. def __swab32(x): return \
  21. def __swab64(x): return \
  22. def __swahw32(x): return \
  23. def __swahb32(x): return \
  24. def __constant_htonl(x): return ((__be32)(__u32)(x))
  25. def __constant_ntohl(x): return ((__u32)(__be32)(x))
  26. def __constant_htons(x): return ((__be16)(__u16)(x))
  27. def __constant_ntohs(x): return ((__u16)(__be16)(x))
  28. def __constant_le64_to_cpu(x): return ___constant_swab64((__u64)(__le64)(x))
  29. def __constant_le32_to_cpu(x): return ___constant_swab32((__u32)(__le32)(x))
  30. def __constant_le16_to_cpu(x): return ___constant_swab16((__u16)(__le16)(x))
  31. def __constant_cpu_to_be64(x): return ((__be64)(__u64)(x))
  32. def __constant_be64_to_cpu(x): return ((__u64)(__be64)(x))
  33. def __constant_cpu_to_be32(x): return ((__be32)(__u32)(x))
  34. def __constant_be32_to_cpu(x): return ((__u32)(__be32)(x))
  35. def __constant_cpu_to_be16(x): return ((__be16)(__u16)(x))
  36. def __constant_be16_to_cpu(x): return ((__u16)(__be16)(x))
  37. def __le64_to_cpu(x): return __swab64((__u64)(__le64)(x))
  38. def __le32_to_cpu(x): return __swab32((__u32)(__le32)(x))
  39. def __le16_to_cpu(x): return __swab16((__u16)(__le16)(x))
  40. def __cpu_to_be64(x): return ((__be64)(__u64)(x))
  41. def __be64_to_cpu(x): return ((__u64)(__be64)(x))
  42. def __cpu_to_be32(x): return ((__be32)(__u32)(x))
  43. def __be32_to_cpu(x): return ((__u32)(__be32)(x))
  44. def __cpu_to_be16(x): return ((__be16)(__u16)(x))
  45. def __be16_to_cpu(x): return ((__u16)(__be16)(x))
  46. def __cpu_to_le64s(x): return __swab64s((x))
  47. def __le64_to_cpus(x): return __swab64s((x))
  48. def __cpu_to_le32s(x): return __swab32s((x))
  49. def __le32_to_cpus(x): return __swab32s((x))
  50. def __cpu_to_le16s(x): return __swab16s((x))
  51. def __le16_to_cpus(x): return __swab16s((x))
  52. # Included from linux/byteorder/little_endian.h
  53. __LITTLE_ENDIAN = 1234
  54. def __constant_ntohl(x): return ___constant_swab32((__be32)(x))
  55. def __constant_ntohs(x): return ___constant_swab16((__be16)(x))
  56. def __constant_cpu_to_le64(x): return ((__le64)(__u64)(x))
  57. def __constant_le64_to_cpu(x): return ((__u64)(__le64)(x))
  58. def __constant_cpu_to_le32(x): return ((__le32)(__u32)(x))
  59. def __constant_le32_to_cpu(x): return ((__u32)(__le32)(x))
  60. def __constant_cpu_to_le16(x): return ((__le16)(__u16)(x))
  61. def __constant_le16_to_cpu(x): return ((__u16)(__le16)(x))
  62. def __constant_be64_to_cpu(x): return ___constant_swab64((__u64)(__be64)(x))
  63. def __constant_be32_to_cpu(x): return ___constant_swab32((__u32)(__be32)(x))
  64. def __constant_be16_to_cpu(x): return ___constant_swab16((__u16)(__be16)(x))
  65. def __cpu_to_le64(x): return ((__le64)(__u64)(x))
  66. def __le64_to_cpu(x): return ((__u64)(__le64)(x))
  67. def __cpu_to_le32(x): return ((__le32)(__u32)(x))
  68. def __le32_to_cpu(x): return ((__u32)(__le32)(x))
  69. def __cpu_to_le16(x): return ((__le16)(__u16)(x))
  70. def __le16_to_cpu(x): return ((__u16)(__le16)(x))
  71. def __be64_to_cpu(x): return __swab64((__u64)(__be64)(x))
  72. def __be32_to_cpu(x): return __swab32((__u32)(__be32)(x))
  73. def __be16_to_cpu(x): return __swab16((__u16)(__be16)(x))
  74. def __cpu_to_be64s(x): return __swab64s((x))
  75. def __be64_to_cpus(x): return __swab64s((x))
  76. def __cpu_to_be32s(x): return __swab32s((x))
  77. def __be32_to_cpus(x): return __swab32s((x))
  78. def __cpu_to_be16s(x): return __swab16s((x))
  79. def __be16_to_cpus(x): return __swab16s((x))
  80. CDROMPAUSE = 0x5301
  81. CDROMRESUME = 0x5302
  82. CDROMPLAYMSF = 0x5303
  83. CDROMPLAYTRKIND = 0x5304
  84. CDROMREADTOCHDR = 0x5305
  85. CDROMREADTOCENTRY = 0x5306
  86. CDROMSTOP = 0x5307
  87. CDROMSTART = 0x5308
  88. CDROMEJECT = 0x5309
  89. CDROMVOLCTRL = 0x530a
  90. CDROMSUBCHNL = 0x530b
  91. CDROMREADMODE2 = 0x530c
  92. CDROMREADMODE1 = 0x530d
  93. CDROMREADAUDIO = 0x530e
  94. CDROMEJECT_SW = 0x530f
  95. CDROMMULTISESSION = 0x5310
  96. CDROM_GET_MCN = 0x5311
  97. CDROM_GET_UPC = CDROM_GET_MCN
  98. CDROMRESET = 0x5312
  99. CDROMVOLREAD = 0x5313
  100. CDROMREADRAW = 0x5314
  101. CDROMREADCOOKED = 0x5315
  102. CDROMSEEK = 0x5316
  103. CDROMPLAYBLK = 0x5317
  104. CDROMREADALL = 0x5318
  105. CDROMGETSPINDOWN = 0x531d
  106. CDROMSETSPINDOWN = 0x531e
  107. CDROMCLOSETRAY = 0x5319
  108. CDROM_SET_OPTIONS = 0x5320
  109. CDROM_CLEAR_OPTIONS = 0x5321
  110. CDROM_SELECT_SPEED = 0x5322
  111. CDROM_SELECT_DISC = 0x5323
  112. CDROM_MEDIA_CHANGED = 0x5325
  113. CDROM_DRIVE_STATUS = 0x5326
  114. CDROM_DISC_STATUS = 0x5327
  115. CDROM_CHANGER_NSLOTS = 0x5328
  116. CDROM_LOCKDOOR = 0x5329
  117. CDROM_DEBUG = 0x5330
  118. CDROM_GET_CAPABILITY = 0x5331
  119. CDROMAUDIOBUFSIZ = 0x5382
  120. DVD_READ_STRUCT = 0x5390
  121. DVD_WRITE_STRUCT = 0x5391
  122. DVD_AUTH = 0x5392
  123. CDROM_SEND_PACKET = 0x5393
  124. CDROM_NEXT_WRITABLE = 0x5394
  125. CDROM_LAST_WRITTEN = 0x5395
  126. CDROM_PACKET_SIZE = 12
  127. CGC_DATA_UNKNOWN = 0
  128. CGC_DATA_WRITE = 1
  129. CGC_DATA_READ = 2
  130. CGC_DATA_NONE = 3
  131. CD_MINS = 74
  132. CD_SECS = 60
  133. CD_FRAMES = 75
  134. CD_SYNC_SIZE = 12
  135. CD_MSF_OFFSET = 150
  136. CD_CHUNK_SIZE = 24
  137. CD_NUM_OF_CHUNKS = 98
  138. CD_FRAMESIZE_SUB = 96
  139. CD_HEAD_SIZE = 4
  140. CD_SUBHEAD_SIZE = 8
  141. CD_EDC_SIZE = 4
  142. CD_ZERO_SIZE = 8
  143. CD_ECC_SIZE = 276
  144. CD_FRAMESIZE = 2048
  145. CD_FRAMESIZE_RAW = 2352
  146. CD_FRAMESIZE_RAWER = 2646
  147. CD_FRAMESIZE_RAW1 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE)
  148. CD_FRAMESIZE_RAW0 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE)
  149. CD_XA_HEAD = (CD_HEAD_SIZE+CD_SUBHEAD_SIZE)
  150. CD_XA_TAIL = (CD_EDC_SIZE+CD_ECC_SIZE)
  151. CD_XA_SYNC_HEAD = (CD_SYNC_SIZE+CD_XA_HEAD)
  152. CDROM_LBA = 0x01
  153. CDROM_MSF = 0x02
  154. CDROM_DATA_TRACK = 0x04
  155. CDROM_LEADOUT = 0xAA
  156. CDROM_AUDIO_INVALID = 0x00
  157. CDROM_AUDIO_PLAY = 0x11
  158. CDROM_AUDIO_PAUSED = 0x12
  159. CDROM_AUDIO_COMPLETED = 0x13
  160. CDROM_AUDIO_ERROR = 0x14
  161. CDROM_AUDIO_NO_STATUS = 0x15
  162. CDC_CLOSE_TRAY = 0x1
  163. CDC_OPEN_TRAY = 0x2
  164. CDC_LOCK = 0x4
  165. CDC_SELECT_SPEED = 0x8
  166. CDC_SELECT_DISC = 0x10
  167. CDC_MULTI_SESSION = 0x20
  168. CDC_MCN = 0x40
  169. CDC_MEDIA_CHANGED = 0x80
  170. CDC_PLAY_AUDIO = 0x100
  171. CDC_RESET = 0x200
  172. CDC_DRIVE_STATUS = 0x800
  173. CDC_GENERIC_PACKET = 0x1000
  174. CDC_CD_R = 0x2000
  175. CDC_CD_RW = 0x4000
  176. CDC_DVD = 0x8000
  177. CDC_DVD_R = 0x10000
  178. CDC_DVD_RAM = 0x20000
  179. CDC_MO_DRIVE = 0x40000
  180. CDC_MRW = 0x80000
  181. CDC_MRW_W = 0x100000
  182. CDC_RAM = 0x200000
  183. CDS_NO_INFO = 0
  184. CDS_NO_DISC = 1
  185. CDS_TRAY_OPEN = 2
  186. CDS_DRIVE_NOT_READY = 3
  187. CDS_DISC_OK = 4
  188. CDS_AUDIO = 100
  189. CDS_DATA_1 = 101
  190. CDS_DATA_2 = 102
  191. CDS_XA_2_1 = 103
  192. CDS_XA_2_2 = 104
  193. CDS_MIXED = 105
  194. CDO_AUTO_CLOSE = 0x1
  195. CDO_AUTO_EJECT = 0x2
  196. CDO_USE_FFLAGS = 0x4
  197. CDO_LOCK = 0x8
  198. CDO_CHECK_TYPE = 0x10
  199. CD_PART_MAX = 64
  200. CD_PART_MASK = (CD_PART_MAX - 1)
  201. GPCMD_BLANK = 0xa1
  202. GPCMD_CLOSE_TRACK = 0x5b
  203. GPCMD_FLUSH_CACHE = 0x35
  204. GPCMD_FORMAT_UNIT = 0x04
  205. GPCMD_GET_CONFIGURATION = 0x46
  206. GPCMD_GET_EVENT_STATUS_NOTIFICATION = 0x4a
  207. GPCMD_GET_PERFORMANCE = 0xac
  208. GPCMD_INQUIRY = 0x12
  209. GPCMD_LOAD_UNLOAD = 0xa6
  210. GPCMD_MECHANISM_STATUS = 0xbd
  211. GPCMD_MODE_SELECT_10 = 0x55
  212. GPCMD_MODE_SENSE_10 = 0x5a
  213. GPCMD_PAUSE_RESUME = 0x4b
  214. GPCMD_PLAY_AUDIO_10 = 0x45
  215. GPCMD_PLAY_AUDIO_MSF = 0x47
  216. GPCMD_PLAY_AUDIO_TI = 0x48
  217. GPCMD_PLAY_CD = 0xbc
  218. GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1e
  219. GPCMD_READ_10 = 0x28
  220. GPCMD_READ_12 = 0xa8
  221. GPCMD_READ_BUFFER = 0x3c
  222. GPCMD_READ_BUFFER_CAPACITY = 0x5c
  223. GPCMD_READ_CDVD_CAPACITY = 0x25
  224. GPCMD_READ_CD = 0xbe
  225. GPCMD_READ_CD_MSF = 0xb9
  226. GPCMD_READ_DISC_INFO = 0x51
  227. GPCMD_READ_DVD_STRUCTURE = 0xad
  228. GPCMD_READ_FORMAT_CAPACITIES = 0x23
  229. GPCMD_READ_HEADER = 0x44
  230. GPCMD_READ_TRACK_RZONE_INFO = 0x52
  231. GPCMD_READ_SUBCHANNEL = 0x42
  232. GPCMD_READ_TOC_PMA_ATIP = 0x43
  233. GPCMD_REPAIR_RZONE_TRACK = 0x58
  234. GPCMD_REPORT_KEY = 0xa4
  235. GPCMD_REQUEST_SENSE = 0x03
  236. GPCMD_RESERVE_RZONE_TRACK = 0x53
  237. GPCMD_SEND_CUE_SHEET = 0x5d
  238. GPCMD_SCAN = 0xba
  239. GPCMD_SEEK = 0x2b
  240. GPCMD_SEND_DVD_STRUCTURE = 0xbf
  241. GPCMD_SEND_EVENT = 0xa2
  242. GPCMD_SEND_KEY = 0xa3
  243. GPCMD_SEND_OPC = 0x54
  244. GPCMD_SET_READ_AHEAD = 0xa7
  245. GPCMD_SET_STREAMING = 0xb6
  246. GPCMD_START_STOP_UNIT = 0x1b
  247. GPCMD_STOP_PLAY_SCAN = 0x4e
  248. GPCMD_TEST_UNIT_READY = 0x00
  249. GPCMD_VERIFY_10 = 0x2f
  250. GPCMD_WRITE_10 = 0x2a
  251. GPCMD_WRITE_12 = 0xaa
  252. GPCMD_WRITE_AND_VERIFY_10 = 0x2e
  253. GPCMD_WRITE_BUFFER = 0x3b
  254. GPCMD_SET_SPEED = 0xbb
  255. GPCMD_PLAYAUDIO_TI = 0x48
  256. GPCMD_GET_MEDIA_STATUS = 0xda
  257. GPMODE_VENDOR_PAGE = 0x00
  258. GPMODE_R_W_ERROR_PAGE = 0x01
  259. GPMODE_WRITE_PARMS_PAGE = 0x05
  260. GPMODE_WCACHING_PAGE = 0x08
  261. GPMODE_AUDIO_CTL_PAGE = 0x0e
  262. GPMODE_POWER_PAGE = 0x1a
  263. GPMODE_FAULT_FAIL_PAGE = 0x1c
  264. GPMODE_TO_PROTECT_PAGE = 0x1d
  265. GPMODE_CAPABILITIES_PAGE = 0x2a
  266. GPMODE_ALL_PAGES = 0x3f
  267. GPMODE_CDROM_PAGE = 0x0d
  268. DVD_STRUCT_PHYSICAL = 0x00
  269. DVD_STRUCT_COPYRIGHT = 0x01
  270. DVD_STRUCT_DISCKEY = 0x02
  271. DVD_STRUCT_BCA = 0x03
  272. DVD_STRUCT_MANUFACT = 0x04
  273. DVD_LAYERS = 4
  274. DVD_LU_SEND_AGID = 0
  275. DVD_HOST_SEND_CHALLENGE = 1
  276. DVD_LU_SEND_KEY1 = 2
  277. DVD_LU_SEND_CHALLENGE = 3
  278. DVD_HOST_SEND_KEY2 = 4
  279. DVD_AUTH_ESTABLISHED = 5
  280. DVD_AUTH_FAILURE = 6
  281. DVD_LU_SEND_TITLE_KEY = 7
  282. DVD_LU_SEND_ASF = 8
  283. DVD_INVALIDATE_AGID = 9
  284. DVD_LU_SEND_RPC_STATE = 10
  285. DVD_HOST_SEND_RPC_STATE = 11
  286. DVD_CPM_NO_COPYRIGHT = 0
  287. DVD_CPM_COPYRIGHTED = 1
  288. DVD_CP_SEC_NONE = 0
  289. DVD_CP_SEC_EXIST = 1
  290. DVD_CGMS_UNRESTRICTED = 0
  291. DVD_CGMS_SINGLE = 2
  292. DVD_CGMS_RESTRICTED = 3
  293. CDF_RWRT = 0x0020
  294. CDF_HWDM = 0x0024
  295. CDF_MRW = 0x0028
  296. CDM_MRW_NOTMRW = 0
  297. CDM_MRW_BGFORMAT_INACTIVE = 1
  298. CDM_MRW_BGFORMAT_ACTIVE = 2
  299. CDM_MRW_BGFORMAT_COMPLETE = 3
  300. MRW_LBA_DMA = 0
  301. MRW_LBA_GAA = 1
  302. MRW_MODE_PC_PRE1 = 0x2c
  303. MRW_MODE_PC = 0x03