Changeset 25966 in vbox for trunk/src/VBox/Devices/Storage/DrvMediaISO.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/Storage/DrvMediaISO.cpp
r25893 r25966 1 /* $Id$ */ 1 2 /** @file 2 * 3 * VBox storage devices: 4 * ISO image media driver 3 * VBox storage devices: ISO image media driver 5 4 */ 6 5 … … 28 27 #include <iprt/assert.h> 29 28 #include <iprt/file.h> 30 31 #include < string.h>29 #include <iprt/string.h> 30 #include <iprt/uuid.h> 32 31 33 32 #include "Builtins.h" 33 34 34 35 35 /******************************************************************************* 36 36 * Defined Constants And Macros * 37 37 *******************************************************************************/ 38 39 38 /** Converts a pointer to MEDIAISO::IMedia to a PRDVMEDIAISO. */ 40 39 #define PDMIMEDIA_2_DRVMEDIAISO(pInterface) ( (PDRVMEDIAISO)((uintptr_t)pInterface - RT_OFFSETOF(DRVMEDIAISO, IMedia)) ) … … 53 52 /** 54 53 * Block driver instance data. 54 * 55 * @implements PDMIMEDIA 55 56 */ 56 57 typedef struct DRVMEDIAISO … … 82 83 static DECLCALLBACK(int) drvMediaISOBiosSetLCHSGeometry(PPDMIMEDIA pInterface, PCPDMMEDIAGEOMETRY pLCHSGeometry); 83 84 84 static DECLCALLBACK(void *) drvMediaISOQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface);85 static DECLCALLBACK(void *) drvMediaISOQueryInterface(PPDMIBASE pInterface, const char *pszIID); 85 86 86 87 … … 286 287 287 288 /** 288 * Queries an interface to the driver. 289 * 290 * @returns Pointer to interface. 291 * @returns NULL if the interface was not supported by the driver. 292 * @param pInterface Pointer to this interface structure. 293 * @param enmInterface The requested interface identification. 294 * @thread Any thread. 295 */ 296 static DECLCALLBACK(void *) drvMediaISOQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface) 289 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 290 */ 291 static DECLCALLBACK(void *) drvMediaISOQueryInterface(PPDMIBASE pInterface, const char *pszIID) 297 292 { 298 293 PPDMDRVINS pDrvIns = PDMIBASE_2_DRVINS(pInterface); 299 294 PDRVMEDIAISO pThis = PDMINS_2_DATA(pDrvIns, PDRVMEDIAISO); 300 switch (enmInterface) 301 { 302 case PDMINTERFACE_BASE: 303 return &pDrvIns->IBase; 304 case PDMINTERFACE_MEDIA: 305 return &pThis->IMedia; 306 default: 307 return NULL; 308 } 295 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 296 return &pDrvIns->IBase; 297 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_MEDIA) == 0) 298 return &pThis->IMedia; 299 return NULL; 309 300 } 310 301
Note:
See TracChangeset
for help on using the changeset viewer.