VirtualBox

Changeset 22277 in vbox for trunk/src/VBox/Frontends/VBoxBFE


Ignore:
Timestamp:
Aug 16, 2009 9:12:50 PM (15 years ago)
Author:
vboxsync
Message:

PDMDRVREG change (big changeset).

Location:
trunk/src/VBox/Frontends/VBoxBFE
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp

    r21227 r22277  
    11761176 * Construct a display driver instance.
    11771177 *
    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 */
     1180DECLCALLBACK(int) VMDisplay::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
    11861181{
    11871182    PDRVMAINDISPLAY pData = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY);
     
    11941189    if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0"))
    11951190        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);
    12031194
    12041195    /*
     
    12291220     */
    12301221    void *pv;
    1231     rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);
     1222    int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);
    12321223    if (RT_FAILURE(rc))
    12331224    {
     
    12861277    /* pfnResume */
    12871278    NULL,
     1279    /* pfnAttach */
     1280    NULL,
    12881281    /* pfnDetach */
    1289     NULL
     1282    NULL,
     1283    /* pfnPowerOff */
     1284    NULL,
     1285    /* pfnSoftReset */
     1286    NULL,
     1287    /* u32EndVersion */
     1288    PDM_DRVREG_VERSION
    12901289};
     1290
  • trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h

    r21227 r22277  
    6969
    7070    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);
    7272    static DECLCALLBACK(int)   displayResizeCallback(PPDMIDISPLAYCONNECTOR pInterface, uint32_t bpp, void *pvVRAM, uint32_t cbLine, uint32_t cx, uint32_t cy);
    7373    static DECLCALLBACK(void)  displayUpdateCallback(PPDMIDISPLAYCONNECTOR pInterface,
  • trunk/src/VBox/Frontends/VBoxBFE/KeyboardImpl.cpp

    r13837 r22277  
    208208 * Construct a keyboard driver instance.
    209209 *
    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 */
     212DECLCALLBACK(int) Keyboard::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
    218213{
    219214    PDRVMAINKEYBOARD pData = PDMINS_2_DATA(pDrvIns, PDRVMAINKEYBOARD);
     
    225220    if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0"))
    226221        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);
    234225
    235226    /*
     
    254245     */
    255246    void *pv;
    256     rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);
     247    int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);
    257248    if (RT_FAILURE(rc))
    258249    {
     
    300291    /* pfnResume */
    301292    NULL,
     293    /* pfnAttach */
     294    NULL,
    302295    /* pfnDetach */
    303     NULL
     296    NULL,
     297    /* pfnPowerOff */
     298    NULL,
     299    /* pfnSoftReset */
     300    NULL,
     301    /* u32EndVersion */
     302    PDM_DRVREG_VERSION
    304303};
  • trunk/src/VBox/Frontends/VBoxBFE/KeyboardImpl.h

    r11661 r22277  
    5757
    5858    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);
    6060    static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
    6161
  • trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp

    r21226 r22277  
    216216 * Construct a mouse driver instance.
    217217 *
    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 */
     220DECLCALLBACK(int) Mouse::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
    226221{
    227222    PDRVMAINMOUSE pData = PDMINS_2_DATA(pDrvIns, PDRVMAINMOUSE);
     
    233228    if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0"))
    234229        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);
    243233
    244234    /*
     
    261251     */
    262252    void *pv;
    263     rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);
     253    int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);
    264254    if (RT_FAILURE(rc))
    265255    {
     
    308298    /* pfnResume */
    309299    NULL,
     300    /* pfnAttach */
     301    NULL,
    310302    /* pfnDetach */
    311     NULL
     303    NULL,
     304    /* pfnPowerOff */
     305    NULL,
     306    /* pfnSoftReset */
     307    NULL,
     308    /* u32EndVersion */
     309    PDM_DRVREG_VERSION
    312310};
     311
  • trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.h

    r8155 r22277  
    6969
    7070    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);
    7272    static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
    7373
  • trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.cpp

    r13837 r22277  
    129129 * Construct a status driver instance.
    130130 *
    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 */
     133DECLCALLBACK(int) VMStatus::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
    139134{
    140135    PDRVMAINSTATUS pData = PDMINS_2_DATA(pDrvIns, PDRVMAINSTATUS);
     
    146141    if (!CFGMR3AreValuesValid(pCfgHandle, "papLeds\0First\0Last\0"))
    147142        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);
    155146
    156147    /*
     
    163154     * Read config.
    164155     */
    165     rc = CFGMR3QueryPtr(pCfgHandle, "papLeds", (void **)&pData->papLeds);
     156    int rc = CFGMR3QueryPtr(pCfgHandle, "papLeds", (void **)&pData->papLeds);
    166157    if (RT_FAILURE(rc))
    167158    {
     
    244235    /* pfnResume */
    245236    NULL,
     237    /* pfnAttach */
     238    NULL,
    246239    /* pfnDetach */
    247     NULL
     240    NULL,
     241    /* pfnPowerOff */
     242    NULL,
     243    /* pfnSoftReset */
     244    NULL,
     245    /* u32EndVersion */
     246    PDM_DRVREG_VERSION
    248247};
     248
  • trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.h

    r8155 r22277  
    3636    static DECLCALLBACK(void)   drvUnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN);
    3737    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);
    3939    static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
    4040};
  • trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp

    r21227 r22277  
    387387 * Construct a VMMDev driver instance.
    388388 *
    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 */
     391DECLCALLBACK(int) VMMDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
    397392{
    398393    PDRVMAINVMMDEV pData = PDMINS_2_DATA(pDrvIns, PDRVMAINVMMDEV);
     
    404399    if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0"))
    405400        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);
    414404
    415405    /*
     
    464454     */
    465455    void *pv;
    466     rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);
     456    int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);
    467457    if (RT_FAILURE(rc))
    468458    {
     
    525515    /* pfnResume */
    526516    NULL,
     517    /* pfnAttach */
     518    NULL,
    527519    /* pfnDetach */
    528     NULL
     520    NULL,
     521    /* pfnPowerOff */
     522    NULL,
     523    /* pfnSoftReset */
     524    NULL,
     525    /* u32EndVersion */
     526    PDM_DRVREG_VERSION
    529527};
     528
  • trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.h

    r8155 r22277  
    5656    static DECLCALLBACK(void)   UpdateMouseCapabilities(PPDMIVMMDEVCONNECTOR pInterface, uint32_t newCapabilities);
    5757    static DECLCALLBACK(void)   UpdatePointerShape(PPDMIVMMDEVCONNECTOR pInterface, bool fVisible, bool fAlpha,
    58                                                      uint32_t xHot, uint32_t yHot,
    59                                                      uint32_t width, uint32_t height,
    60                                                      void *pShape);
     58                                                   uint32_t xHot, uint32_t yHot,
     59                                                   uint32_t width, uint32_t height,
     60                                                   void *pShape);
    6161    static DECLCALLBACK(int)    VideoModeSupported(PPDMIVMMDEVCONNECTOR pInterface, uint32_t width, uint32_t height,
    6262                                                   uint32_t bpp, bool *fSupported);
     
    6464
    6565    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);
    6767    static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
    6868};
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette