Changeset 11444 in vbox for trunk/include/VBox
- Timestamp:
- Aug 15, 2008 2:33:02 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxHDD-new.h
r11435 r11444 237 237 /** First valid interface. */ 238 238 VDINTERFACETYPE_FIRST = 0, 239 /** Interface to pass error message to upper layers. */239 /** Interface to pass error message to upper layers. Per-disk. */ 240 240 VDINTERFACETYPE_ERROR = VDINTERFACETYPE_FIRST, 241 /** Interface for asynchronous I/O operations. */241 /** Interface for asynchronous I/O operations. Per-disk. */ 242 242 VDINTERFACETYPE_ASYNCIO, 243 /** Interface for progress notification. */243 /** Interface for progress notification. Per-operation. */ 244 244 VDINTERFACETYPE_PROGRESS, 245 /** Interface for configuration information. */245 /** Interface for configuration information. Per-image. */ 246 246 VDINTERFACETYPE_CONFIG, 247 247 /** invalid interface. */ … … 274 274 /** 275 275 * Helper functions to handle interface lists. 276 * 277 * @note These interface lists are used consistently to pass per-disk, 278 * per-image and/or per-operation callbacks. Those three purposes are strictly 279 * separate. See the individual interface declarations for what context they 280 * apply to. The caller is responsible for ensuring that the lifetime of the 281 * interface descriptors is appropriate for the category of interface. 276 282 */ 277 283 … … 349 355 /** 350 356 * Interface to deliver error messages to upper layers. 357 * 358 * Per disk interface. Optional, but think twice if you want to miss the 359 * opportunity of reporting better human-readable error messages. 351 360 */ 352 361 typedef struct VDINTERFACEERROR … … 401 410 * Completion callback which is called by the interface owner 402 411 * to inform the backend that a task finished. 403 * 412 * 404 413 * @return VBox status code. 405 414 * @param pvUser Opaque user data which is passed on request submission. … … 412 421 /** 413 422 * Support interface for asynchronous I/O 423 * 424 * Per-disk. Optional. 414 425 */ 415 426 typedef struct VDINTERFACEASYNCIO … … 551 562 /** 552 563 * Progress notification interface 564 * 565 * Per-operation. Optional. 553 566 */ 554 567 typedef struct VDINTERFACEPROGRESS … … 614 627 /** 615 628 * Configuration information interface 629 * 630 * Per-image. Optional for most backends, but mandatory for images which do 631 * not operate on files (including standard block or character devices). 616 632 */ 617 633 typedef struct VDINTERFACECONFIG … … 902 918 * 903 919 * @return VBox status code. 904 * @param pVDIfs Pointer to theVD interface list.920 * @param pVDIfsDisk Pointer to the per-disk VD interface list. 905 921 * @param ppDisk Where to store the reference to HDD container. 906 922 */ 907 VBOXDDU_DECL(int) VDCreate(PVDINTERFACE pVDIfs , PVBOXHDD *ppDisk);923 VBOXDDU_DECL(int) VDCreate(PVDINTERFACE pVDIfsDisk, PVBOXHDD *ppDisk); 908 924 909 925 /** … … 943 959 * @param pszFilename Name of the image file to open. 944 960 * @param uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants. 961 * @param pVDIfsImage Pointer to the per-image VD interface list. 945 962 */ 946 963 VBOXDDU_DECL(int) VDOpen(PVBOXHDD pDisk, const char *pszBackend, 947 const char *pszFilename, unsigned uOpenFlags); 964 const char *pszFilename, unsigned uOpenFlags, 965 PVDINTERFACE pVDIfsImage); 948 966 949 967 /** … … 962 980 * @param pUuid New UUID of the image. If NULL, a new UUID is created. 963 981 * @param uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants. 964 * @param p fnProgress Progress callback. Optional. NULL if not to be used.965 * @param p vUser User argument for the progress callback.982 * @param pVDIfsImage Pointer to the per-image VD interface list. 983 * @param pVDIfsOperation Pointer to the per-operation VD interface list. 966 984 */ 967 985 VBOXDDU_DECL(int) VDCreateBase(PVBOXHDD pDisk, const char *pszBackend, … … 972 990 PCPDMMEDIAGEOMETRY pLCHSGeometry, 973 991 PCRTUUID pUuid, unsigned uOpenFlags, 974 PFNVMPROGRESS pfnProgress, void *pvUser); 992 PVDINTERFACE pVDIfsImage, 993 PVDINTERFACE pVDIfsOperation); 975 994 976 995 /** … … 986 1005 * @param pUuid New UUID of the image. If NULL, a new UUID is created. 987 1006 * @param uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants. 988 * @param p fnProgress Progress callback. Optional. NULL if not to be used.989 * @param p vUser User argument for the progress callback.1007 * @param pVDIfsImage Pointer to the per-image VD interface list. 1008 * @param pVDIfsOperation Pointer to the per-operation VD interface list. 990 1009 */ 991 1010 VBOXDDU_DECL(int) VDCreateDiff(PVBOXHDD pDisk, const char *pszBackend, 992 1011 const char *pszFilename, unsigned uImageFlags, 993 1012 const char *pszComment, PCRTUUID pUuid, 994 unsigned uOpenFlags, P FNVMPROGRESS pfnProgress,995 void *pvUser);1013 unsigned uOpenFlags, PVDINTERFACE pVDIfsImage, 1014 PVDINTERFACE pVDIfsOperation); 996 1015 997 1016 /** … … 1006 1025 * @param nImageFrom Name of the image file to merge from. 1007 1026 * @param nImageTo Name of the image file to merge to. 1008 * @param pfnProgress Progress callback. Optional. NULL if not to be used. 1009 * @param pvUser User argument for the progress callback. 1027 * @param pVDIfsOperation Pointer to the per-operation VD interface list. 1010 1028 */ 1011 1029 VBOXDDU_DECL(int) VDMerge(PVBOXHDD pDisk, unsigned nImageFrom, 1012 unsigned nImageTo, PFNVMPROGRESS pfnProgress, 1013 void *pvUser); 1030 unsigned nImageTo, PVDINTERFACE pVDIfsOperation); 1014 1031 1015 1032 /** … … 1032 1049 * @param fMoveByRename If true, attempt to perform a move by renaming (if successful the new size is ignored). 1033 1050 * @param cbSize New image size (0 means leave unchanged). 1034 * @param pfnProgress Progress callback. Optional. NULL if not to be used. 1035 * @param pvUser User argument for the progress callback. 1051 * @param pVDIfsOperation Pointer to the per-operation VD interface list. 1052 * @param pDstVDIfsImage Pointer to the per-image VD interface list, for the 1053 * destination image. 1054 * @param pDstVDIfsOperation Pointer to the per-operation VD interface list, 1055 * for the destination operation. 1036 1056 */ 1037 1057 VBOXDDU_DECL(int) VDCopy(PVBOXHDD pDiskFrom, unsigned nImage, PVBOXHDD pDiskTo, 1038 1058 const char *pszBackend, const char *pszFilename, 1039 1059 bool fMoveByRename, uint64_t cbSize, 1040 PFNVMPROGRESS pfnProgress, void *pvUser); 1060 PVDINTERFACE pVDIfsOperation, 1061 PVDINTERFACE pDstVDIfsImage, 1062 PVDINTERFACE pDstVDIfsOperation); 1041 1063 1042 1064 /**
Note:
See TracChangeset
for help on using the changeset viewer.