Changeset 25971 in vbox
- Timestamp:
- Jan 22, 2010 12:54:19 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56826
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmifs.h
r25969 r25971 46 46 * @{ 47 47 */ 48 /** PDMIKEYBOARDPORT - The keyboard port interface. (Down) Coupled with PDMINTERFACE_KEYBOARD_CONNECTOR. */49 #define PDMINTERFACE_KEYBOARD_PORT "2a0844f0-410b-40ab-a6ed-6575f3aa3e29"50 /** PDMIKEYBOARDCONNECTOR - The keyboard connector interface. (Up) Coupled with PDMINTERFACE_KEYBOARD_PORT. */51 #define PDMINTERFACE_KEYBOARD_CONNECTOR "db3f7bd5-953e-436f-9f8e-077905a92d82"52 /** PDMIDISPLAYPORT - The display port interface. (Down) Coupled with PDMINTERFACE_DISPLAY_CONNECTOR. */53 #define PDMINTERFACE_DISPLAY_PORT "48bbcb6b-ba43-449b-9248-b8bb09929771"54 /** PDMIDISPLAYCONNECTOR - The display connector interface. (Up) Coupled with PDMINTERFACE_DISPLAY_PORT. */55 #define PDMINTERFACE_DISPLAY_CONNECTOR "c7a1b36d-8dfc-421d-b71f-3a0eeaf733e6"56 /** PDMICHARPORT - The char notify interface. (Down) Coupled with PDMINTERFACE_CHAR. */57 #define PDMINTERFACE_CHAR_PORT "22769834-ea8b-4a6d-ade1-213dcdbd1228"58 /** PDMICHAR - The char driver interface. (Up) Coupled with PDMINTERFACE_CHAR_PORT. */59 #define PDMINTERFACE_CHAR "4ad5c190-b408-4cef-926f-fbffce0dc5cc"60 48 /** PDMISTREAM - The stream driver interface (Up) No coupling. 61 49 * Used by a char driver to implement PDMINTERFACE_CHAR. */ … … 147 135 /** PDMISCSICONNECTOR - The SCSI command execution connector interface (Up) Coupled with PDMINTERFACE_SCSI_PORT. */ 148 136 #define PDMINTERFACE_SCSI_CONNECTOR "94465fbd-a2f2-447e-88c9-7366421bfbfe" 149 /** PDMDDISPLAYVBVACALLBACKS - The Display VBVA callbacks. */150 #define PDMINTERFACE_DISPLAY_VBVA_CALLBACKS "b78b81d2-c821-4e66-96ff-dbafa76343a5"151 137 /** @} */ 152 138 … … 250 236 typedef struct PDMIKEYBOARDPORT *PPDMIKEYBOARDPORT; 251 237 /** 252 * Keyboard port interface .238 * Keyboard port interface (down). 253 239 * Pair with PDMIKEYBOARDCONNECTOR. 254 240 */ … … 267 253 DECLR3CALLBACKMEMBER(int, pfnPutEvent,(PPDMIKEYBOARDPORT pInterface, uint8_t u8KeyCode)); 268 254 } PDMIKEYBOARDPORT; 255 /** PDMIKEYBOARDPORT interface ID. */ 256 #define PDMIKEYBOARDPORT_IID "2a0844f0-410b-40ab-a6ed-6575f3aa3e29" 257 269 258 270 259 /** … … 285 274 /** Pointer to keyboard connector interface. */ 286 275 typedef struct PDMIKEYBOARDCONNECTOR *PPDMIKEYBOARDCONNECTOR; 287 288 289 /** 290 * Keyboard connector interface. 276 /** 277 * Keyboard connector interface (up). 291 278 * Pair with PDMIKEYBOARDPORT 292 279 */ … … 302 289 303 290 } PDMIKEYBOARDCONNECTOR; 291 /** PDMIKEYBOARDCONNECTOR interface ID. */ 292 #define PDMIKEYBOARDCONNECTOR_IID "db3f7bd5-953e-436f-9f8e-077905a92d82" 304 293 305 294 … … 308 297 typedef struct PDMIDISPLAYPORT *PPDMIDISPLAYPORT; 309 298 /** 310 * Display port interface .299 * Display port interface (down). 311 300 * Pair with PDMIDISPLAYCONNECTOR. 312 301 */ … … 436 425 437 426 } PDMIDISPLAYPORT; 427 /** PDMIDISPLAYPORT interface ID. */ 428 #define PDMIDISPLAYPORT_IID "48bbcb6b-ba43-449b-9248-b8bb09929771" 438 429 439 430 … … 447 438 typedef struct PDMIDISPLAYCONNECTOR *PPDMIDISPLAYCONNECTOR; 448 439 /** 449 * Display connector interface .440 * Display connector interface (up). 450 441 * Pair with PDMIDISPLAYPORT. 451 442 */ … … 661 652 /** @} */ 662 653 } PDMIDISPLAYCONNECTOR; 663 654 /** PDMIDISPLAYCONNECTOR interface ID. */ 655 #define PDMIDISPLAYCONNECTOR_IID "c7a1b36d-8dfc-421d-b71f-3a0eeaf733e6" 664 656 665 657 … … 1425 1417 1426 1418 1427 /** @name Bit mask definitions for status line type1428 * @{ */1429 #define PDM_ICHAR_STATUS_LINES_DCD RT_BIT(0)1430 #define PDM_ICHAR_STATUS_LINES_RI RT_BIT(1)1431 #define PDM_ICHAR_STATUS_LINES_DSR RT_BIT(2)1432 #define PDM_ICHAR_STATUS_LINES_CTS RT_BIT(3)1433 /** @} */1434 1435 1419 /** Pointer to a char port interface. */ 1436 1420 typedef struct PDMICHARPORT *PPDMICHARPORT; 1437 1421 /** 1438 * Char port interface .1439 * Pair with PDMICHAR .1422 * Char port interface (down). 1423 * Pair with PDMICHARCONNECTOR. 1440 1424 */ 1441 1425 typedef struct PDMICHARPORT … … 1471 1455 DECLR3CALLBACKMEMBER(int, pfnNotifyBreak,(PPDMICHARPORT pInterface)); 1472 1456 } PDMICHARPORT; 1457 /** PDMICHARPORT interface ID. */ 1458 #define PDMICHARPORT_IID "22769834-ea8b-4a6d-ade1-213dcdbd1228" 1459 1460 /** @name Bit mask definitions for status line type. 1461 * @{ */ 1462 #define PDMICHARPORT_STATUS_LINES_DCD RT_BIT(0) 1463 #define PDMICHARPORT_STATUS_LINES_RI RT_BIT(1) 1464 #define PDMICHARPORT_STATUS_LINES_DSR RT_BIT(2) 1465 #define PDMICHARPORT_STATUS_LINES_CTS RT_BIT(3) 1466 /** @} */ 1473 1467 1474 1468 1475 1469 /** Pointer to a char interface. */ 1476 typedef struct PDMICHAR *PPDMICHAR;1477 /** 1478 * Char interface.1470 typedef struct PDMICHARCONNECTOR *PPDMICHARCONNECTOR; 1471 /** 1472 * Char connector interface (up). 1479 1473 * Pair with PDMICHARPORT. 1480 1474 */ 1481 typedef struct PDMICHAR 1475 typedef struct PDMICHARCONNECTOR 1482 1476 { 1483 1477 /** … … 1490 1484 * @thread Any thread. 1491 1485 */ 1492 DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMICHAR pInterface, const void *pvBuf, size_t cbWrite));1486 DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMICHARCONNECTOR pInterface, const void *pvBuf, size_t cbWrite)); 1493 1487 1494 1488 /** … … 1503 1497 * @thread Any thread. 1504 1498 */ 1505 DECLR3CALLBACKMEMBER(int, pfnSetParameters,(PPDMICHAR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits));1499 DECLR3CALLBACKMEMBER(int, pfnSetParameters,(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits)); 1506 1500 1507 1501 /** … … 1514 1508 * @thread Any thread. 1515 1509 */ 1516 DECLR3CALLBACKMEMBER(int, pfnSetModemLines,(PPDMICHAR pInterface, bool fRequestToSend, bool fDataTerminalReady));1510 DECLR3CALLBACKMEMBER(int, pfnSetModemLines,(PPDMICHARCONNECTOR pInterface, bool fRequestToSend, bool fDataTerminalReady)); 1517 1511 1518 1512 /** … … 1524 1518 * @thread Any thread. 1525 1519 */ 1526 DECLR3CALLBACKMEMBER(int, pfnSetBreak,(PPDMICHAR pInterface, bool fBreak)); 1527 } PDMICHAR; 1520 DECLR3CALLBACKMEMBER(int, pfnSetBreak,(PPDMICHARCONNECTOR pInterface, bool fBreak)); 1521 } PDMICHARCONNECTOR; 1522 /** PDMICHARCONNECTOR interface ID. */ 1523 #define PDMICHARCONNECTOR_IID "4ad5c190-b408-4cef-926f-fbffce0dc5cc" 1528 1524 1529 1525 … … 1532 1528 /** 1533 1529 * Stream interface. 1534 * Makes up the foundation for PDMICHAR .1530 * Makes up the foundation for PDMICHARCONNECTOR. 1535 1531 */ 1536 1532 typedef struct PDMISTREAM … … 2585 2581 } PDMISCSIPORT; 2586 2582 2583 2587 2584 /** Pointer to a SCSI connector interface. */ 2588 2585 typedef struct PDMISCSICONNECTOR *PPDMISCSICONNECTOR; 2589 2590 2586 /** 2591 2587 * SCSI connector interface. … … 2606 2602 } PDMISCSICONNECTOR; 2607 2603 2608 typedef struct PDMDDISPLAYVBVACALLBACKS *PPDMDDISPLAYVBVACALLBACKS; 2609 /** 2610 * Display VBVA callbacks. 2611 */ 2612 typedef struct PDMDDISPLAYVBVACALLBACKS 2604 2605 /** Pointer to a display VBVA callbacks interface. */ 2606 typedef struct PDMIDISPLAYVBVACALLBACKS *PPDMIDISPLAYVBVACALLBACKS; 2607 /** 2608 * Display VBVA callbacks interface (up). 2609 */ 2610 typedef struct PDMIDISPLAYVBVACALLBACKS 2613 2611 { 2614 2612 … … 2621 2619 * @param pCmd The Video HW Acceleration Command that was 2622 2620 * completed. 2623 * @todo r=bird: if asynch mean asyncronous; then2621 * @todo r=bird: if asynch means asyncronous; then 2624 2622 * s/pfnVHWACommandCompleteAsynch/pfnVHWACommandCompleteAsync/; 2625 2623 * fi 2626 2624 */ 2627 DECLR3CALLBACKMEMBER(int, pfnVHWACommandCompleteAsynch, (PPDMDDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd)); 2628 2629 } PDMDDISPLAYVBVACALLBACKS; 2625 DECLR3CALLBACKMEMBER(int, pfnVHWACommandCompleteAsynch, (PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd)); 2626 2627 } PDMIDISPLAYVBVACALLBACKS; 2628 /** PDMIDISPLAYVBVACALLBACKS */ 2629 #define PDMIDISPLAYVBVACALLBACKS_IID "b78b81d2-c821-4e66-96ff-dbafa76343a5" 2630 2630 2631 2631 /** @} */ -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r25966 r25971 4741 4741 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4742 4742 return &pThis->Base; 4743 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_DISPLAY_PORT) == 0)4743 if (RTUuidCompare2Strs(pszIID, PDMIDISPLAYPORT_IID) == 0) 4744 4744 return &pThis->Port; 4745 4745 #if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL) 4746 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_DISPLAY_VBVA_CALLBACKS) == 0)4746 if (RTUuidCompare2Strs(pszIID, PDMIDISPLAYVBVACALLBACKS_IID) == 0) 4747 4747 return &pThis->VBVACallbacks; 4748 4748 #endif … … 5728 5728 if (RT_SUCCESS(rc)) 5729 5729 { 5730 pThis->pDrv = (PDMIDISPLAYCONNECTOR*)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_DISPLAY_CONNECTOR);5730 pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMIDISPLAYCONNECTOR); 5731 5731 if (pThis->pDrv) 5732 5732 { -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r25966 r25971 312 312 #if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL) 313 313 /** LUN\#0: VBVA callbacks interface */ 314 PDM DDISPLAYVBVACALLBACKS VBVACallbacks;314 PDMIDISPLAYVBVACALLBACKS VBVACallbacks; 315 315 #else 316 316 # if HC_ARCH_BITS == 32 … … 464 464 465 465 # ifdef VBOX_WITH_VIDEOHWACCEL 466 int vbvaVHWACommandCompleteAsynch(PPDM DDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd);466 int vbvaVHWACommandCompleteAsynch(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd); 467 467 int vbvaVHWAConstruct (PVGASTATE pVGAState); 468 468 int vbvaVHWADisable (PVGASTATE pVGAState); -
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r25213 r25971 1177 1177 } 1178 1178 1179 #define PPDM DDISPLAYVBVACALLBACKS_2_PVGASTATE(_pcb) ( (PVGASTATE)((uint8_t *)(_pcb) - RT_OFFSETOF(VGASTATE, VBVACallbacks)) )1180 1181 int vbvaVHWACommandCompleteAsynch(PPDM DDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd)1179 #define PPDMIDISPLAYVBVACALLBACKS_2_PVGASTATE(_pcb) ( (PVGASTATE)((uint8_t *)(_pcb) - RT_OFFSETOF(VGASTATE, VBVACallbacks)) ) 1180 1181 int vbvaVHWACommandCompleteAsynch(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd) 1182 1182 { 1183 1183 int rc; 1184 1184 if((pCmd->Flags & VBOXVHWACMD_FLAG_HH_CMD) == 0) 1185 1185 { 1186 PVGASTATE pVGAState = PPDM DDISPLAYVBVACALLBACKS_2_PVGASTATE(pInterface);1186 PVGASTATE pVGAState = PPDMIDISPLAYVBVACALLBACKS_2_PVGASTATE(pInterface); 1187 1187 PHGSMIINSTANCE pIns = pVGAState->pHGSMI; 1188 1188 VBVAHOSTCMD *pHostCmd; -
trunk/src/VBox/Devices/Input/DevPS2.cpp
r25969 r25971 1363 1363 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1364 1364 return &pThis->Keyboard.Base; 1365 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_KEYBOARD_PORT) == 0)1365 if (RTUuidCompare2Strs(pszIID, PDMIKEYBOARDPORT_IID) == 0) 1366 1366 return &pThis->Keyboard.Port; 1367 1367 return NULL; … … 1467 1467 if (RT_SUCCESS(rc)) 1468 1468 { 1469 pThis->Keyboard.pDrv = (PDMIKEYBOARDCONNECTOR*)(pThis->Keyboard.pDrvBase->pfnQueryInterface(pThis->Keyboard.pDrvBase, PDMINTERFACE_KEYBOARD_CONNECTOR));1469 pThis->Keyboard.pDrv = PDMIBASE_QUERY_INTERFACE(pThis->Keyboard.pDrvBase, PDMIKEYBOARDCONNECTOR); 1470 1470 if (!pThis->Keyboard.pDrv) 1471 1471 { -
trunk/src/VBox/Devices/Input/DrvKeyboardQueue.cpp
r25966 r25971 87 87 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 88 88 return &pDrvIns->IBase; 89 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_KEYBOARD_CONNECTOR) == 0)89 if (RTUuidCompare2Strs(pszIID, PDMIKEYBOARDCONNECTOR_IID) == 0) 90 90 return &pThis->Connector; 91 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_KEYBOARD_PORT) == 0)91 if (RTUuidCompare2Strs(pszIID, PDMIKEYBOARDPORT_IID) == 0) 92 92 return &pThis->Port; 93 93 return NULL; … … 262 262 * Get the IKeyboardPort interface of the above driver/device. 263 263 */ 264 pDrv->pUpPort = (PPDMIKEYBOARDPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_KEYBOARD_PORT);264 pDrv->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIKEYBOARDPORT); 265 265 if (!pDrv->pUpPort) 266 266 { … … 279 279 return rc; 280 280 } 281 pDrv->pDownConnector = (PPDMIKEYBOARDCONNECTOR)pDownBase->pfnQueryInterface(pDownBase, PDMINTERFACE_KEYBOARD_CONNECTOR);281 pDrv->pDownConnector = PDMIBASE_QUERY_INTERFACE(pDownBase, PDMIKEYBOARDCONNECTOR); 282 282 if (!pDrv->pDownConnector) 283 283 { -
trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp
r25966 r25971 100 100 /* -=-=-=-=- IHostDeviceConnector -=-=-=-=- */ 101 101 102 /** @copydoc PDMICHAR ::pfnWrite */102 /** @copydoc PDMICHARCONNECTOR::pfnWrite */ 103 103 static DECLCALLBACK(int) drvHostParallelWrite(PPDMIHOSTPARALLELCONNECTOR pInterface, const void *pvBuf, size_t *cbWrite) 104 104 { -
trunk/src/VBox/Devices/Serial/DevSerial.cpp
r25966 r25971 146 146 R3PTRTYPE(PPDMIBASE) pDrvBase; 147 147 /** Pointer to the attached character driver. */ 148 R3PTRTYPE(PPDMICHAR ) pDrvChar;148 R3PTRTYPE(PPDMICHARCONNECTOR) pDrvChar; 149 149 150 150 uint16_t divider; … … 480 480 481 481 /* Set new states. */ 482 if (newStatusLines & PDM _ICHAR_STATUS_LINES_DCD)482 if (newStatusLines & PDMICHARPORT_STATUS_LINES_DCD) 483 483 newMsr |= UART_MSR_DCD; 484 if (newStatusLines & PDM _ICHAR_STATUS_LINES_RI)484 if (newStatusLines & PDMICHARPORT_STATUS_LINES_RI) 485 485 newMsr |= UART_MSR_RI; 486 if (newStatusLines & PDM _ICHAR_STATUS_LINES_DSR)486 if (newStatusLines & PDMICHARPORT_STATUS_LINES_DSR) 487 487 newMsr |= UART_MSR_DSR; 488 if (newStatusLines & PDM _ICHAR_STATUS_LINES_CTS)488 if (newStatusLines & PDMICHARPORT_STATUS_LINES_CTS) 489 489 newMsr |= UART_MSR_CTS; 490 490 … … 740 740 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 741 741 return &pThis->IBase; 742 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_CHAR_PORT) == 0)742 if (RTUuidCompare2Strs(pszIID, PDMICHARPORT_IID) == 0) 743 743 return &pThis->ICharPort; 744 744 return NULL; … … 953 953 if (RT_SUCCESS(rc)) 954 954 { 955 pThis->pDrvChar = (PDMICHAR *)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_CHAR);955 pThis->pDrvChar = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMICHARCONNECTOR); 956 956 if (!pThis->pDrvChar) 957 957 { -
trunk/src/VBox/Devices/Serial/DrvChar.cpp
r25966 r25971 43 43 #define CHAR_MAX_SEND_QUEUE_MASK 0x7f 44 44 45 /** Converts a pointer to DRVCHAR::IChar to a PDRVCHAR. */46 #define PDMICHAR_2_DRVCHAR(pInterface) ( (PDRVCHAR)((uintptr_t)pInterface - RT_OFFSETOF(DRVCHAR, IChar)))45 /** Converts a pointer to DRVCHAR::ICharConnector to a PDRVCHAR. */ 46 #define PDMICHAR_2_DRVCHAR(pInterface) RT_FROM_MEMBER(pInterface, DRVCHAR, ICharConnector) 47 47 48 48 … … 53 53 * Char driver instance data. 54 54 * 55 * @implements PDMICHAR 55 * @implements PDMICHARCONNECTOR 56 56 */ 57 57 typedef struct DRVCHAR … … 64 64 PPDMISTREAM pDrvStream; 65 65 /** Our char interface. */ 66 PDMICHAR IChar;66 PDMICHARCONNECTOR ICharConnector; 67 67 /** Flag to notify the receive thread it should terminate. */ 68 68 volatile bool fShutdown; … … 101 101 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 102 102 return &pDrvIns->IBase; 103 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_CHAR) == 0)104 return &pThis->IChar ;103 if (RTUuidCompare2Strs(pszIID, PDMICHARCONNECTOR_IID) == 0) 104 return &pThis->ICharConnector; 105 105 return NULL; 106 106 } 107 107 108 108 109 /* -=-=-=-=- IChar -=-=-=-=- */110 111 /** @copydoc PDMICHAR ::pfnWrite */112 static DECLCALLBACK(int) drvCharWrite(PPDMICHAR pInterface, const void *pvBuf, size_t cbWrite)109 /* -=-=-=-=- ICharConnector -=-=-=-=- */ 110 111 /** @copydoc PDMICHARCONNECTOR::pfnWrite */ 112 static DECLCALLBACK(int) drvCharWrite(PPDMICHARCONNECTOR pInterface, const void *pvBuf, size_t cbWrite) 113 113 { 114 114 PDRVCHAR pThis = PDMICHAR_2_DRVCHAR(pInterface); … … 131 131 } 132 132 133 /** @copydoc PDMICHAR ::pfnSetParameters */134 static DECLCALLBACK(int) drvCharSetParameters(PPDMICHAR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits)133 /** @copydoc PDMICHARCONNECTOR::pfnSetParameters */ 134 static DECLCALLBACK(int) drvCharSetParameters(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits) 135 135 { 136 136 /*PDRVCHAR pThis = PDMICHAR_2_DRVCHAR(pInterface); - unused*/ … … 278 278 * @param DataTerminalReady Set to true if this control line should be made active. 279 279 */ 280 static DECLCALLBACK(int) drvCharSetModemLines(PPDMICHAR pInterface, bool RequestToSend, bool DataTerminalReady)280 static DECLCALLBACK(int) drvCharSetModemLines(PPDMICHARCONNECTOR pInterface, bool RequestToSend, bool DataTerminalReady) 281 281 { 282 282 /* Nothing to do here. */ … … 292 292 * @thread Any thread. 293 293 */ 294 static DECLCALLBACK(int) drvCharSetBreak(PPDMICHAR pInterface, bool fBreak)294 static DECLCALLBACK(int) drvCharSetBreak(PPDMICHARCONNECTOR pInterface, bool fBreak) 295 295 { 296 296 /* Nothing to do here. */ … … 317 317 /* IBase. */ 318 318 pDrvIns->IBase.pfnQueryInterface = drvCharQueryInterface; 319 /* IChar . */320 pThis->IChar .pfnWrite= drvCharWrite;321 pThis->IChar .pfnSetParameters= drvCharSetParameters;322 pThis->IChar .pfnSetModemLines= drvCharSetModemLines;323 pThis->IChar .pfnSetBreak= drvCharSetBreak;319 /* ICharConnector. */ 320 pThis->ICharConnector.pfnWrite = drvCharWrite; 321 pThis->ICharConnector.pfnSetParameters = drvCharSetParameters; 322 pThis->ICharConnector.pfnSetModemLines = drvCharSetModemLines; 323 pThis->ICharConnector.pfnSetBreak = drvCharSetBreak; 324 324 325 325 /* 326 326 * Get the ICharPort interface of the above driver/device. 327 327 */ 328 pThis->pDrvCharPort = (PPDMICHARPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_CHAR_PORT);328 pThis->pDrvCharPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMICHARPORT); 329 329 if (!pThis->pDrvCharPort) 330 330 return PDMDrvHlpVMSetError(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE, RT_SRC_POS, N_("Char#%d has no char port interface above"), pDrvIns->iInstance); -
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r25966 r25971 95 95 * Char driver instance data. 96 96 * 97 * @implements PDMICHAR 97 * @implements PDMICHARCONNECTOR 98 98 */ 99 99 typedef struct DRVHOSTSERIAL … … 104 104 PPDMICHARPORT pDrvCharPort; 105 105 /** Our char interface. */ 106 PDMICHAR IChar;106 PDMICHARCONNECTOR ICharConnector; 107 107 /** Receive thread. */ 108 108 PPDMTHREAD pRecvThread; … … 165 165 166 166 167 /** Converts a pointer to DRVCHAR::IChar to a PDRVHOSTSERIAL. */168 #define PDMICHAR_2_DRVHOSTSERIAL(pInterface) ( (PDRVHOSTSERIAL)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTSERIAL, IChar)))167 /** Converts a pointer to DRVCHAR::ICharConnector to a PDRVHOSTSERIAL. */ 168 #define PDMICHAR_2_DRVHOSTSERIAL(pInterface) RT_FROM_MEMBER(pInterface, DRVHOSTSERIAL, ICharConnector) 169 169 170 170 … … 181 181 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 182 182 return &pDrvIns->IBase; 183 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_CHAR) == 0)184 return &pThis->IChar ;183 if (RTUuidCompare2Strs(pszIID, PDMICHARCONNECTOR_IID) == 0) 184 return &pThis->ICharConnector; 185 185 return NULL; 186 186 } 187 187 188 188 189 /* -=-=-=-=- IChar -=-=-=-=- */190 191 /** @copydoc PDMICHAR ::pfnWrite */192 static DECLCALLBACK(int) drvHostSerialWrite(PPDMICHAR pInterface, const void *pvBuf, size_t cbWrite)189 /* -=-=-=-=- ICharConnector -=-=-=-=- */ 190 191 /** @copydoc PDMICHARCONNECTOR::pfnWrite */ 192 static DECLCALLBACK(int) drvHostSerialWrite(PPDMICHARCONNECTOR pInterface, const void *pvBuf, size_t cbWrite) 193 193 { 194 194 PDRVHOSTSERIAL pThis = PDMICHAR_2_DRVHOSTSERIAL(pInterface); … … 237 237 } 238 238 239 static DECLCALLBACK(int) drvHostSerialSetParameters(PPDMICHAR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits)239 static DECLCALLBACK(int) drvHostSerialSetParameters(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits) 240 240 { 241 241 PDRVHOSTSERIAL pThis = PDMICHAR_2_DRVHOSTSERIAL(pInterface); … … 859 859 { 860 860 if (dwNewStatusLinesState & MS_RLSD_ON) 861 uNewStatusLinesState |= PDM _ICHAR_STATUS_LINES_DCD;861 uNewStatusLinesState |= PDMICHARPORT_STATUS_LINES_DCD; 862 862 if (dwNewStatusLinesState & MS_RING_ON) 863 uNewStatusLinesState |= PDM _ICHAR_STATUS_LINES_RI;863 uNewStatusLinesState |= PDMICHARPORT_STATUS_LINES_RI; 864 864 if (dwNewStatusLinesState & MS_DSR_ON) 865 uNewStatusLinesState |= PDM _ICHAR_STATUS_LINES_DSR;865 uNewStatusLinesState |= PDMICHARPORT_STATUS_LINES_DSR; 866 866 if (dwNewStatusLinesState & MS_CTS_ON) 867 uNewStatusLinesState |= PDM _ICHAR_STATUS_LINES_CTS;867 uNewStatusLinesState |= PDMICHARPORT_STATUS_LINES_CTS; 868 868 rc = pThis->pDrvCharPort->pfnNotifyStatusLinesChanged(pThis->pDrvCharPort, uNewStatusLinesState); 869 869 if (RT_FAILURE(rc)) … … 1004 1004 1005 1005 if (statusLines & TIOCM_CAR) 1006 newStatusLine |= PDM _ICHAR_STATUS_LINES_DCD;1006 newStatusLine |= PDMICHARPORT_STATUS_LINES_DCD; 1007 1007 if (statusLines & TIOCM_RNG) 1008 newStatusLine |= PDM _ICHAR_STATUS_LINES_RI;1008 newStatusLine |= PDMICHARPORT_STATUS_LINES_RI; 1009 1009 if (statusLines & TIOCM_LE) 1010 newStatusLine |= PDM _ICHAR_STATUS_LINES_DSR;1010 newStatusLine |= PDMICHARPORT_STATUS_LINES_DSR; 1011 1011 if (statusLines & TIOCM_CTS) 1012 newStatusLine |= PDM _ICHAR_STATUS_LINES_CTS;1012 newStatusLine |= PDMICHARPORT_STATUS_LINES_CTS; 1013 1013 rc = pThis->pDrvCharPort->pfnNotifyStatusLinesChanged(pThis->pDrvCharPort, newStatusLine); 1014 1014 } … … 1136 1136 * @param DataTerminalReady Set to true if this control line should be made active. 1137 1137 */ 1138 static DECLCALLBACK(int) drvHostSerialSetModemLines(PPDMICHAR pInterface, bool RequestToSend, bool DataTerminalReady)1138 static DECLCALLBACK(int) drvHostSerialSetModemLines(PPDMICHARCONNECTOR pInterface, bool RequestToSend, bool DataTerminalReady) 1139 1139 { 1140 1140 PDRVHOSTSERIAL pThis = PDMICHAR_2_DRVHOSTSERIAL(pInterface); … … 1182 1182 * @thread Any thread. 1183 1183 */ 1184 static DECLCALLBACK(int) drvHostSerialSetBreak(PPDMICHAR pInterface, bool fBreak)1184 static DECLCALLBACK(int) drvHostSerialSetBreak(PPDMICHARCONNECTOR pInterface, bool fBreak) 1185 1185 { 1186 1186 PDRVHOSTSERIAL pThis = PDMICHAR_2_DRVHOSTSERIAL(pInterface); … … 1226 1226 #endif 1227 1227 /* IBase. */ 1228 pDrvIns->IBase.pfnQueryInterface = drvHostSerialQueryInterface;1229 /* IChar . */1230 pThis->IChar .pfnWrite= drvHostSerialWrite;1231 pThis->IChar .pfnSetParameters= drvHostSerialSetParameters;1232 pThis->IChar .pfnSetModemLines= drvHostSerialSetModemLines;1233 pThis->IChar .pfnSetBreak= drvHostSerialSetBreak;1228 pDrvIns->IBase.pfnQueryInterface = drvHostSerialQueryInterface; 1229 /* ICharConnector. */ 1230 pThis->ICharConnector.pfnWrite = drvHostSerialWrite; 1231 pThis->ICharConnector.pfnSetParameters = drvHostSerialSetParameters; 1232 pThis->ICharConnector.pfnSetModemLines = drvHostSerialSetModemLines; 1233 pThis->ICharConnector.pfnSetBreak = drvHostSerialSetBreak; 1234 1234 1235 1235 /** @todo Initialize all members with NIL values!! The destructor is ALWAYS called. */ … … 1351 1351 * Get the ICharPort interface of the above driver/device. 1352 1352 */ 1353 pThis->pDrvCharPort = (PPDMICHARPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_CHAR_PORT);1353 pThis->pDrvCharPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMICHARPORT); 1354 1354 if (!pThis->pDrvCharPort) 1355 1355 return PDMDrvHlpVMSetError(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE, RT_SRC_POS, N_("HostSerial#%d has no char port interface above"), pDrvIns->iInstance); -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r25966 r25971 1156 1156 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1157 1157 return &pDrvIns->IBase; 1158 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_DISPLAY_CONNECTOR) == 0)1158 if (RTUuidCompare2Strs(pszIID, PDMIDISPLAYCONNECTOR_IID) == 0) 1159 1159 return &pDrv->Connector; 1160 1160 return NULL; … … 1198 1198 * Get the IDisplayPort interface of the above driver/device. 1199 1199 */ 1200 pData->pUpPort = (PPDMIDISPLAYPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_DISPLAY_PORT);1200 pData->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIDISPLAYPORT); 1201 1201 if (!pData->pUpPort) 1202 1202 { -
trunk/src/VBox/Frontends/VBoxBFE/KeyboardImpl.cpp
r25966 r25971 166 166 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 167 167 return &pDrvIns->IBase; 168 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_KEYBOARD_CONNECTOR) == 0)168 if (RTUuidCompare2Strs(pszIID, PDMIKEYBOARDCONNECTOR_IID) == 0) 169 169 return &pDrv->Connector; 170 170 return NULL; … … 226 226 * Get the IKeyboardPort interface of the above driver/device. 227 227 */ 228 pData->pUpPort = (PPDMIKEYBOARDPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_KEYBOARD_PORT);228 pData->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIKEYBOARDPORT); 229 229 if (!pData->pUpPort) 230 230 { -
trunk/src/VBox/Main/DisplayImpl.cpp
r25966 r25971 61 61 #if defined(VBOX_WITH_VIDEOHWACCEL) 62 62 /** VBVA callbacks */ 63 PPDM DDISPLAYVBVACALLBACKS pVBVACallbacks;63 PPDMIDISPLAYVBVACALLBACKS pVBVACallbacks; 64 64 #endif 65 65 } DRVMAINDISPLAY, *PDRVMAINDISPLAY; … … 3371 3371 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 3372 3372 return &pDrvIns->IBase; 3373 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_DISPLAY_CONNECTOR) == 0)3373 if (RTUuidCompare2Strs(pszIID, PDMIDISPLAYCONNECTOR_IID) == 0) 3374 3374 return &pDrv->Connector; 3375 3375 return NULL; … … 3449 3449 * Get the IDisplayPort interface of the above driver/device. 3450 3450 */ 3451 pData->pUpPort = (PPDMIDISPLAYPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_DISPLAY_PORT);3451 pData->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIDISPLAYPORT); 3452 3452 if (!pData->pUpPort) 3453 3453 { … … 3456 3456 } 3457 3457 #if defined(VBOX_WITH_VIDEOHWACCEL) 3458 pData->pVBVACallbacks = (PPDMDDISPLAYVBVACALLBACKS)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_DISPLAY_VBVA_CALLBACKS);3458 pData->pVBVACallbacks = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIDISPLAYVBVACALLBACKS); 3459 3459 if (!pData->pVBVACallbacks) 3460 3460 { -
trunk/src/VBox/Main/KeyboardImpl.cpp
r25966 r25971 227 227 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 228 228 return &pDrvIns->IBase; 229 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_KEYBOARD_CONNECTOR) == 0)229 if (RTUuidCompare2Strs(pszIID, PDMIKEYBOARDCONNECTOR_IID) == 0) 230 230 return &pDrv->Connector; 231 231 return NULL; … … 288 288 * Get the IKeyboardPort interface of the above driver/device. 289 289 */ 290 pData->pUpPort = (PPDMIKEYBOARDPORT)pDrvIns->pUpBase->pfnQueryInterface (pDrvIns->pUpBase, PDMINTERFACE_KEYBOARD_PORT);290 pData->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIKEYBOARDPORT); 291 291 if (!pData->pUpPort) 292 292 {
Note:
See TracChangeset
for help on using the changeset viewer.