Changeset 25966 in vbox for trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
- Timestamp:
- Jan 22, 2010 11:15:43 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56818
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r25893 r25966 34 34 #include <iprt/asm.h> 35 35 #include <iprt/assert.h> 36 #include <iprt/file.h> 37 #include <iprt/mem.h> 36 38 #include <iprt/semaphore.h> 37 #include <iprt/file.h> 38 #include <iprt/alloc.h> 39 #include <iprt/uuid.h> 39 40 40 41 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) … … 93 94 /** 94 95 * Char driver instance data. 96 * 97 * @implements PDMICHAR 95 98 */ 96 99 typedef struct DRVHOSTSERIAL … … 169 172 170 173 /** 171 * Queries an interface to the driver. 172 * 173 * @returns Pointer to interface. 174 * @returns NULL if the interface was not supported by the driver. 175 * @param pInterface Pointer to this interface structure. 176 * @param enmInterface The requested interface identification. 174 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 177 175 */ 178 static DECLCALLBACK(void *) drvHostSerialQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface)176 static DECLCALLBACK(void *) drvHostSerialQueryInterface(PPDMIBASE pInterface, const char *pszIID) 179 177 { 180 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 181 PDRVHOSTSERIAL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTSERIAL); 182 switch (enmInterface) 183 { 184 case PDMINTERFACE_BASE: 185 return &pDrvIns->IBase; 186 case PDMINTERFACE_CHAR: 187 return &pThis->IChar; 188 default: 189 return NULL; 190 } 178 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 179 PDRVHOSTSERIAL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTSERIAL); 180 181 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 182 return &pDrvIns->IBase; 183 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_CHAR) == 0) 184 return &pThis->IChar; 185 return NULL; 191 186 } 192 187
Note:
See TracChangeset
for help on using the changeset viewer.