Changeset 25966 in vbox for trunk/src/VBox/Frontends/VBoxBFE
- Timestamp:
- Jan 22, 2010 11:15:43 AM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxBFE
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r25893 r25966 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox frontends: Basic Frontend (BFE): 4 4 * Implementation of VMDisplay class … … 30 30 #endif 31 31 32 #include <iprt/ alloc.h>32 #include <iprt/mem.h> 33 33 #include <iprt/semaphore.h> 34 34 #include <iprt/thread.h> … … 40 40 #include <VBox/log.h> 41 41 #include <iprt/asm.h> 42 #include <iprt/uuid.h> 42 43 43 44 #ifdef RT_OS_L4 44 # include <stdio.h>45 # include <l4/util/util.h>46 # include <l4/log/l4log.h>45 # include <stdio.h> 46 # include <l4/util/util.h> 47 # include <l4/log/l4log.h> 47 48 #endif 48 49 … … 1146 1147 1147 1148 /** 1148 * Queries an interface to the driver. 1149 * 1150 * @returns Pointer to interface. 1151 * @returns NULL if the interface was not supported by the driver. 1152 * @param pInterface Pointer to this interface structure. 1153 * @param enmInterface The requested interface identification. 1154 */ 1155 DECLCALLBACK(void *) VMDisplay::drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface) 1149 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 1150 */ 1151 DECLCALLBACK(void *) VMDisplay::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID) 1156 1152 { 1157 1153 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 1158 1154 PDRVMAINDISPLAY pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY); 1159 switch (enmInterface) 1160 { 1161 case PDMINTERFACE_BASE: 1162 return &pDrvIns->IBase; 1163 case PDMINTERFACE_DISPLAY_CONNECTOR: 1164 return &pDrv->Connector; 1165 default: 1166 return NULL; 1167 } 1155 1156 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1157 return &pDrvIns->IBase; 1158 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_DISPLAY_CONNECTOR) == 0) 1159 return &pDrv->Connector; 1160 return NULL; 1168 1161 } 1169 1162 -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h
r22277 r25966 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox frontends: Basic Frontend (BFE): 4 4 * Declaration of VMDisplay class … … 68 68 void updateDisplayData(); 69 69 70 static DECLCALLBACK(void*) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface);70 static DECLCALLBACK(void*) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID); 71 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); … … 113 113 extern VMDisplay *gDisplay; 114 114 115 #endif // ____H_DISPLAYIMPL115 #endif // !____H_DISPLAYIMPL -
trunk/src/VBox/Frontends/VBoxBFE/KeyboardImpl.cpp
r25893 r25966 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox frontends: Basic Frontend (BFE): 4 4 * Implementation of Keyboard class and related things … … 33 33 #include <VBox/log.h> 34 34 #include <iprt/asm.h> 35 #include <iprt/uuid.h> 35 36 #include "KeyboardImpl.h" 36 37 … … 157 158 158 159 /** 159 * Queries an interface to the driver. 160 * 161 * @returns Pointer to interface. 162 * @returns NULL if the interface was not supported by the driver. 163 * @param pInterface Pointer to this interface structure. 164 * @param enmInterface The requested interface identification. 165 */ 166 DECLCALLBACK(void *) Keyboard::drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface) 160 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 161 */ 162 DECLCALLBACK(void *) Keyboard::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID) 167 163 { 168 164 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 169 165 PDRVMAINKEYBOARD pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINKEYBOARD); 170 switch (enmInterface) 171 { 172 case PDMINTERFACE_BASE: 173 return &pDrvIns->IBase; 174 case PDMINTERFACE_KEYBOARD_CONNECTOR: 175 return &pDrv->Connector; 176 default: 177 return NULL; 178 } 166 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 167 return &pDrvIns->IBase; 168 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_KEYBOARD_CONNECTOR) == 0) 169 return &pDrv->Connector; 170 return NULL; 179 171 } 180 172 -
trunk/src/VBox/Frontends/VBoxBFE/KeyboardImpl.h
r22277 r25966 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox frontends: Basic Frontend (BFE): 4 4 * Declaration of Keyboard class and related things … … 56 56 private: 57 57 58 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface);58 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID); 59 59 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 60 60 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); … … 70 70 extern Keyboard *gKeyboard; 71 71 72 #endif // ____H_KEYBOARDIMPL72 #endif // !____H_KEYBOARDIMPL -
trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp
r25893 r25966 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox frontends: Basic Frontend (BFE): 4 4 * Implementation of Mouse class … … 32 32 #include <VBox/log.h> 33 33 #include <iprt/asm.h> 34 #include <iprt/uuid.h> 34 35 #include <VBox/VMMDev.h> 35 36 #include "MouseImpl.h" … … 177 178 178 179 /** 179 * Queries an interface to the driver. 180 * 181 * @returns Pointer to interface. 182 * @returns NULL if the interface was not supported by the driver. 183 * @param pInterface Pointer to this interface structure. 184 * @param enmInterface The requested interface identification. 185 */ 186 DECLCALLBACK(void *) Mouse::drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface) 180 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 181 */ 182 DECLCALLBACK(void *) Mouse::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID) 187 183 { 188 184 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 189 185 PDRVMAINMOUSE pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINMOUSE); 190 switch (enmInterface) 191 { 192 case PDMINTERFACE_BASE: 193 return &pDrvIns->IBase; 194 case PDMINTERFACE_MOUSE_CONNECTOR: 195 return &pDrv->Connector; 196 default: 197 return NULL; 198 } 186 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 187 return &pDrvIns->IBase; 188 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_MOUSE_CONNECTOR) == 0) 189 return &pDrv->Connector; 190 return NULL; 199 191 } 200 192 -
trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.h
r22277 r25966 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox frontends: Basic Frontend (BFE): 4 4 * Declaration of Mouse class … … 68 68 private: 69 69 70 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface);70 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID); 71 71 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 72 72 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); … … 84 84 extern Mouse *gMouse; 85 85 86 #endif // ____H_MOUSEIMPL86 #endif // !____H_MOUSEIMPL -
trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.cpp
r25893 r25966 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox frontends: Basic Frontend (BFE): 4 4 * Implementation of VMStatus class … … 32 32 #include <VBox/log.h> 33 33 #include <iprt/asm.h> 34 #include <iprt/uuid.h> 34 35 #include "StatusImpl.h" 35 36 … … 84 85 85 86 /** 86 * Queries an interface to the driver. 87 * 88 * @returns Pointer to interface. 89 * @returns NULL if the interface was not supported by the driver. 90 * @param pInterface Pointer to this interface structure. 91 * @param enmInterface The requested interface identification. 92 */ 93 DECLCALLBACK(void *) VMStatus::drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface) 87 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 88 */ 89 DECLCALLBACK(void *) VMStatus::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID) 94 90 { 95 91 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 96 92 PDRVMAINSTATUS pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINSTATUS); 97 switch (enmInterface) 98 { 99 case PDMINTERFACE_BASE: 100 return &pDrvIns->IBase; 101 case PDMINTERFACE_LED_CONNECTORS: 102 return &pDrv->ILedConnectors; 103 default: 104 return NULL; 105 } 93 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 94 return &pDrvIns->IBase; 95 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_CONNECTORS) == 0) 96 return &pDrv->ILedConnectors; 97 return NULL; 106 98 } 107 99 -
trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.h
r22277 r25966 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox frontends: Basic Frontend (BFE): 4 4 * Declaration of VMStatus class … … 35 35 36 36 static DECLCALLBACK(void) drvUnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN); 37 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface);37 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID); 38 38 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 39 39 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); … … 42 42 extern VMStatus *gStatus; 43 43 44 #endif // ____H_STATUSIMPL44 #endif // !____H_STATUSIMPL -
trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp
r25893 r25966 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox frontends: Basic Frontend (BFE): 4 4 * Implementation of VMMDev: driver interface to VMM device … … 35 35 #include <VBox/log.h> 36 36 #include <iprt/asm.h> 37 #include <iprt/uuid.h> 37 38 38 39 #include "VBoxBFE.h" … … 344 345 345 346 /** 346 * Queries an interface to the driver. 347 * 348 * @returns Pointer to interface. 349 * @returns NULL if the interface was not supported by the driver. 350 * @param pInterface Pointer to this interface structure. 351 * @param enmInterface The requested interface identification. 352 */ 353 DECLCALLBACK(void *) VMMDev::drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface) 347 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 348 */ 349 DECLCALLBACK(void *) VMMDev::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID) 354 350 { 355 351 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 356 352 PDRVMAINVMMDEV pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINVMMDEV); 357 switch (enmInterface) 358 { 359 case PDMINTERFACE_BASE: 360 return &pDrvIns->IBase; 361 case PDMINTERFACE_VMMDEV_CONNECTOR: 362 return &pDrv->Connector; 363 #ifdef VBOX_WITH_HGCM 364 case PDMINTERFACE_HGCM_CONNECTOR: 365 if (fActivateHGCM()) 366 return &pDrv->HGCMConnector; 367 else 368 return NULL; 369 #endif 370 default: 371 return NULL; 372 } 353 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 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 } 364 #endif 365 return NULL; 373 366 } 374 367 -
trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.h
r22277 r25966 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox frontends: Basic Frontend (BFE): 4 4 * Declaration of VMMDev: driver interface to VMM device … … 63 63 static DECLCALLBACK(int) GetHeightReduction(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *heightReduction); 64 64 65 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface);65 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID); 66 66 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 67 67 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); … … 70 70 extern VMMDev *gVMMDev; 71 71 72 #endif // ____H_VMMDEV72 #endif // !____H_VMMDEV
Note:
See TracChangeset
for help on using the changeset viewer.