Changeset 6112 in vbox for trunk/include
- Timestamp:
- Dec 17, 2007 11:30:50 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmifs.h
r6087 r6112 94 94 /** PDMIBLOCKASYNCPORT - Asynchronous version of the block interface (Up) Coupled with PDMINTERFACE_BLOCK_ASYNC. */ 95 95 PDMINTERFACE_BLOCK_ASYNC_PORT, 96 /** PDMITRANSPORTASYNC - Transport data asynchronous to their target (Down) Coupled with PDMINTERFACE_TRANSPORT_ASYNC_PORT. */ 97 PDMINTERFACE_TRANSPORT_ASYNC, 98 /** PDMITRANSPORTASYNCPORT - Transport data asynchronous to their target (Up) Coupled with PDMINTERFACE_TRANSPORT_ASYNC. */ 99 PDMINTERFACE_TRANSPORT_ASYNC_PORT, 100 96 101 97 102 /** PDMINETWORKPORT - The network port interface. (Down) Coupled with PDMINTERFACE_NETWORK_CONNECTOR. */ … … 1159 1164 * @thread Any thread. 1160 1165 */ 1161 DECLR3CALLBACKMEMBER(int, pfn ReadStart,(PPDMIBLOCKASYNC pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser));1166 DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIBLOCKASYNC pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser)); 1162 1167 1163 1168 /** … … 1172 1177 * @thread Any thread. 1173 1178 */ 1174 DECLR3CALLBACKMEMBER(int, pfn WriteStart,(PPDMIBLOCKASYNC pInterface, uint64_t off, const void *pvBuf, size_t cbWrite, void *pvUser));1179 DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIBLOCKASYNC pInterface, uint64_t off, const void *pvBuf, size_t cbWrite, void *pvUser)); 1175 1180 1176 1181 /** … … 1223 1228 } PDMIBLOCKASYNC; 1224 1229 1225 1226 1227 /** 1228 * Pointer to a async media notify interface. 1230 /** Notification interface for completed I/O tasks. 1229 1231 * Pair with PDMIMEDIAASYNC. 1230 1232 */ 1233 1234 /** Pointer to a asynchronous notification interface. */ 1231 1235 typedef struct PDMIMEDIAASYNCPORT *PPDMIMEDIAASYNCPORT; 1232 1236 1233 1237 /** 1234 * Notification interface for completed I/O tasks.1235 * Pair with PDMIMEDIAASYNC.1238 * Asynchronous media interface. 1239 * Makes up the fundation for PDMIBLOCKASYNC and PDMIBLOCKBIOS. 1236 1240 */ 1237 1241 typedef struct PDMIMEDIAASYNCPORT … … 1264 1268 } PDMIMEDIAASYNCPORT; 1265 1269 1270 /** Pointer to a asynchronous media interface. */ 1271 typedef struct PDMIMEDIAASYNC *PPDMIMEDIAASYNC; 1272 1273 /** 1274 * Asynchronous media interface. 1275 * Makes up the fundation for PDMIBLOCKASYNC and PDMIBLOCKBIOS. 1276 */ 1277 typedef struct PDMIMEDIAASYNC 1278 { 1279 /** 1280 * Start reading task. 1281 * 1282 * @returns VBox status code. 1283 * @param pInterface Pointer to the interface structure containing the called function pointer. 1284 * @param off Offset to start reading from. 1285 * @param pvBuf Where to store the read bits. 1286 * @param cbRead Number of bytes to read. 1287 * @param pvUser User data. 1288 * @thread Any thread. 1289 */ 1290 DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIMEDIAASYNC pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser)); 1291 1292 /** 1293 * Start writing task. 1294 * 1295 * @returns VBox status code. 1296 * @param pInterface Pointer to the interface structure containing the called function pointer. 1297 * @param off Offset to start writing at. 1298 * @param pvBuf Where to store the write bits. 1299 * @param cbWrite Number of bytes to write. 1300 * @param pvUser User data. 1301 * @thread Any thread. 1302 */ 1303 DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIMEDIAASYNC pInterface, uint64_t off, const void *pvBuf, size_t cbWrite, void *pvUser)); 1304 1305 /** 1306 * Make sure that the bits written are actually on the storage medium. 1307 * 1308 * @returns VBox status code. 1309 * @param pInterface Pointer to the interface structure containing the called function pointer. 1310 * @thread Any thread. 1311 */ 1312 DECLR3CALLBACKMEMBER(int, pfnFlush,(PPDMIMEDIAASYNC pInterface)); 1313 1314 /** 1315 * Get the media size in bytes. 1316 * 1317 * @returns Media size in bytes. 1318 * @param pInterface Pointer to the interface structure containing the called function pointer. 1319 * @thread Any thread. 1320 */ 1321 DECLR3CALLBACKMEMBER(uint64_t, pfnGetSize,(PPDMIMEDIAASYNC pInterface)); 1322 1323 /** 1324 * Check if the media is readonly or not. 1325 * 1326 * @returns true if readonly. 1327 * @returns false if read/write. 1328 * @param pInterface Pointer to the interface structure containing the called function pointer. 1329 * @thread Any thread. 1330 */ 1331 DECLR3CALLBACKMEMBER(bool, pfnIsReadOnly,(PPDMIMEDIAASYNC pInterface)); 1332 1333 /** 1334 * Get stored media geometry - BIOS property. 1335 * This is an optional feature of a media. 1336 * 1337 * @returns VBox status code. 1338 * @returns VERR_NOT_IMPLEMENTED if the media doesn't support storing the geometry. 1339 * @returns VERR_PDM_GEOMETRY_NOT_SET if the geometry hasn't been set using pfnBiosSetGeometry() yet. 1340 * @param pInterface Pointer to the interface structure containing the called function pointer. 1341 * @param pcCylinders Number of cylinders. 1342 * @param pcHeads Number of heads. 1343 * @param pcSectors Number of sectors. This number is 1-based. 1344 * @remark This have no influence on the read/write operations. 1345 * @thread Any thread. 1346 */ 1347 DECLR3CALLBACKMEMBER(int, pfnBiosGetGeometry,(PPDMIMEDIAASYNC pInterface, uint32_t *pcCylinders, uint32_t *pcHeads, uint32_t *pcSectors)); 1348 1349 /** 1350 * Store the media geometry - BIOS property. 1351 * This is an optional feature of a media. 1352 * 1353 * @returns VBox status code. 1354 * @returns VERR_NOT_IMPLEMENTED if the media doesn't support storing the geometry. 1355 * @param pInterface Pointer to the interface structure containing the called function pointer. 1356 * @param cCylinders Number of cylinders. 1357 * @param cHeads Number of heads. 1358 * @param cSectors Number of sectors. This number is 1-based. 1359 * @remark This have no influence on the read/write operations. 1360 * @thread The emulation thread. 1361 */ 1362 DECLR3CALLBACKMEMBER(int, pfnBiosSetGeometry,(PPDMIMEDIAASYNC pInterface, uint32_t cCylinders, uint32_t cHeads, uint32_t cSectors)); 1363 1364 /** 1365 * Get stored geometry translation mode - BIOS property. 1366 * This is an optional feature of a media. 1367 * 1368 * @returns VBox status code. 1369 * @returns VERR_NOT_IMPLEMENTED if the media doesn't support storing the geometry translation mode. 1370 * @returns VERR_PDM_TRANSLATION_NOT_SET if the translation hasn't been set using pfnBiosSetTranslation() yet. 1371 * @param pInterface Pointer to the interface structure containing the called function pointer. 1372 * @param penmTranslation Where to store the translation type. 1373 * @remark This have no influence on the read/write operations. 1374 * @thread Any thread. 1375 */ 1376 DECLR3CALLBACKMEMBER(int, pfnBiosGetTranslation,(PPDMIMEDIAASYNC pInterface, PPDMBIOSTRANSLATION penmTranslation)); 1377 1378 /** 1379 * Store media geometry - BIOS property. 1380 * This is an optional feature of a media. 1381 * 1382 * @returns VBox status code. 1383 * @returns VERR_NOT_IMPLEMENTED if the media doesn't support storing the geometry. 1384 * @param pInterface Pointer to the interface structure containing the called function pointer. 1385 * @param enmTranslation The translation type. 1386 * @remark This have no influence on the read/write operations. 1387 * @thread The emulation thread. 1388 */ 1389 DECLR3CALLBACKMEMBER(int, pfnBiosSetTranslation,(PPDMIMEDIAASYNC pInterface, PDMBIOSTRANSLATION enmTranslation)); 1390 1391 /** 1392 * Gets the UUID of the media drive. 1393 * 1394 * @returns VBox status code. 1395 * @param pInterface Pointer to the interface structure containing the called function pointer. 1396 * @param pUuid Where to store the UUID on success. 1397 * @thread Any thread. 1398 */ 1399 DECLR3CALLBACKMEMBER(int, pfnGetUuid,(PPDMIMEDIAASYNC pInterface, PRTUUID pUuid)); 1400 1401 } PDMIMEDIAASYNC; 1402 1403 /** 1404 * Pointer to a async media notify interface. 1405 * Pair with PDMITRANSPORTASYNC. 1406 */ 1407 typedef struct PDMITRANSPORTASYNCPORT *PPDMITRANSPORTASYNCPORT; 1408 1409 /** 1410 * Notification interface for completed I/O tasks. 1411 * Pair with PDMITRANSPORTASYNC. 1412 */ 1413 typedef struct PDMITRANSPORTASYNCPORT 1414 { 1415 /** 1416 * Notify completion of a read task. 1417 * 1418 * @returns VBox status code. 1419 * @param pInterface Pointer to the interface structure containing the called function pointer. 1420 * @param uOffset Offset the task read from. 1421 * @param pvBuf The buffer containig the read data. 1422 * @param cbRead Number of bytes read. 1423 * @param pvUser The user argument given in pfnStartRead. 1424 * @thread Any thread. 1425 */ 1426 DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMITRANSPORTASYNCPORT pInterface, uint64_t uOffset, void *pvBuf, size_t cbRead, void *pvUser)); 1427 1428 /** 1429 * Notify completion of a write task. 1430 * 1431 * @returns VBox status code. 1432 * @param pInterface Pointer to the interface structure containing the called function pointer. 1433 * @param uOffset Offset the task has written to. 1434 * @param pvBuf The buffer containig the written data. 1435 * @param cbWritten Number of bytes actually written. 1436 * @param pvUser The user argument given in pfnStartWrite. 1437 * @thread Any thread. 1438 */ 1439 DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMITRANSPORTASYNCPORT pInterface, uint64_t uOffset, void *pvBuf, size_t cbWritten, void *pvUser)); 1440 } PDMITRANSPORTASYNCPORT; 1441 1266 1442 /** Pointer to a async media interface. */ 1267 typedef struct PDMI MEDIAASYNC *PPDMIMEDIAASYNC;1268 /** 1269 * Asynchronous Mediainterface.1270 * Makes up the fundation for PDMI BLOCKASYNC and PDMIBLOCKBIOS.1271 */ 1272 typedef struct PDMI MEDIAASYNC1443 typedef struct PDMITRANSPORTASYNC *PPDMITRANSPORTASYNC; 1444 /** 1445 * Asynchronous transport interface. 1446 * Makes up the fundation for PDMIMEDIAASYNC. 1447 */ 1448 typedef struct PDMITRANSPORTASYNC 1273 1449 { 1274 1450 /** … … 1284 1460 * @thread Any thread. 1285 1461 */ 1286 DECLR3CALLBACKMEMBER(int, pfnReadSynchronous, (PPDMI MEDIAASYNC pInterface, uint64_t uOffset, void *pvBuf, size_t cbRead, size_t *pcbRead));1462 DECLR3CALLBACKMEMBER(int, pfnReadSynchronous, (PPDMITRANSPORTASYNC pInterface, uint64_t uOffset, void *pvBuf, size_t cbRead, size_t *pcbRead)); 1287 1463 1288 1464 /** … … 1298 1474 * @thread Any thread. 1299 1475 */ 1300 DECLR3CALLBACKMEMBER(int, pfnWriteSynchronous, (PPDMI MEDIAASYNC pInterface, uint64_t uOffset, void *pvBuf, size_t cbWrite, size_t *pcbWritten));1476 DECLR3CALLBACKMEMBER(int, pfnWriteSynchronous, (PPDMITRANSPORTASYNC pInterface, uint64_t uOffset, void *pvBuf, size_t cbWrite, size_t *pcbWritten)); 1301 1477 1302 1478 /** … … 1311 1487 * @thread Any thread. 1312 1488 */ 1313 DECLR3CALLBACKMEMBER(int, pfnReadStartAsynchronous,(PPDMI MEDIAASYNC pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser));1489 DECLR3CALLBACKMEMBER(int, pfnReadStartAsynchronous,(PPDMITRANSPORTASYNC pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser)); 1314 1490 1315 1491 /** … … 1324 1500 * @thread Any thread. 1325 1501 */ 1326 DECLR3CALLBACKMEMBER(int, pfnWriteStartAsynchronous,(PPDMI MEDIAASYNC pInterface, uint64_t off, const void *pvBuf, size_t cbWrite, void *pvUser));1502 DECLR3CALLBACKMEMBER(int, pfnWriteStartAsynchronous,(PPDMITRANSPORTASYNC pInterface, uint64_t off, const void *pvBuf, size_t cbWrite, void *pvUser)); 1327 1503 1328 1504 /** … … 1334 1510 * @thread Any thread. 1335 1511 */ 1336 DECLR3CALLBACKMEMBER(int, pfnFlushSynchronous,(PPDMI MEDIAASYNC pInterface));1512 DECLR3CALLBACKMEMBER(int, pfnFlushSynchronous,(PPDMITRANSPORTASYNC pInterface)); 1337 1513 1338 1514 /** … … 1343 1519 * @thread Any thread. 1344 1520 */ 1345 DECLR3CALLBACKMEMBER(uint64_t, pfnGetSize,(PPDMI MEDIAASYNC pInterface));1521 DECLR3CALLBACKMEMBER(uint64_t, pfnGetSize,(PPDMITRANSPORTASYNC pInterface)); 1346 1522 1347 1523 /** … … 1353 1529 * @thread Any thread. 1354 1530 */ 1355 DECLR3CALLBACKMEMBER(bool, pfnIsReadOnly,(PPDMIMEDIAASYNC pInterface)); 1356 1357 } PDMIMEDIAASYNC; 1531 DECLR3CALLBACKMEMBER(bool, pfnIsReadOnly,(PPDMITRANSPORTASYNC pInterface)); 1532 1533 /** 1534 * Opens the data source. 1535 * 1536 * @returns VBox status code. 1537 * @param pInterface Pointer to the interface structure containing the called function pointer. 1538 * @param pszPath The path to open. 1539 * @param fReadonly If the target shoudl opened readonly. 1540 * @thread Any thread. 1541 */ 1542 DECLR3CALLBACKMEMBER(int, pfnOpen, (PPDMITRANSPORTASYNC pInterface, const char *pszTargetPath, bool fReadonly)); 1543 1544 /** 1545 * Close the data source. 1546 * 1547 * @returns VBox status code. 1548 * @param pInterface Pointer to the interface structure containing the called function pointer. 1549 * @thread Any thread. 1550 */ 1551 DECLR3CALLBACKMEMBER(int, pfnClose, (PPDMITRANSPORTASYNC pInterface)); 1552 1553 } PDMITRANSPORTASYNC; 1358 1554 1359 1555 /** @name Bit mask definitions for status line type
Note:
See TracChangeset
for help on using the changeset viewer.