Changeset 25984 in vbox
- Timestamp:
- Jan 23, 2010 12:19:47 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56849
- Location:
- trunk
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmifs.h
r25981 r25984 38 38 /** @defgroup grp_pdm_interfaces The PDM Interface Definitions 39 39 * @ingroup grp_pdm 40 * 41 * For historical reasons (the PDMINTERFACE enum) a lot of interface was stuffed 42 * together in this group instead, dragging stuff into global space that didn't 43 * need to be there and making this file huge (>2500 lines). Since we're using 44 * UUIDs as interface identifiers (IIDs) now, no only generic PDM interface will 45 * be added to this file. Component specific interface should be defined in the 46 * header file of that component. 47 * 48 * Interfaces consists of a method table (typedef'ed struct) and an interface 49 * ID. The typename of the method table should have an 'I' in it, be all 50 * capitals and according to the rules, no underscores. The interface ID is a 51 * \#define constructed by appending '_IID' to the typename. The IID value is a 52 * UUID string on the form "a2299c0d-b709-4551-aa5a-73f59ffbed74". If you stick 53 * to these rules, you can make use of the PDMIBASE_QUERY_INTERFACE and 54 * PDMIBASE_RETURN_INTERFACE when querying interface and implementing 55 * PDMIBASE::pfnQueryInterface respectively. 56 * 40 57 * @{ 41 58 */ … … 46 63 * @{ 47 64 */ 48 /** PDMIAUDIOCONNECTOR - The audio driver interface. (Up) No coupling. */ 49 #define PDMINTERFACE_AUDIO_CONNECTOR "85d52af5-b3aa-4b3e-b176-4b5ebfc52f47" 50 51 /** PDMIAUDIOSNIFFERPORT - The Audio Sniffer Device port interface. */ 52 #define PDMINTERFACE_AUDIO_SNIFFER_PORT "83b95e02-68cb-470d-9dfc-25a0f8efe197" 53 /** PDMIAUDIOSNIFFERCONNECTOR - The Audio Sniffer Driver connector interface. */ 54 #define PDMINTERFACE_AUDIO_SNIFFER_CONNECTOR "433b64ab-e603-4933-bc97-8fe79b2bd0e0" 55 56 /** PDMIVMMDEVPORT - The VMM Device port interface. */ 57 #define PDMINTERFACE_VMMDEV_PORT "d7e52035-3b6c-422e-9215-2a75646a945d" 58 /** PDMIVMMDEVCONNECTOR - The VMM Device connector interface. */ 59 #define PDMINTERFACE_VMMDEV_CONNECTOR "38b96194-ee83-489e-b92e-73ee28a29439" 60 61 /** PDMILEDPORTS - The generic LED port interface. (Down) Coupled with PDMINTERFACE_LED_CONNECTORS. */ 62 #define PDMINTERFACE_LED_PORTS "435e0cec-8549-4ca0-8c0d-98e52f1dc038" 63 /** PDMILEDCONNECTORS - The generic LED connector interface. (Up) Coupled with PDMINTERFACE_LED_PORTS. */ 64 #define PDMINTERFACE_LED_CONNECTORS "8ed63568-82a7-4193-b57b-db8085ac4495" 65 66 /** PDMIACPIPORT - ACPI port interface. (Down) Coupled with PDMINTERFACE_ACPI_CONNECTOR. */ 67 #define PDMINTERFACE_ACPI_PORT "30d3dc4c-6a73-40c8-80e9-34309deacbb3" 68 /** PDMIACPICONNECTOR - ACPI connector interface. (Up) Coupled with PDMINTERFACE_ACPI_PORT. */ 69 #define PDMINTERFACE_ACPI_CONNECTOR "5f14bf8d-1edf-4e3a-a1e1-cca9fd08e359" 70 71 /** PDMIHGCMPORT - The Host-Guest communication manager port interface. Normally implemented by VMMDev. */ 72 #define PDMINTERFACE_HGCM_PORT "e00a0cbf-b75a-45c3-87f4-41cddbc5ae0b" 73 /** PDMIHGCMCONNECTOR - The Host-Guest communication manager connector interface. Normally implemented by Main::VMMDevInterface. */ 74 #define PDMINTERFACE_HGCM_CONNECTOR "a1104758-c888-4437-8f2a-7bac17865b5c" 75 76 /** VUSBIROOTHUBPORT - VUSB RootHub port interface. (Down) Coupled with PDMINTERFACE_USB_RH_CONNECTOR. */ 77 #define PDMINTERFACE_VUSB_RH_PORT "e38e2978-7aa2-4860-94b6-9ef4a066d8a0" 78 /** VUSBIROOTHUBCONNECTOR - VUSB RootHub connector interface. (Up) Coupled with PDMINTERFACE_USB_RH_PORT. */ 79 #define PDMINTERFACE_VUSB_RH_CONNECTOR "d9a90c59-e3ff-4dff-9754-844557c3f7a0" 80 /** VUSBIRHCONFIG - VUSB RootHub configuration interface. (Main) Used by the managment api. */ 81 #define PDMINTERFACE_VUSB_RH_CONFIG "c354cd97-e85f-465e-bc12-b58798465f52" 82 83 /** VUSBIDEVICE - VUSB Device interface. (Up) No coupling. */ 84 #define PDMINTERFACE_VUSB_DEVICE "88732dd3-0ccd-4625-b040-48804ac7a217" 85 86 /** PDMIHOSTPARALLELPORT - The Host Parallel port interface. (Down) Coupled with PDMINTERFACE_HOST_PARALLEL_CONNECTOR. */ 87 #define PDMINTERFACE_HOST_PARALLEL_PORT "ac13e437-cd30-47ac-a271-6120571f3a22" 88 /** PDMIHOSTPARALLELCONNECTOR - The Host Parallel connector interface (Up) Coupled with PDMINTERFACE_HOST_PARALLEL_PORT. */ 89 #define PDMINTERFACE_HOST_PARALLEL_CONNECTOR "a03567ca-b29e-4a1b-b2f3-a12435fa2982" 90 91 /** PDMISCSIPORT - The SCSI command execution port interface (Down) Coupled with PDMINTERFACE_SCSI_CONNECTOR. */ 92 #define PDMINTERFACE_SCSI_PORT "0f894add-714d-4a77-818e-a32fe3586ba4" 93 /** PDMISCSICONNECTOR - The SCSI command execution connector interface (Up) Coupled with PDMINTERFACE_SCSI_PORT. */ 94 #define PDMINTERFACE_SCSI_CONNECTOR "94465fbd-a2f2-447e-88c9-7366421bfbfe" 65 66 /* gsrc -r PDMINTERFACE */ 67 68 95 69 /** @} */ 96 70 … … 1419 1393 typedef struct PDMIHOSTPARALLELPORT *PPDMIHOSTPARALLELPORT; 1420 1394 /** 1421 * Host parallel port interface .1395 * Host parallel port interface (down). 1422 1396 * Pair with PDMIHOSTPARALLELCONNECTOR. 1423 1397 */ … … 1444 1418 DECLR3CALLBACKMEMBER(int, pfnNotifyInterrupt,(PPDMIHOSTPARALLELPORT pInterface)); 1445 1419 } PDMIHOSTPARALLELPORT; 1420 /** PDMIHOSTPARALLELPORT interface ID. */ 1421 #define PDMIHOSTPARALLELPORT_IID "ac13e437-cd30-47ac-a271-6120571f3a22" 1446 1422 1447 1423 … … 1450 1426 typedef struct PDMIHOSTPARALLELCONNECTOR *PPDMIHOSTPARALLELCONNECTOR; 1451 1427 /** 1452 * Host parallel connector interface 1428 * Host parallel connector interface (up). 1453 1429 * Pair with PDMIHOSTPARALLELPORT. 1454 1430 */ … … 1517 1493 DECLR3CALLBACKMEMBER(int, pfnSetMode,(PPDMIHOSTPARALLELCONNECTOR pInterface, PDMPARALLELPORTMODE enmMode)); 1518 1494 } PDMIHOSTPARALLELCONNECTOR; 1495 /** PDMIHOSTPARALLELCONNECTOR interface ID. */ 1496 #define PDMIHOSTPARALLELCONNECTOR_IID "a03567ca-b29e-4a1b-b2f3-a12435fa2982" 1519 1497 1520 1498 … … 1553 1531 typedef struct PDMIACPIPORT *PPDMIACPIPORT; 1554 1532 /** 1555 * ACPI port interface. 1533 * ACPI port interface (down). Used by both the ACPI driver and (grumble) main. 1534 * Pair with PDMIACPICONNECTOR. 1556 1535 */ 1557 1536 typedef struct PDMIACPIPORT … … 1601 1580 DECLR3CALLBACKMEMBER(int, pfnGetCpuStatus,(PPDMIACPIPORT pInterface, unsigned uCpu, bool *pfLocked)); 1602 1581 } PDMIACPIPORT; 1582 /** PDMIACPIPORT interface ID. */ 1583 #define PDMIACPIPORT_IID "30d3dc4c-6a73-40c8-80e9-34309deacbb3" 1584 1603 1585 1604 1586 /** Pointer to an ACPI connector interface. */ 1605 1587 typedef struct PDMIACPICONNECTOR *PPDMIACPICONNECTOR; 1606 1588 /** 1607 * ACPI connector interface. 1589 * ACPI connector interface (up). 1590 * Pair with PDMIACPIPORT. 1608 1591 */ 1609 1592 typedef struct PDMIACPICONNECTOR … … 1631 1614 PPDMACPIBATSTATE penmBatteryState, uint32_t *pu32PresentRate)); 1632 1615 } PDMIACPICONNECTOR; 1616 /** PDMIACPICONNECTOR interface ID. */ 1617 #define PDMIACPICONNECTOR_IID "5f14bf8d-1edf-4e3a-a1e1-cca9fd08e359" 1633 1618 1634 1619 … … 1636 1621 typedef struct PDMIVMMDEVPORT *PPDMIVMMDEVPORT; 1637 1622 /** 1638 * VMMDevice port interface. 1623 * VMMDevice port interface (down). 1624 * Pair with PDMIVMMDEVCONNECTOR. 1639 1625 */ 1640 1626 typedef struct PDMIVMMDEVPORT … … 1773 1759 1774 1760 } PDMIVMMDEVPORT; 1761 /** PDMIVMMDEVPORT interface ID. */ 1762 #define PDMIVMMDEVPORT_IID "d7e52035-3b6c-422e-9215-2a75646a945d" 1775 1763 1776 1764 /** @name Flags for PDMIVMMDEVPORT::pfnSetCredentials. … … 1797 1785 typedef struct PDMIVMMDEVCONNECTOR *PPDMIVMMDEVCONNECTOR; 1798 1786 /** 1799 * VMMDev connector interface .1787 * VMMDev connector interface (up). 1800 1788 * Pair with PDMIVMMDEVPORT. 1801 1789 */ … … 1965 1953 1966 1954 } PDMIVMMDEVCONNECTOR; 1955 /** PDMIVMMDEVCONNECTOR interface ID. */ 1956 #define PDMIVMMDEVCONNECTOR_IID "38b96194-ee83-489e-b92e-73ee28a29439" 1967 1957 1968 1958 … … 2111 2101 typedef struct PDMIAUDIOCONNECTOR *PPDMIAUDIOCONNECTOR; 2112 2102 /** 2113 * Audio connector interface. 2103 * Audio connector interface (up). 2104 * No interface pair yet. 2114 2105 */ 2115 2106 typedef struct PDMIAUDIOCONNECTOR … … 2120 2111 2121 2112 } PDMIAUDIOCONNECTOR; 2113 /** PDMIAUDIOCONNECTOR interface ID. */ 2114 #define PDMIAUDIOCONNECTOR_IID "85d52af5-b3aa-4b3e-b176-4b5ebfc52f47" 2122 2115 2123 2116 … … 2127 2120 /** Pointer to a Audio Sniffer Device port interface. */ 2128 2121 typedef struct PDMIAUDIOSNIFFERPORT *PPDMIAUDIOSNIFFERPORT; 2129 2130 /** 2131 * Audio Sniffer port interface.2122 /** 2123 * Audio Sniffer port interface (down). 2124 * Pair with PDMIAUDIOSNIFFERCONNECTOR. 2132 2125 */ 2133 2126 typedef struct PDMIAUDIOSNIFFERPORT 2134 2127 { 2135 2128 /** 2136 * Enables or disables sniffing. If sniffing is being enabled also sets a flag 2137 * whether the audio must be also left on the host. 2129 * Enables or disables sniffing. 2130 * 2131 * If sniffing is being enabled also sets a flag whether the audio must be also 2132 * left on the host. 2138 2133 * 2139 2134 * @returns VBox status code … … 2147 2142 2148 2143 } PDMIAUDIOSNIFFERPORT; 2144 /** PDMIAUDIOSNIFFERPORT interface ID. */ 2145 #define PDMIAUDIOSNIFFERPORT_IID "83b95e02-68cb-470d-9dfc-25a0f8efe197" 2146 2149 2147 2150 2148 /** Pointer to a Audio Sniffer connector interface. */ … … 2152 2150 2153 2151 /** 2154 * Audio Sniffer connector interface .2152 * Audio Sniffer connector interface (up). 2155 2153 * Pair with PDMIAUDIOSNIFFERPORT. 2156 2154 */ … … 2184 2182 2185 2183 } PDMIAUDIOSNIFFERCONNECTOR; 2184 /** PDMIAUDIOSNIFFERCONNECTOR - The Audio Sniffer Driver connector interface. */ 2185 #define PDMIAUDIOSNIFFERCONNECTOR_IID "433b64ab-e603-4933-bc97-8fe79b2bd0e0" 2186 2186 2187 2187 … … 2244 2244 typedef const PDMLED *PCPDMLED; 2245 2245 2246 #define PDMLED_MAGIC ( 0x11335577 ) 2246 /** Magic value for PDMLED::u32Magic. */ 2247 #define PDMLED_MAGIC UINT32_C(0x11335577) 2247 2248 2248 2249 /** Pointer to an LED ports interface. */ 2249 2250 typedef struct PDMILEDPORTS *PPDMILEDPORTS; 2250 2251 /** 2251 * Interface for exporting LEDs. 2252 * Interface for exporting LEDs (down). 2253 * Pair with PDMILEDCONNECTORS. 2252 2254 */ 2253 2255 typedef struct PDMILEDPORTS … … 2264 2266 2265 2267 } PDMILEDPORTS; 2268 /** PDMILEDPORTS interface ID. */ 2269 #define PDMILEDPORTS_IID "435e0cec-8549-4ca0-8c0d-98e52f1dc038" 2266 2270 2267 2271 … … 2269 2273 typedef struct PDMILEDCONNECTORS *PPDMILEDCONNECTORS; 2270 2274 /** 2271 * Interface for reading LEDs. 2275 * Interface for reading LEDs (up). 2276 * Pair with PDMILEDPORTS. 2272 2277 */ 2273 2278 typedef struct PDMILEDCONNECTORS … … 2284 2289 DECLR3CALLBACKMEMBER(void, pfnUnitChanged,(PPDMILEDCONNECTORS pInterface, unsigned iLUN)); 2285 2290 } PDMILEDCONNECTORS; 2291 /** PDMILEDCONNECTORS interface ID. */ 2292 #define PDMILEDCONNECTORS_IID "8ed63568-82a7-4193-b57b-db8085ac4495" 2286 2293 2287 2294 … … 2303 2310 /** Pointer to a HGCM port interface. */ 2304 2311 typedef struct PDMIHGCMPORT *PPDMIHGCMPORT; 2305 2306 /** 2307 * HGCM port interface. Normally implemented by VMMDev. 2312 /** 2313 * Host-Guest communication manager port interface (down). Normally implemented 2314 * by VMMDev. 2315 * Pair with PDMIHGCMCONNECTOR. 2308 2316 */ 2309 2317 typedef struct PDMIHGCMPORT … … 2321 2329 2322 2330 } PDMIHGCMPORT; 2323 2331 /** PDMIHGCMPORT interface ID. */ 2332 # define PDMIHGCMPORT_IID "e00a0cbf-b75a-45c3-87f4-41cddbc5ae0b" 2333 2334 2335 /** Pointer to a HGCM service location structure. */ 2336 typedef struct HGCMSERVICELOCATION *PHGCMSERVICELOCATION; 2324 2337 2325 2338 /** Pointer to a HGCM connector interface. */ 2326 2339 typedef struct PDMIHGCMCONNECTOR *PPDMIHGCMCONNECTOR; 2327 2328 /** Pointer to a HGCM service location structure. */ 2329 typedef struct HGCMSERVICELOCATION *PHGCMSERVICELOCATION; 2330 2331 /** 2332 * HGCM connector interface. 2340 /** 2341 * The Host-Guest communication manager connector interface (up). Normally 2342 * implemented by Main::VMMDevInterface. 2333 2343 * Pair with PDMIHGCMPORT. 2334 2344 */ … … 2374 2384 2375 2385 } PDMIHGCMCONNECTOR; 2376 2377 #endif 2386 /** PDMIHGCMCONNECTOR interface ID. */ 2387 # define PDMIHGCMCONNECTOR_IID "a1104758-c888-4437-8f2a-7bac17865b5c" 2388 2389 #endif /* VBOX_WITH_HGCM */ 2378 2390 2379 2391 /** … … 2422 2434 /** Pointer to a SCSI port interface. */ 2423 2435 typedef struct PDMISCSIPORT *PPDMISCSIPORT; 2424 2425 /** 2426 * SCSI port interface. 2436 /** 2437 * SCSI command execution port interface (down). 2427 2438 * Pair with PDMISCSICONNECTOR. 2428 2439 */ … … 2441 2452 2442 2453 } PDMISCSIPORT; 2454 /** PDMISCSIPORT interface ID. */ 2455 #define PDMISCSIPORT_IID "0f894add-714d-4a77-818e-a32fe3586ba4" 2443 2456 2444 2457 … … 2446 2459 typedef struct PDMISCSICONNECTOR *PPDMISCSICONNECTOR; 2447 2460 /** 2448 * SCSI co nnector interface.2461 * SCSI command execution connector interface (up). 2449 2462 * Pair with PDMISCSIPORT. 2450 2463 */ … … 2462 2475 2463 2476 } PDMISCSICONNECTOR; 2477 /** PDMISCSICONNECTOR interface ID. */ 2478 #define PDMISCSICONNECTOR_IID "94465fbd-a2f2-447e-88c9-7366421bfbfe" 2464 2479 2465 2480 -
trunk/include/VBox/vusb.h
r25728 r25984 352 352 353 353 /** 354 * The VUSB RootHub port interface provided by the HCI. 354 * The VUSB RootHub port interface provided by the HCI (down). 355 * Pair with VUSBIROOTCONNECTOR 355 356 */ 356 357 typedef struct VUSBIROOTHUBPORT … … 427 428 428 429 } VUSBIROOTHUBPORT; 430 /** VUSBIROOTHUBPORT interface ID. */ 431 #define VUSBIROOTHUBPORT_IID "e38e2978-7aa2-4860-94b6-9ef4a066d8a0" 429 432 430 433 431 434 /** Pointer to a VUSB RootHub connector interface. */ 432 435 typedef struct VUSBIROOTHUBCONNECTOR *PVUSBIROOTHUBCONNECTOR; 433 434 /** 435 * The VUSB RootHub connector interface provided by the VBox USB RootHub driver. 436 /** 437 * The VUSB RootHub connector interface provided by the VBox USB RootHub driver 438 * (up). 439 * Pair with VUSBIROOTHUBPORT. 436 440 */ 437 441 typedef struct VUSBIROOTHUBCONNECTOR … … 510 514 511 515 } VUSBIROOTHUBCONNECTOR; 516 /** VUSBIROOTHUBCONNECTOR interface ID. */ 517 #define VUSBIROOTHUBCONNECTOR_IID "d9a90c59-e3ff-4dff-9754-844557c3f7a0" 512 518 513 519 … … 554 560 /** Pointer to a Root Hub Configuration Interface. */ 555 561 typedef struct VUSBIRHCONFIG *PVUSBIRHCONFIG; 556 557 562 /** 558 563 * Root Hub Configuration Interface (intended for MAIN). 564 * No interface pair. 559 565 */ 560 566 typedef struct VUSBIRHCONFIG … … 583 589 584 590 } VUSBIRHCONFIG; 591 /** VUSBIRHCONFIG interface ID. */ 592 #define VUSBIRHCONFIG_IID "c354cd97-e85f-465e-bc12-b58798465f52" 593 585 594 586 595 #ifdef IN_RING3 … … 641 650 642 651 /** 643 * USB Device Interface. 652 * USB Device Interface (up). 653 * No interface pair. 644 654 */ 645 655 typedef struct VUSBIDEVICE … … 698 708 699 709 } VUSBIDEVICE; 710 /** VUSBIDEVICE interface ID. */ 711 #define VUSBIDEVICE_IID "88732dd3-0ccd-4625-b040-48804ac7a217" 700 712 701 713 -
trunk/include/iprt/assert.h
r25647 r25984 672 672 #endif 673 673 674 /** @def AssertMsgStmt 675 * Assert that an expression is true. If it's not print message and hit 676 * breakpoint and execute the statement. 677 * 678 * @param expr Expression which should be true. 679 * @param a printf argument list (in parenthesis). 680 * @param stmt Statement to execute in case of a failed assertion. 681 * 682 * @remarks The expression and statement will be evaluated in all build types. 683 */ 684 #ifdef RT_STRICT 685 # define AssertMsgStmt(expr, a, stmt) \ 686 do { \ 687 if (RT_UNLIKELY(!(expr))) \ 688 { \ 689 RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \ 690 RTAssertMsg2Weak a; \ 691 RTAssertPanic(); \ 692 stmt; \ 693 } \ 694 } while (0) 695 #else 696 # define AssertMsgStmt(expr, a, stmt) \ 697 do { \ 698 if (RT_UNLIKELY(!(expr))) \ 699 { \ 700 stmt; \ 701 } \ 702 } while (0) 703 #endif 704 674 705 /** @def AssertMsgReturn 675 706 * Assert that an expression is true and returns if it isn't. -
trunk/src/VBox/Devices/Audio/audio.c
r25966 r25984 54 54 #define SW_NAME(sw) (sw)->name ? (sw)->name : "unknown" 55 55 56 /** 57 * @implements PDMIAUDIOCONNECTOR 58 */ 56 59 typedef struct DRVAUDIO 57 60 { … … 1934 1937 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1935 1938 return &pDrvIns->IBase; 1936 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_AUDIO_CONNECTOR) == 0) 1937 return &pThis->IAudioConnector; 1939 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOCONNECTOR, &pThis->IAudioConnector); 1938 1940 return NULL; 1939 1941 } -
trunk/src/VBox/Devices/Audio/audiosniffer.c
r25966 r25984 127 127 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 128 128 return &pThis->Base; 129 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_AUDIO_SNIFFER_PORT) == 0) 130 return &pThis->Port; 129 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOSNIFFERPORT, &pThis->Port); 131 130 return NULL; 132 131 } … … 184 183 if (RT_SUCCESS(rc)) 185 184 { 186 pThis->pDrv = (PPDMIAUDIOSNIFFERCONNECTOR)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_AUDIO_SNIFFER_CONNECTOR); 187 188 if (!pThis->pDrv) 189 { 190 AssertMsgFailed(("LUN #0 doesn't have a Audio Sniffer connector interface rc=%Rrc\n", rc)); 191 rc = VERR_PDM_MISSING_INTERFACE; 192 } 185 pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMIAUDIOSNIFFERCONNECTOR); 186 AssertMsgStmt(pThis->pDrv, ("LUN #0 doesn't have a Audio Sniffer connector interface rc=%Rrc\n", rc), 187 rc = VERR_PDM_MISSING_INTERFACE); 193 188 } 194 189 else if (rc == VERR_PDM_NO_ATTACHED_DRIVER) -
trunk/src/VBox/Devices/Network/DevE1000.cpp
r25981 r25984 4471 4471 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); 4472 4472 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig); 4473 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 4474 return &pThis->ILeds; 4473 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 4475 4474 return NULL; 4476 4475 } … … 5061 5060 if (RT_FAILURE(rc)) 5062 5061 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Failed to attach the status LUN")); 5063 pState->pLedsConnector = (PPDMILEDCONNECTORS)pBase->pfnQueryInterface(pBase, PDMINTERFACE_LED_CONNECTORS);5062 pState->pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS); 5064 5063 5065 5064 rc = PDMDevHlpDriverAttach(pDevIns, 0, &pState->IBase, &pState->pDrvBase, "Network Port"); -
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r25981 r25984 4491 4491 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); 4492 4492 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig); 4493 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 4494 return &pThis->ILeds; 4493 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 4495 4494 return NULL; 4496 4495 } … … 5191 5190 rc = PDMDevHlpDriverAttach(pDevIns, PDM_STATUS_LUN, &pThis->IBase, &pBase, "Status Port"); 5192 5191 if (RT_SUCCESS(rc)) 5193 pThis->pLedsConnector = (PPDMILEDCONNECTORS) 5194 pBase->pfnQueryInterface(pBase, PDMINTERFACE_LED_CONNECTORS); 5192 pThis->pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS); 5195 5193 else if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 5196 5194 { -
trunk/src/VBox/Devices/PC/DevACPI.cpp
r25968 r25984 1943 1943 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1944 1944 return &pThis->IBase; 1945 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_ACPI_PORT) == 0) 1946 return &pThis->IACPIPort; 1945 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIACPIPORT, &pThis->IACPIPort); 1947 1946 return NULL; 1948 1947 } … … 2504 2503 if (RT_SUCCESS(rc)) 2505 2504 { 2506 s->pDrv = (PPDMIACPICONNECTOR)s->pDrvBase->pfnQueryInterface(s->pDrvBase, PDMINTERFACE_ACPI_CONNECTOR);2505 s->pDrv = PDMIBASE_QUERY_INTERFACE(s->pDrvBase, PDMIACPICONNECTOR); 2507 2506 if (!s->pDrv) 2508 2507 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_MISSING_INTERFACE, -
trunk/src/VBox/Devices/PC/DrvACPI.cpp
r25966 r25984 91 91 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 92 92 return &pDrvIns->IBase; 93 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_ACPI_CONNECTOR) == 0) 94 return &pThis->IACPIConnector; 93 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIACPICONNECTOR, &pThis->IACPIConnector); 95 94 return NULL; 96 95 } … … 751 750 * Query the ACPI port interface. 752 751 */ 753 pThis->pPort = (PPDMIACPIPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, 754 PDMINTERFACE_ACPI_PORT); 752 pThis->pPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIACPIPORT); 755 753 if (!pThis->pPort) 756 754 { -
trunk/src/VBox/Devices/Parallel/DevParallel.cpp
r25966 r25984 658 658 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 659 659 return &pThis->IBase; 660 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_HOST_PARALLEL_PORT) == 0) 661 return &pThis->IHostParallelPort; 660 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTPARALLELPORT, &pThis->IHostParallelPort); 662 661 return NULL; 663 662 } … … 832 831 if (RT_SUCCESS(rc)) 833 832 { 834 pThis->pDrvHostParallelConnector = (PDMIHOSTPARALLELCONNECTOR *)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, 835 PDMINTERFACE_HOST_PARALLEL_CONNECTOR); 836 if (!pThis->pDrvHostParallelConnector) 837 { 838 AssertMsgFailed(("Configuration error: instance %d has no host parallel interface!\n", iInstance)); 839 return VERR_PDM_MISSING_INTERFACE; 840 } 833 pThis->pDrvHostParallelConnector = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMIHOSTPARALLELCONNECTOR); 834 AssertMsgReturn(pThis->pDrvHostParallelConnector, 835 ("Configuration error: instance %d has no host parallel interface!\n", iInstance), 836 VERR_PDM_MISSING_INTERFACE); 841 837 /** @todo provide read notification interface!!!! */ 842 838 } -
trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp
r25971 r25984 93 93 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 94 94 return &pDrvIns->IBase; 95 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_HOST_PARALLEL_CONNECTOR) == 0) 96 return &pThis->IHostParallelConnector; 95 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTPARALLELCONNECTOR, &pThis->IHostParallelConnector); 97 96 return NULL; 98 97 } … … 323 322 * Get the IHostParallelPort interface of the above driver/device. 324 323 */ 325 pThis->pDrvHostParallelPort = (PPDMIHOSTPARALLELPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_HOST_PARALLEL_PORT);324 pThis->pDrvHostParallelPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIHOSTPARALLELPORT); 326 325 if (!pThis->pDrvHostParallelPort) 327 326 return PDMDrvHlpVMSetError(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE, RT_SRC_POS, N_("Parallel#%d has no parallel port interface above"), -
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r25974 r25984 2393 2393 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 2394 2394 return &pThis->IBase; 2395 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 2396 return &pThis->ILeds; 2395 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 2397 2396 return NULL; 2398 2397 } … … 6859 6858 rc = PDMDevHlpDriverAttach(pDevIns, PDM_STATUS_LUN, &pThis->IBase, &pBase, "Status Port"); 6860 6859 if (RT_SUCCESS(rc)) 6861 pThis->pLedsConnector = (PDMILEDCONNECTORS *)pBase->pfnQueryInterface(pBase, PDMINTERFACE_LED_CONNECTORS);6860 pThis->pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS); 6862 6861 else if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 6863 6862 { -
trunk/src/VBox/Devices/Storage/DevATA.cpp
r25974 r25984 5236 5236 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 5237 5237 return &pThis->IBase; 5238 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 5239 return &pThis->ILeds; 5238 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 5240 5239 return NULL; 5241 5240 } … … 6775 6774 rc = PDMDevHlpDriverAttach(pDevIns, PDM_STATUS_LUN, &pThis->IBase, &pBase, "Status Port"); 6776 6775 if (RT_SUCCESS(rc)) 6777 pThis->pLedsConnector = (PDMILEDCONNECTORS *)pBase->pfnQueryInterface(pBase, PDMINTERFACE_LED_CONNECTORS);6776 pThis->pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS); 6778 6777 else if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 6779 6778 { -
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r25966 r25984 2357 2357 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 2358 2358 return &pDevice->IBase; 2359 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_SCSI_PORT) == 0) 2360 return &pDevice->ISCSIPort; 2361 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 2362 return &pDevice->ILed; 2359 PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSIPORT, &pDevice->ISCSIPort); 2360 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pDevice->ILed); 2363 2361 return NULL; 2364 2362 } … … 2392 2390 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 2393 2391 return &pThis->IBase; 2394 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 2395 return &pThis->ILeds; 2392 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 2396 2393 return NULL; 2397 2394 } … … 2458 2455 { 2459 2456 /* Get SCSI connector interface. */ 2460 pDevice->pDrvSCSIConnector = (PPDMISCSICONNECTOR)pDevice->pDrvBase->pfnQueryInterface(pDevice->pDrvBase, PDMINTERFACE_SCSI_CONNECTOR);2457 pDevice->pDrvSCSIConnector = PDMIBASE_QUERY_INTERFACE(pDevice->pDrvBase, PDMISCSICONNECTOR); 2461 2458 AssertMsgReturn(pDevice->pDrvSCSIConnector, ("Missing SCSI interface below\n"), VERR_PDM_MISSING_INTERFACE); 2462 2459 pDevice->fPresent = true; … … 2642 2639 { 2643 2640 /* Get SCSI connector interface. */ 2644 pDevice->pDrvSCSIConnector = (PPDMISCSICONNECTOR)pDevice->pDrvBase->pfnQueryInterface(pDevice->pDrvBase, PDMINTERFACE_SCSI_CONNECTOR);2641 pDevice->pDrvSCSIConnector = PDMIBASE_QUERY_INTERFACE(pDevice->pDrvBase, PDMISCSICONNECTOR); 2645 2642 AssertMsgReturn(pDevice->pDrvSCSIConnector, ("Missing SCSI interface below\n"), VERR_PDM_MISSING_INTERFACE); 2646 2643 … … 2667 2664 rc = PDMDevHlpDriverAttach(pDevIns, PDM_STATUS_LUN, &pThis->IBase, &pBase, "Status Port"); 2668 2665 if (RT_SUCCESS(rc)) 2669 pThis->pLedsConnector = (PDMILEDCONNECTORS *)pBase->pfnQueryInterface(pBase, PDMINTERFACE_LED_CONNECTORS);2666 pThis->pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS); 2670 2667 else if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 2671 2668 { -
trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
r25966 r25984 4203 4203 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4204 4204 return &pDevice->IBase; 4205 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_SCSI_PORT) == 0) 4206 return &pDevice->ISCSIPort; 4207 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 4208 return &pDevice->ILed; 4205 PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSIPORT, &pDevice->ISCSIPort); 4206 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pDevice->ILed); 4209 4207 return NULL; 4210 4208 } … … 4238 4236 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4239 4237 return &pThis->IBase; 4240 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 4241 return &pThis->ILeds; 4238 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 4242 4239 return NULL; 4243 4240 } … … 4309 4306 { 4310 4307 /* Get SCSI connector interface. */ 4311 pDevice->pDrvSCSIConnector = (PPDMISCSICONNECTOR)pDevice->pDrvBase->pfnQueryInterface(pDevice->pDrvBase, PDMINTERFACE_SCSI_CONNECTOR);4308 pDevice->pDrvSCSIConnector = PDMIBASE_QUERY_INTERFACE(pDevice->pDrvBase, PDMISCSICONNECTOR); 4312 4309 AssertMsgReturn(pDevice->pDrvSCSIConnector, ("Missing SCSI interface below\n"), VERR_PDM_MISSING_INTERFACE); 4313 4310 } … … 4595 4592 { 4596 4593 /* Get SCSI connector interface. */ 4597 pDevice->pDrvSCSIConnector = (PPDMISCSICONNECTOR)pDevice->pDrvBase->pfnQueryInterface(pDevice->pDrvBase, PDMINTERFACE_SCSI_CONNECTOR);4594 pDevice->pDrvSCSIConnector = PDMIBASE_QUERY_INTERFACE(pDevice->pDrvBase, PDMISCSICONNECTOR); 4598 4595 AssertMsgReturn(pDevice->pDrvSCSIConnector, ("Missing SCSI interface below\n"), VERR_PDM_MISSING_INTERFACE); 4599 4596 } … … 4617 4614 rc = PDMDevHlpDriverAttach(pDevIns, PDM_STATUS_LUN, &pThis->IBase, &pBase, "Status Port"); 4618 4615 if (RT_SUCCESS(rc)) 4619 pThis->pLedsConnector = (PDMILEDCONNECTORS *)pBase->pfnQueryInterface(pBase, PDMINTERFACE_LED_CONNECTORS);4616 pThis->pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS); 4620 4617 else if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 4621 4618 { -
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r25974 r25984 807 807 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 808 808 return &pDrvIns->IBase; 809 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_SCSI_CONNECTOR) == 0) 810 return &pThis->ISCSIConnector; 809 PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSICONNECTOR, &pThis->ISCSIConnector); 811 810 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKPORT, &pThis->IPort); 812 811 return NULL; … … 972 971 973 972 /* Query the SCSI port interface above. */ 974 pThis->pDevScsiPort = (PPDMISCSIPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_SCSI_PORT);973 pThis->pDevScsiPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMISCSIPORT); 975 974 AssertMsgReturn(pThis->pDevScsiPort, ("Missing SCSI port interface above\n"), VERR_PDM_MISSING_INTERFACE); 976 975 … … 978 977 979 978 /* Query the optional LED interface above. */ 980 pThis->pLedPort = (PPDMILEDPORTS)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_LED_PORTS);979 pThis->pLedPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMILEDPORTS); 981 980 if (pThis->pLedPort != NULL) 982 981 { -
trunk/src/VBox/Devices/Storage/DrvSCSIHost.cpp
r25966 r25984 406 406 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 407 407 return &pDrvIns->IBase; 408 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_SCSI_CONNECTOR) == 0) 409 return &pThis->ISCSIConnector; 408 PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSICONNECTOR, &pThis->ISCSIConnector); 410 409 return NULL; 411 410 } … … 465 464 466 465 /* Query the SCSI port interface above. */ 467 pThis->pDevScsiPort = (PPDMISCSIPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_SCSI_PORT);466 pThis->pDevScsiPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMISCSIPORT); 468 467 AssertMsgReturn(pThis->pDevScsiPort, ("Missing SCSI port interface above\n"), VERR_PDM_MISSING_INTERFACE); 469 468 -
trunk/src/VBox/Devices/Storage/fdc.c
r25974 r25984 2542 2542 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 2543 2543 return &pThis->IBaseStatus; 2544 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 2545 return &pThis->ILeds; 2544 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 2546 2545 return NULL; 2547 2546 } … … 2888 2887 rc = PDMDevHlpDriverAttach (pDevIns, PDM_STATUS_LUN, &fdctrl->IBaseStatus, &pBase, "Status Port"); 2889 2888 if (RT_SUCCESS (rc)) { 2890 fdctrl->pLedsConnector = 2891 pBase->pfnQueryInterface (pBase, PDMINTERFACE_LED_CONNECTORS); 2889 fdctrl->pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS); 2892 2890 } else if (rc != VERR_PDM_NO_ATTACHED_DRIVER) { 2893 2891 AssertMsgFailed (("Failed to attach to status driver. rc=%Rrc\n", -
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r25966 r25984 1836 1836 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1837 1837 return &pThis->Base; 1838 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_VMMDEV_PORT) == 0) 1839 return &pThis->Port; 1838 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIVMMDEVPORT, &pThis->Port); 1840 1839 #ifdef VBOX_WITH_HGCM 1841 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_HGCM_PORT) == 0) 1842 return &pThis->HGCMPort; 1840 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHGCMPORT, &pThis->HGCMPort); 1843 1841 #endif 1844 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 1845 /* Currently only for shared folders */ 1846 return &pThis->SharedFolders.ILeds; 1842 /* Currently only for shared folders. */ 1843 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->SharedFolders.ILeds); 1847 1844 return NULL; 1848 1845 } … … 2590 2587 if (RT_SUCCESS(rc)) 2591 2588 { 2592 pThis->pDrv = (PPDMIVMMDEVCONNECTOR)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_VMMDEV_CONNECTOR); 2593 if (!pThis->pDrv) 2594 AssertMsgFailedReturn(("LUN #0 doesn't have a VMMDev connector interface!\n"), VERR_PDM_MISSING_INTERFACE); 2589 pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMIVMMDEVCONNECTOR); 2590 AssertMsgReturn(pThis->pDrv, ("LUN #0 doesn't have a VMMDev connector interface!\n"), VERR_PDM_MISSING_INTERFACE); 2595 2591 #ifdef VBOX_WITH_HGCM 2596 pThis->pHGCMDrv = (PPDMIHGCMCONNECTOR)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_HGCM_CONNECTOR);2592 pThis->pHGCMDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMIHGCMCONNECTOR); 2597 2593 if (!pThis->pHGCMDrv) 2598 2594 { … … 2616 2612 rc = PDMDevHlpDriverAttach(pDevIns, PDM_STATUS_LUN, &pThis->Base, &pBase, "Status Port"); 2617 2613 if (RT_SUCCESS(rc)) 2618 pThis->SharedFolders.pLedsConnector = (PPDMILEDCONNECTORS) 2619 pBase->pfnQueryInterface(pBase, PDMINTERFACE_LED_CONNECTORS); 2614 pThis->SharedFolders.pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS); 2620 2615 else if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 2621 2616 { -
trunk/src/VBox/Devices/VirtIO/Virtio.cpp
r25966 r25984 533 533 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 534 534 return &pThis->IBase; 535 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 536 return &pThis->ILeds; 535 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 537 536 return NULL; 538 537 } … … 837 836 if (RT_FAILURE(rc)) 838 837 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Failed to attach the status LUN")); 839 pState->pLedsConnector = (PPDMILEDCONNECTORS)pBase->pfnQueryInterface(pBase, PDMINTERFACE_LED_CONNECTORS);838 pState->pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS); 840 839 841 840 pState->nQueues = nQueues; -
trunk/src/VBox/Frontends/VBoxBFE/HostUSBImpl.cpp
r23021 r25984 224 224 return setError (E_FAIL, 225 225 tr ("Device is not in a capturable state")); 226 PVUSBIRHCONFIG pRhConfig = (PVUSBIRHCONFIG)pBase->pfnQueryInterface (pBase, PDMINTERFACE_VUSB_RH_CONFIG);227 AssertReturn 226 PVUSBIRHCONFIG pRhConfig = PDMIBASE_QUERY_INTERFACE(pBase, VUSBIRHCONFIG); 227 AssertReturn(pRhConfig, E_FAIL); 228 228 229 229 /* … … 293 293 if (RT_SUCCESS (vrc)) 294 294 { 295 PVUSBIRHCONFIG pRhConfig = (PVUSBIRHCONFIG)pBase->pfnQueryInterface (pBase, PDMINTERFACE_VUSB_RH_CONFIG);296 Assert 295 PVUSBIRHCONFIG pRhConfig = PDMIBASE_QUERY_INTERFACE(pBase, VUSBIRHCONFIG); 296 Assert(pRhConfig); 297 297 298 298 RTUUID Uuid = aDevice->id(); -
trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.cpp
r25966 r25984 6 6 7 7 /* 8 * Copyright (C) 2006-20 07Sun Microsystems, Inc.8 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 93 93 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 94 94 return &pDrvIns->IBase; 95 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_CONNECTORS) == 0) 96 return &pDrv->ILedConnectors; 95 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDCONNECTORS, &pDrv->ILedConnectors); 97 96 return NULL; 98 97 } … … 180 179 * query the LEDs we want. 181 180 */ 182 pData->pLedPorts = (PPDMILEDPORTS)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_LED_PORTS); 183 if (!pData->pLedPorts) 184 { 185 AssertMsgFailed(("Configuration error: No led ports interface above!\n")); 186 return VERR_PDM_MISSING_INTERFACE_ABOVE; 187 } 181 pData->pLedPorts = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMILEDPORTS); 182 AssertMsgReturn(pData->pLedPorts, ("Configuration error: No led ports interface above!\n"), 183 VERR_PDM_MISSING_INTERFACE_ABOVE); 188 184 189 185 for (unsigned i = pData->iFirstLUN; i <= pData->iLastLUN; i++) -
trunk/src/VBox/Frontends/VBoxBFE/VMControl.cpp
r25771 r25984 103 103 { 104 104 Assert (pBase); 105 PPDMIACPIPORT pPort = 106 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 105 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 107 106 vrc = pPort ? pPort->pfnPowerButtonPress(pPort) : VERR_INVALID_POINTER; 108 107 } … … 121 120 { 122 121 Assert (pBase); 123 PPDMIACPIPORT pPort = 124 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 122 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 125 123 vrc = pPort ? pPort->pfnSleepButtonPress(pPort) : VERR_INVALID_POINTER; 126 124 } -
trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp
r25966 r25984 6 6 7 7 /* 8 * Copyright (C) 2006-20 07Sun Microsystems, Inc.8 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 353 353 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 354 354 return &pDrvIns->IBase; 355 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_VMMDEV_CONNECTOR) == 0) 356 return &pDrv->Connector; 357 #ifdef VBOX_WITH_HGCM 358 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_HGCM_CONNECTOR) == 0) 359 { 360 if (fActivateHGCM()) 361 return &pDrv->HGCMConnector; 362 return NULL; 363 } 355 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIVMMDEVCONNECTOR, &pDrv->Connector); 356 #ifdef VBOX_WITH_HGCM 357 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHGCMCONNECTOR, fActivateHGCM() ? &pDrv->HGCMConnector : NULL); 364 358 #endif 365 359 return NULL; … … 426 420 * Get the IVMMDevPort interface of the above driver/device. 427 421 */ 428 pData->pUpPort = (PPDMIVMMDEVPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_VMMDEV_PORT); 429 if (!pData->pUpPort) 430 { 431 AssertMsgFailed(("Configuration error: No VMMDev port interface above!\n")); 432 return VERR_PDM_MISSING_INTERFACE_ABOVE; 433 } 422 pData->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIVMMDEVPORT); 423 AssertMsgReturn(pData->pUpPort, ("Configuration error: No VMMDev port interface above!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE); 434 424 435 425 #ifdef VBOX_WITH_HGCM 436 426 if (fActivateHGCM()) 437 427 { 438 pData->pHGCMPort = (PPDMIHGCMPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_HGCM_PORT); 439 if (!pData->pHGCMPort) 440 { 441 AssertMsgFailed(("Configuration error: No HGCM port interface above!\n")); 442 return VERR_PDM_MISSING_INTERFACE_ABOVE; 443 } 428 pData->pHGCMPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIHGCMPORT); 429 AssertMsgReturn(pData->pHGCMPort, ("Configuration error: No HGCM port interface above!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE); 444 430 } 445 431 #endif -
trunk/src/VBox/Main/AudioSnifferInterface.cpp
r25966 r25984 126 126 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 127 127 return &pDrvIns->IBase; 128 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_AUDIO_SNIFFER_CONNECTOR) == 0) 129 return &pDrv->Connector; 128 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOSNIFFERCONNECTOR, &pDrv->Connector); 130 129 return NULL; 131 130 } … … 181 180 * Get the Audio Sniffer Port interface of the above driver/device. 182 181 */ 183 pThis->pUpPort = (PPDMIAUDIOSNIFFERPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_AUDIO_SNIFFER_PORT);182 pThis->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIAUDIOSNIFFERPORT); 184 183 if (!pThis->pUpPort) 185 184 { -
trunk/src/VBox/Main/ConsoleImpl.cpp
r25981 r25984 1787 1787 Assert(pBase); 1788 1788 1789 PPDMIACPIPORT pPort = 1790 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 1789 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 1791 1790 1792 1791 vrc = getVMMDev()->getVMMDevPort()->pfnCpuHotUnplug(getVMMDev()->getVMMDevPort(), idCpuCore, idCpuPackage); … … 2083 2082 { 2084 2083 Assert(pBase); 2085 PPDMIACPIPORT pPort = 2086 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 2084 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 2087 2085 vrc = pPort ? pPort->pfnPowerButtonPress(pPort) : VERR_INVALID_POINTER; 2088 2086 } … … 2128 2126 { 2129 2127 Assert(pBase); 2130 PPDMIACPIPORT pPort = 2131 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 2128 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 2132 2129 vrc = pPort ? pPort->pfnGetPowerButtonHandled(pPort, &handled) : VERR_INVALID_POINTER; 2133 2130 } … … 2175 2172 { 2176 2173 Assert(pBase); 2177 PPDMIACPIPORT pPort = 2178 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 2174 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 2179 2175 vrc = pPort ? pPort->pfnGetGuestEnteredACPIMode(pPort, &entered) : VERR_INVALID_POINTER; 2180 2176 } … … 2209 2205 { 2210 2206 Assert(pBase); 2211 PPDMIACPIPORT pPort = 2212 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 2207 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 2213 2208 vrc = pPort ? pPort->pfnSleepButtonPress(pPort) : VERR_INVALID_POINTER; 2214 2209 } … … 8137 8132 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 8138 8133 return &pDrvIns->IBase; 8139 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_CONNECTORS) == 0) 8140 return &pThis->ILedConnectors; 8134 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDCONNECTORS, &pThis->ILedConnectors); 8141 8135 return NULL; 8142 8136 } … … 8224 8218 * query the LEDs we want. 8225 8219 */ 8226 pData->pLedPorts = (PPDMILEDPORTS)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_LED_PORTS); 8227 if (!pData->pLedPorts) 8228 { 8229 AssertMsgFailed(("Configuration error: No led ports interface above!\n")); 8230 return VERR_PDM_MISSING_INTERFACE_ABOVE; 8231 } 8220 pData->pLedPorts = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMILEDPORTS); 8221 AssertMsgReturn(pData->pLedPorts, ("Configuration error: No led ports interface above!\n"), 8222 VERR_PDM_MISSING_INTERFACE_ABOVE); 8232 8223 8233 8224 for (unsigned i = pData->iFirstLUN; i <= pData->iLastLUN; ++i) -
trunk/src/VBox/Main/VMMDevInterface.cpp
r25973 r25984 661 661 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 662 662 return &pDrvIns->IBase; 663 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_VMMDEV_CONNECTOR) == 0) 664 return &pDrv->Connector; 665 #ifdef VBOX_WITH_HGCM 666 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_HGCM_CONNECTOR) == 0) 667 return &pDrv->HGCMConnector; 663 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIVMMDEVCONNECTOR, &pDrv->Connector); 664 #ifdef VBOX_WITH_HGCM 665 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHGCMCONNECTOR, &pDrv->HGCMConnector); 668 666 #endif 669 667 return NULL; … … 751 749 * Get the IVMMDevPort interface of the above driver/device. 752 750 */ 753 pData->pUpPort = (PPDMIVMMDEVPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_VMMDEV_PORT); 754 if (!pData->pUpPort) 755 { 756 AssertMsgFailed(("Configuration error: No VMMDev port interface above!\n")); 757 return VERR_PDM_MISSING_INTERFACE_ABOVE; 758 } 759 760 #ifdef VBOX_WITH_HGCM 761 pData->pHGCMPort = (PPDMIHGCMPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_HGCM_PORT); 762 if (!pData->pHGCMPort) 763 { 764 AssertMsgFailed(("Configuration error: No HGCM port interface above!\n")); 765 return VERR_PDM_MISSING_INTERFACE_ABOVE; 766 } 751 pData->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIVMMDEVPORT); 752 AssertMsgReturn(pData->pUpPort, ("Configuration error: No VMMDev port interface above!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE); 753 754 #ifdef VBOX_WITH_HGCM 755 pData->pHGCMPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIHGCMPORT); 756 AssertMsgReturn(pData->pHGCMPort, ("Configuration error: No HGCM port interface above!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE); 767 757 #endif 768 758 … … 791 781 792 782 LogRel(("Shared Folders service loaded.\n")); 793 pLedPort = (PPDMILEDPORTS)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_LED_PORTS); 794 if (!pLedPort) 795 { 796 AssertMsgFailed(("Configuration error: No LED port interface above!\n")); 797 return VERR_PDM_MISSING_INTERFACE_ABOVE; 798 } 783 pLedPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMILEDPORTS); 784 AssertMsgReturn(pLedPort, ("Configuration error: No LED port interface above!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE); 799 785 rc = pLedPort->pfnQueryStatusLed(pLedPort, 0, &pLed); 800 786 if (RT_SUCCESS(rc) && pLed)
Note:
See TracChangeset
for help on using the changeset viewer.