Changeset 42551 in vbox for trunk/src/VBox/Main/src-client/PCIRawDevImpl.cpp
- Timestamp:
- Aug 2, 2012 4:44:39 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 79727
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/PCIRawDevImpl.cpp
r42497 r42551 5 5 6 6 /* 7 * Copyright (C) 2010-201 1Oracle Corporation7 * Copyright (C) 2010-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 #include "Logging.h" 18 #include "P ciRawDevImpl.h"19 #include "P ciDeviceAttachmentImpl.h"18 #include "PCIRawDevImpl.h" 19 #include "PCIDeviceAttachmentImpl.h" 20 20 #include "ConsoleImpl.h" 21 21 #include "MachineImpl.h" … … 30 30 { 31 31 /** Pointer to the real PCI raw object. */ 32 P ciRawDev *pPciRawDev;32 PCIRawDev *pPCIRawDev; 33 33 /** Pointer to the driver instance structure. */ 34 34 PPDMDRVINS pDrvIns; … … 41 41 // constructor / destructor 42 42 // 43 P ciRawDev::PciRawDev(Console *console)43 PCIRawDev::PCIRawDev(Console *console) 44 44 : mpDrv(NULL), 45 45 mParent(console) … … 47 47 } 48 48 49 P ciRawDev::~PciRawDev()49 PCIRawDev::~PCIRawDev() 50 50 { 51 51 } … … 54 54 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 55 55 */ 56 DECLCALLBACK(void *) P ciRawDev::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID)56 DECLCALLBACK(void *) PCIRawDev::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID) 57 57 { 58 58 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); … … 69 69 * @interface_method_impl{PDMIPCIRAWUP,pfnPciDeviceConstructComplete} 70 70 */ 71 DECLCALLBACK(int) P ciRawDev::drvDeviceConstructComplete(PPDMIPCIRAWCONNECTOR pInterface, const char *pcszName,72 uint32_t uHostP ciAddress, uint32_t uGuestPciAddress,71 DECLCALLBACK(int) PCIRawDev::drvDeviceConstructComplete(PPDMIPCIRAWCONNECTOR pInterface, const char *pcszName, 72 uint32_t uHostPCIAddress, uint32_t uGuestPCIAddress, 73 73 int rc) 74 74 { 75 75 PDRVMAINPCIRAWDEV pThis = RT_FROM_CPP_MEMBER(pInterface, DRVMAINPCIRAWDEV, IConnector); 76 Console *pConsole = pThis->pP ciRawDev->getParent();76 Console *pConsole = pThis->pPCIRawDev->getParent(); 77 77 const ComPtr<IMachine>& machine = pConsole->machine(); 78 78 ComPtr<IVirtualBox> vbox; … … 89 89 Assert(SUCCEEDED(hrc)); 90 90 91 ComObjPtr<P ciDeviceAttachment> pda;91 ComObjPtr<PCIDeviceAttachment> pda; 92 92 BstrFmt bstrName(pcszName); 93 93 pda.createObject(); 94 pda->init(machine, bstrName, uHostP ciAddress, uGuestPciAddress, TRUE);94 pda->init(machine, bstrName, uHostPCIAddress, uGuestPCIAddress, TRUE); 95 95 96 96 Bstr msg(""); … … 98 98 msg = BstrFmt("runtime error %Rrc", rc); 99 99 100 fireHostP ciDevicePlugEvent(es, bstrId.raw(), true /* plugged */, RT_SUCCESS(rc) /* success */, pda, msg.raw());100 fireHostPCIDevicePlugEvent(es, bstrId.raw(), true /* plugged */, RT_SUCCESS(rc) /* success */, pda, msg.raw()); 101 101 102 102 return VINF_SUCCESS; … … 110 110 * @param pDrvIns The driver instance data. 111 111 */ 112 DECLCALLBACK(void) P ciRawDev::drvDestruct(PPDMDRVINS pDrvIns)112 DECLCALLBACK(void) PCIRawDev::drvDestruct(PPDMDRVINS pDrvIns) 113 113 { 114 114 PDRVMAINPCIRAWDEV pData = PDMINS_2_DATA(pDrvIns, PDRVMAINPCIRAWDEV); 115 115 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 116 116 117 if (pData->pP ciRawDev)118 pData->pP ciRawDev->mpDrv = NULL;117 if (pData->pPCIRawDev) 118 pData->pPCIRawDev->mpDrv = NULL; 119 119 } 120 120 … … 126 126 * @param pDrvIns The driver instance data. 127 127 */ 128 DECLCALLBACK(void) P ciRawDev::drvReset(PPDMDRVINS pDrvIns)128 DECLCALLBACK(void) PCIRawDev::drvReset(PPDMDRVINS pDrvIns) 129 129 { 130 130 } … … 136 136 * @copydoc FNPDMDRVCONSTRUCT 137 137 */ 138 DECLCALLBACK(int) P ciRawDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)138 DECLCALLBACK(int) PCIRawDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 139 139 { 140 140 PDRVMAINPCIRAWDEV pData = PDMINS_2_DATA(pDrvIns, PDRVMAINPCIRAWDEV); … … 154 154 * IBase. 155 155 */ 156 pDrvIns->IBase.pfnQueryInterface = P ciRawDev::drvQueryInterface;156 pDrvIns->IBase.pfnQueryInterface = PCIRawDev::drvQueryInterface; 157 157 158 158 /* 159 159 * IConnector. 160 160 */ 161 pData->IConnector.pfnDeviceConstructComplete = P ciRawDev::drvDeviceConstructComplete;161 pData->IConnector.pfnDeviceConstructComplete = PCIRawDev::drvDeviceConstructComplete; 162 162 163 163 /* … … 172 172 } 173 173 174 pData->pP ciRawDev = (PciRawDev*)pv;175 pData->pP ciRawDev->mpDrv = pData;174 pData->pPCIRawDev = (PCIRawDev *)pv; 175 pData->pPCIRawDev->mpDrv = pData; 176 176 177 177 return VINF_SUCCESS; … … 181 181 * Main raw PCI driver registration record. 182 182 */ 183 const PDMDRVREG P ciRawDev::DrvReg =183 const PDMDRVREG PCIRawDev::DrvReg = 184 184 { 185 185 /* u32Version */ … … 202 202 sizeof(DRVMAINPCIRAWDEV), 203 203 /* pfnConstruct */ 204 P ciRawDev::drvConstruct,204 PCIRawDev::drvConstruct, 205 205 /* pfnDestruct */ 206 P ciRawDev::drvDestruct,206 PCIRawDev::drvDestruct, 207 207 /* pfnRelocate */ 208 208 NULL, … … 212 212 NULL, 213 213 /* pfnReset */ 214 P ciRawDev::drvReset,214 PCIRawDev::drvReset, 215 215 /* pfnSuspend */ 216 216 NULL,
Note:
See TracChangeset
for help on using the changeset viewer.