Changeset 22277 in vbox for trunk/src/VBox/Frontends/VBoxBFE
- Timestamp:
- Aug 16, 2009 9:12:50 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxBFE
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r21227 r22277 1176 1176 * Construct a display driver instance. 1177 1177 * 1178 * @returns VBox status. 1179 * @param pDrvIns The driver instance data. 1180 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 1181 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 1182 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 1183 * iInstance it's expected to be used a bit in this function. 1184 */ 1185 DECLCALLBACK(int) VMDisplay::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 1178 * @copydoc FNPDMDRVCONSTRUCT 1179 */ 1180 DECLCALLBACK(int) VMDisplay::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 1186 1181 { 1187 1182 PDRVMAINDISPLAY pData = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY); … … 1194 1189 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 1195 1190 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 1196 PPDMIBASE pBaseIgnore; 1197 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 1198 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 1199 { 1200 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 1201 return VERR_PDM_DRVINS_NO_ATTACH; 1202 } 1191 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 1192 ("Configuration error: Not possible to attach anything to this driver!\n"), 1193 VERR_PDM_DRVINS_NO_ATTACH); 1203 1194 1204 1195 /* … … 1229 1220 */ 1230 1221 void *pv; 1231 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);1222 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 1232 1223 if (RT_FAILURE(rc)) 1233 1224 { … … 1286 1277 /* pfnResume */ 1287 1278 NULL, 1279 /* pfnAttach */ 1280 NULL, 1288 1281 /* pfnDetach */ 1289 NULL 1282 NULL, 1283 /* pfnPowerOff */ 1284 NULL, 1285 /* pfnSoftReset */ 1286 NULL, 1287 /* u32EndVersion */ 1288 PDM_DRVREG_VERSION 1290 1289 }; 1290 -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h
r21227 r22277 69 69 70 70 static DECLCALLBACK(void*) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 71 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );71 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 72 72 static DECLCALLBACK(int) displayResizeCallback(PPDMIDISPLAYCONNECTOR pInterface, uint32_t bpp, void *pvVRAM, uint32_t cbLine, uint32_t cx, uint32_t cy); 73 73 static DECLCALLBACK(void) displayUpdateCallback(PPDMIDISPLAYCONNECTOR pInterface, -
trunk/src/VBox/Frontends/VBoxBFE/KeyboardImpl.cpp
r13837 r22277 208 208 * Construct a keyboard driver instance. 209 209 * 210 * @returns VBox status. 211 * @param pDrvIns The driver instance data. 212 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 213 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 214 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 215 * iInstance it's expected to be used a bit in this function. 216 */ 217 DECLCALLBACK(int) Keyboard::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 210 * @copydoc FNPDMDRVCONSTRUCT 211 */ 212 DECLCALLBACK(int) Keyboard::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 218 213 { 219 214 PDRVMAINKEYBOARD pData = PDMINS_2_DATA(pDrvIns, PDRVMAINKEYBOARD); … … 225 220 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 226 221 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 227 PPDMIBASE pBaseIgnore; 228 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 229 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 230 { 231 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 232 return VERR_PDM_DRVINS_NO_ATTACH; 233 } 222 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 223 ("Configuration error: Not possible to attach anything to this driver!\n"), 224 VERR_PDM_DRVINS_NO_ATTACH); 234 225 235 226 /* … … 254 245 */ 255 246 void *pv; 256 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);247 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 257 248 if (RT_FAILURE(rc)) 258 249 { … … 300 291 /* pfnResume */ 301 292 NULL, 293 /* pfnAttach */ 294 NULL, 302 295 /* pfnDetach */ 303 NULL 296 NULL, 297 /* pfnPowerOff */ 298 NULL, 299 /* pfnSoftReset */ 300 NULL, 301 /* u32EndVersion */ 302 PDM_DRVREG_VERSION 304 303 }; -
trunk/src/VBox/Frontends/VBoxBFE/KeyboardImpl.h
r11661 r22277 57 57 58 58 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 59 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );59 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 60 60 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 61 61 -
trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp
r21226 r22277 216 216 * Construct a mouse driver instance. 217 217 * 218 * @returns VBox status. 219 * @param pDrvIns The driver instance data. 220 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 221 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 222 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 223 * iInstance it's expected to be used a bit in this function. 224 */ 225 DECLCALLBACK(int) Mouse::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 218 * @copydoc FNPDMDRVCONSTRUCT 219 */ 220 DECLCALLBACK(int) Mouse::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 226 221 { 227 222 PDRVMAINMOUSE pData = PDMINS_2_DATA(pDrvIns, PDRVMAINMOUSE); … … 233 228 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 234 229 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 235 236 PPDMIBASE pBaseIgnore; 237 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 238 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 239 { 240 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 241 return VERR_PDM_DRVINS_NO_ATTACH; 242 } 230 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 231 ("Configuration error: Not possible to attach anything to this driver!\n"), 232 VERR_PDM_DRVINS_NO_ATTACH); 243 233 244 234 /* … … 261 251 */ 262 252 void *pv; 263 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);253 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 264 254 if (RT_FAILURE(rc)) 265 255 { … … 308 298 /* pfnResume */ 309 299 NULL, 300 /* pfnAttach */ 301 NULL, 310 302 /* pfnDetach */ 311 NULL 303 NULL, 304 /* pfnPowerOff */ 305 NULL, 306 /* pfnSoftReset */ 307 NULL, 308 /* u32EndVersion */ 309 PDM_DRVREG_VERSION 312 310 }; 311 -
trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.h
r8155 r22277 69 69 70 70 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 71 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );71 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 72 72 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 73 73 -
trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.cpp
r13837 r22277 129 129 * Construct a status driver instance. 130 130 * 131 * @returns VBox status. 132 * @param pDrvIns The driver instance data. 133 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 134 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 135 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 136 * iInstance it's expected to be used a bit in this function. 137 */ 138 DECLCALLBACK(int) VMStatus::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 131 * @copydoc FNPDMDRVCONSTRUCT 132 */ 133 DECLCALLBACK(int) VMStatus::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 139 134 { 140 135 PDRVMAINSTATUS pData = PDMINS_2_DATA(pDrvIns, PDRVMAINSTATUS); … … 146 141 if (!CFGMR3AreValuesValid(pCfgHandle, "papLeds\0First\0Last\0")) 147 142 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 148 PPDMIBASE pBaseIgnore; 149 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 150 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 151 { 152 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 153 return VERR_PDM_DRVINS_NO_ATTACH; 154 } 143 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 144 ("Configuration error: Not possible to attach anything to this driver!\n"), 145 VERR_PDM_DRVINS_NO_ATTACH); 155 146 156 147 /* … … 163 154 * Read config. 164 155 */ 165 rc = CFGMR3QueryPtr(pCfgHandle, "papLeds", (void **)&pData->papLeds);156 int rc = CFGMR3QueryPtr(pCfgHandle, "papLeds", (void **)&pData->papLeds); 166 157 if (RT_FAILURE(rc)) 167 158 { … … 244 235 /* pfnResume */ 245 236 NULL, 237 /* pfnAttach */ 238 NULL, 246 239 /* pfnDetach */ 247 NULL 240 NULL, 241 /* pfnPowerOff */ 242 NULL, 243 /* pfnSoftReset */ 244 NULL, 245 /* u32EndVersion */ 246 PDM_DRVREG_VERSION 248 247 }; 248 -
trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.h
r8155 r22277 36 36 static DECLCALLBACK(void) drvUnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN); 37 37 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 38 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );38 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 39 39 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 40 40 }; -
trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp
r21227 r22277 387 387 * Construct a VMMDev driver instance. 388 388 * 389 * @returns VBox status. 390 * @param pDrvIns The driver instance data. 391 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 392 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 393 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 394 * iInstance it's expected to be used a bit in this function. 395 */ 396 DECLCALLBACK(int) VMMDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 389 * @copydoc FNPDMDRVCONSTRUCT 390 */ 391 DECLCALLBACK(int) VMMDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 397 392 { 398 393 PDRVMAINVMMDEV pData = PDMINS_2_DATA(pDrvIns, PDRVMAINVMMDEV); … … 404 399 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 405 400 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 406 407 PPDMIBASE pBaseIgnore; 408 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 409 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 410 { 411 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 412 return VERR_PDM_DRVINS_NO_ATTACH; 413 } 401 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 402 ("Configuration error: Not possible to attach anything to this driver!\n"), 403 VERR_PDM_DRVINS_NO_ATTACH); 414 404 415 405 /* … … 464 454 */ 465 455 void *pv; 466 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);456 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 467 457 if (RT_FAILURE(rc)) 468 458 { … … 525 515 /* pfnResume */ 526 516 NULL, 517 /* pfnAttach */ 518 NULL, 527 519 /* pfnDetach */ 528 NULL 520 NULL, 521 /* pfnPowerOff */ 522 NULL, 523 /* pfnSoftReset */ 524 NULL, 525 /* u32EndVersion */ 526 PDM_DRVREG_VERSION 529 527 }; 528 -
trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.h
r8155 r22277 56 56 static DECLCALLBACK(void) UpdateMouseCapabilities(PPDMIVMMDEVCONNECTOR pInterface, uint32_t newCapabilities); 57 57 static DECLCALLBACK(void) UpdatePointerShape(PPDMIVMMDEVCONNECTOR pInterface, bool fVisible, bool fAlpha, 58 59 60 58 uint32_t xHot, uint32_t yHot, 59 uint32_t width, uint32_t height, 60 void *pShape); 61 61 static DECLCALLBACK(int) VideoModeSupported(PPDMIVMMDEVCONNECTOR pInterface, uint32_t width, uint32_t height, 62 62 uint32_t bpp, bool *fSupported); … … 64 64 65 65 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 66 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );66 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 67 67 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 68 68 };
Note:
See TracChangeset
for help on using the changeset viewer.