Changeset 40030 in vbox for trunk/include/VBox
- Timestamp:
- Feb 7, 2012 11:20:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vd-ifs.h
r38469 r40030 66 66 * This interface is completely internal and must not be used elsewhere. */ 67 67 VDINTERFACETYPE_IOINT, 68 /** Interface to query the use of block ranges on the disk. Per-operation. */ 69 VDINTERFACETYPE_QUERYRANGEUSE, 68 70 /** invalid interface. */ 69 71 VDINTERFACETYPE_INVALID … … 1238 1240 } 1239 1241 1242 /** 1243 * Interface to query usage of disk ranges. 1244 * 1245 * Per-operation interface. Optional. 1246 */ 1247 typedef struct VDINTERFACEQUERYRANGEUSE 1248 { 1249 /** 1250 * Common interface header. 1251 */ 1252 VDINTERFACE Core; 1253 1254 /** 1255 * Query use of a disk range. 1256 */ 1257 DECLR3CALLBACKMEMBER(int, pfnQueryRangeUse, (void *pvUser, uint64_t off, uint64_t cb, 1258 bool *pfUsed)); 1259 1260 } VDINTERFACEQUERYRANGEUSE, *PVDINTERFACEQUERYRANGEUSE; 1261 1262 /** 1263 * Get query range use interface from interface list. 1264 * 1265 * @return Pointer to the first thread synchronization interface in the list. 1266 * @param pVDIfs Pointer to the interface list. 1267 */ 1268 DECLINLINE(PVDINTERFACEQUERYRANGEUSE) VDIfQueryRangeUseGet(PVDINTERFACE pVDIfs) 1269 { 1270 PVDINTERFACE pIf = VDInterfaceGet(pVDIfs, VDINTERFACETYPE_QUERYRANGEUSE); 1271 1272 /* Check that the interface descriptor is a progress interface. */ 1273 AssertMsgReturn( !pIf 1274 || ( (pIf->enmInterface == VDINTERFACETYPE_QUERYRANGEUSE) 1275 && (pIf->cbSize == sizeof(VDINTERFACEQUERYRANGEUSE))), 1276 ("Not a query range use interface"), NULL); 1277 1278 return (PVDINTERFACEQUERYRANGEUSE)pIf; 1279 } 1280 1281 DECLINLINE(int) vdIfQueryRangeUse(PVDINTERFACEQUERYRANGEUSE pIfQueryRangeUse, uint64_t off, uint64_t cb, 1282 bool *pfUsed) 1283 { 1284 return pIfQueryRangeUse->pfnQueryRangeUse(pIfQueryRangeUse->Core.pvUser, off, cb, pfUsed); 1285 } 1286 1240 1287 RT_C_DECLS_END 1241 1288
Note:
See TracChangeset
for help on using the changeset viewer.