Changeset 6291 in vbox for trunk/include/VBox/VBoxHDD-new.h
- Timestamp:
- Jan 9, 2008 10:57:05 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27155
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxHDD-new.h
r5999 r6291 5 5 6 6 /* 7 * Copyright (C) 2006-200 7innotek GmbH7 * Copyright (C) 2006-2008 innotek GmbH 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 56 56 /** Get VDI minor version from combined version. */ 57 57 #define VDI_GET_VERSION_MINOR(uVer) ((uVer) & 0xffff) 58 59 /** Placeholder for specifying the last opened image. */ 60 #define VD_LAST_IMAGE 0xffffffffU 58 61 59 62 /** @name VBox HDD container image types … … 97 100 /** Mask of valid image flags for VDI. */ 98 101 #define VD_VDI_IMAGE_FLAGS_MASK (VD_IMAGE_FLAGS_NONE | VD_VDI_IMAGE_FLAGS_ZERO_EXPAND) 102 103 /** Mask of all valid image flags for all formats. */ 104 #define VD_IMAGE_FLAGS_MASK (VD_VMDK_IMAGE_FLAGS_MASK | VD_VDI_IMAGE_FLAGS_MASK) 99 105 100 106 /** Default image flags. */ … … 132 138 typedef struct VBOXHDDRAW 133 139 { 140 /** Signature for structure. Must be 'R', 'A', 'W', '\0'. Actually a trick 141 * to make logging of the comment string produce sensible results. */ 142 char szSignature[4]; 134 143 /** Flag whether access to full disk should be given (ignoring the 135 144 * partition information below). */ … … 189 198 190 199 /** 191 * Allocates and initializes an empty VBoxHDD container.200 * Allocates and initializes an empty HDD container. 192 201 * No image files are opened. 193 202 * … … 196 205 * @param pfnError Callback for setting extended error information. 197 206 * @param pvErrorUser Opaque parameter for pfnError. 198 * @param ppDisk Where to store the reference to the VBox HDD container. 199 */ 200 VBOXDDU_DECL(int) VDCreate(const char *pszBackend, PFNVDERROR pfnError, void *pvErrorUser, PVBOXHDD *ppDisk); 201 202 /** 203 * Destroys the VBox HDD container. 207 * @param ppDisk Where to store the reference to HDD container. 208 */ 209 VBOXDDU_DECL(int) VDCreate(const char *pszBackend, PFNVDERROR pfnError, 210 void *pvErrorUser, PVBOXHDD *ppDisk); 211 212 /** 213 * Destroys HDD container. 204 214 * If container has opened image files they will be closed. 205 215 * 206 * @param pDisk Pointer to VBoxHDD container.216 * @param pDisk Pointer to HDD container. 207 217 */ 208 218 VBOXDDU_DECL(void) VDDestroy(PVBOXHDD pDisk); 209 219 210 220 /** 211 * Try to get the backend name which can use this image. 221 * Try to get the backend name which can use this image. 212 222 * 213 223 * @returns VBox status code. … … 221 231 * Opens an image file. 222 232 * 223 * The first opened image file in aHDD container must have a base image type,233 * The first opened image file in HDD container must have a base image type, 224 234 * others (next opened images) must be differencing or undo images. 225 235 * Linkage is checked for differencing image to be consistent with the previously opened image. … … 232 242 * 233 243 * @returns VBox status code. 234 * @param pDisk Pointer to VBoxHDD container.244 * @param pDisk Pointer to HDD container. 235 245 * @param pszFilename Name of the image file to open. 236 246 * @param uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants. 237 247 */ 238 VBOXDDU_DECL(int) VDOpen(PVBOXHDD pDisk, const char *pszFilename, unsigned uOpenFlags); 248 VBOXDDU_DECL(int) VDOpen(PVBOXHDD pDisk, const char *pszFilename, 249 unsigned uOpenFlags); 239 250 240 251 /** … … 242 253 * 243 254 * @returns VBox status code. 244 * @param pDisk Pointer to VBoxHDD container.255 * @param pDisk Pointer to HDD container. 245 256 * @param pszFilename Name of the image file to create. 246 257 * @param enmType Image type, only base image types are acceptable. … … 248 259 * @param uImageFlags Flags specifying special image features. 249 260 * @param pszComment Pointer to image comment. NULL is ok. 250 * @param cCylinders Number of cylinders (must be <= 16383). 251 * @param cHeads Number of heads (must be <= 16). 252 * @param cSectors Number of sectors (must be <= 63); 261 * @param pPCHSGeometry Pointer to physical disk geometry <= (16383,16,63). Not NULL. 262 * @param pLCHSGeometry Pointer to logical disk geometry <= (1024,255,63). Not NULL. 253 263 * @param uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants. 254 264 * @param pfnProgress Progress callback. Optional. NULL if not to be used. … … 258 268 VDIMAGETYPE enmType, uint64_t cbSize, 259 269 unsigned uImageFlags, const char *pszComment, 260 unsigned cCylinders, unsigned cHeads, 261 unsigned cSectors, unsigned uOpenFlags, 262 PFNVMPROGRESS pfnProgress, void *pvUser); 270 PCPDMMEDIAGEOMETRY pPCHSGeometry, 271 PCPDMMEDIAGEOMETRY pLCHSGeometry, 272 unsigned uOpenFlags, PFNVMPROGRESS pfnProgress, 273 void *pvUser); 263 274 264 275 /** … … 267 278 * 268 279 * @returns VBox status code. 269 * @param pDisk Pointer to VBoxHDD container.280 * @param pDisk Pointer to HDD container. 270 281 * @param pszFilename Name of the differencing image file to create. 271 282 * @param uImageFlags Flags specifying special image features. … … 277 288 VBOXDDU_DECL(int) VDCreateDiff(PVBOXHDD pDisk, const char *pszFilename, 278 289 unsigned uImageFlags, const char *pszComment, 279 unsigned uOpenFlags, 280 PFNVMPROGRESS pfnProgress, void *pvUser); 281 282 /** 283 * Merges two images having a parent/child relationship (both directions). 284 * As a side effect the source image is deleted from both the disk and 285 * the images in the VBox HDD container. 286 * 287 * @returns VBox status code. 288 * @param pDisk Pointer to VBox HDD container. 290 unsigned uOpenFlags, PFNVMPROGRESS pfnProgress, 291 void *pvUser); 292 293 /** 294 * Merges two images (not necessarily with direct parent/child relationship). 295 * As a side effect the source image and potentially the other images which 296 * are also merged to the destination are deleted from both the disk and the 297 * images in the HDD container. 298 * 299 * @returns VBox status code. 300 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 301 * @param pDisk Pointer to HDD container. 289 302 * @param nImageFrom Name of the image file to merge from. 290 303 * @param nImageTo Name of the image file to merge to. … … 292 305 * @param pvUser User argument for the progress callback. 293 306 */ 294 VBOXDDU_DECL(int) VDMerge(PVBOXHDD pDisk, unsigned nImageFrom, unsigned nImageTo, 295 PFNVMPROGRESS pfnProgress, void *pvUser); 296 297 /** 298 * Copies an image from one VBox HDD container to another. 299 * The copy is opened in the target VBox HDD container. 307 VBOXDDU_DECL(int) VDMerge(PVBOXHDD pDisk, unsigned nImageFrom, 308 unsigned nImageTo, PFNVMPROGRESS pfnProgress, 309 void *pvUser); 310 311 /** 312 * Copies an image from one HDD container to another. 313 * The copy is opened in the target HDD container. 300 314 * It is possible to convert between different image formats, because the 301 * backend for the destination VBoxHDD container may be different from the315 * backend for the destination HDD container may be different from the 302 316 * source container. 303 * If both the source and destination reference the same VBoxHDD container,304 * then the image is moved (by copying/deleting ) to the new location.317 * If both the source and destination reference the same HDD container, 318 * then the image is moved (by copying/deleting or renaming) to the new location. 305 319 * The source container is unchanged if the move operation fails, otherwise 306 320 * the image at the new location is opened in the same way as the old one was. 307 321 * 308 322 * @returns VBox status code. 309 * @param pDiskFrom Pointer to source VBox HDD container. 310 * @param nImage Image number, counts from 0. 0 is always base image of container. 311 * @param pDiskTo Pointer to destination VBox HDD container. 323 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 324 * @param pDiskFrom Pointer to source HDD container. 325 * @param nImage Image number, counts from 0. 0 is always base image of container. 326 * @param pDiskTo Pointer to destination HDD container. 327 * @param pszFilename New name of the image (may be NULL if pDiskFrom == pDiskTo). 328 * @param fMoveByRename If true, attempt to perform a move by renaming (if successful the new size is ignored). 329 * @param cbSize New image size (0 means leave unchanged). 312 330 * @param pfnProgress Progress callback. Optional. NULL if not to be used. 313 331 * @param pvUser User argument for the progress callback. 314 332 */ 315 333 VBOXDDU_DECL(int) VDCopy(PVBOXHDD pDiskFrom, unsigned nImage, PVBOXHDD pDiskTo, 316 PFNVMPROGRESS pfnProgress, void *pvUser); 317 318 /** 319 * Compacts a growing image file by removing zeroed data blocks. 320 * Optionally defragments data in the image so that ascending sector numbers 321 * are stored in ascending location in the image file. 322 * 323 * @todo maybe include this function in VDCopy. 324 * 325 * @returns VBox status code. 326 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 327 * @param pDisk Pointer to VBox HDD container. 328 * @param nImage Image number, counts from 0. 0 is always base image of container. 329 * @param fDefragment If true, reorder file data so that sectors are stored in ascending order. 330 * @param pfnProgress Progress callback. Optional. NULL if not to be used. 331 * @param pvUser User argument for the progress callback. 332 */ 333 VBOXDDU_DECL(int) VDCompact(PVBOXHDD pDisk, unsigned nImage, 334 bool fDefragment, 335 PFNVMPROGRESS pfnProgress, void *pvUser); 336 337 /** 338 * Resizes an image. Allows setting the disk size to both larger and smaller 339 * values than the current disk size. 340 * 341 * @returns VBox status code. 342 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 343 * @param pDisk Pointer to VBox HDD container. 344 * @param nImage Image number, counts from 0. 0 is always base image of container. 345 * @param cbSize New image size in bytes. 346 * @param pfnProgress Progress callback. Optional. NULL if not to be used. 347 * @param pvUser User argument for the progress callback. 348 */ 349 VBOXDDU_DECL(int) VDResize(PVBOXHDD pDisk, unsigned nImage, uint64_t cbSize, 350 PFNVMPROGRESS pfnProgress, void *pvUser); 351 352 /** 353 * Closes the last opened image file in the HDD container. Leaves all changes inside it. 334 const char *pszFilename, bool fMoveByRename, 335 uint64_t cbSize, PFNVMPROGRESS pfnProgress, 336 void *pvUser); 337 338 /** 339 * Closes the last opened image file in HDD container. 354 340 * If previous image file was opened in read-only mode (that is normal) and closing image 355 341 * was opened in read-write mode (the whole disk was in read-write mode) - the previous image 356 342 * will be reopened in read/write mode. 357 343 * 358 * @param pDisk Pointer to VBox HDD container. 344 * @returns VBox status code. 345 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 346 * @param pDisk Pointer to HDD container. 359 347 * @param fDelete If true, delete the image from the host disk. 360 348 */ … … 364 352 * Closes all opened image files in HDD container. 365 353 * 366 * @param pDisk Pointer to VBox HDD container. 354 * @returns VBox status code. 355 * @param pDisk Pointer to HDD container. 367 356 */ 368 357 VBOXDDU_DECL(int) VDCloseAll(PVBOXHDD pDisk); … … 373 362 * @returns VBox status code. 374 363 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 375 * @param pDisk Pointer to VBoxHDD container.364 * @param pDisk Pointer to HDD container. 376 365 * @param uOffset Offset of first reading byte from start of disk. 377 366 * @param pvBuf Pointer to buffer for reading data. … … 385 374 * @returns VBox status code. 386 375 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 387 * @param pDisk Pointer to VBoxHDD container.376 * @param pDisk Pointer to HDD container. 388 377 * @param uOffset Offset of first writing byte from start of disk. 389 378 * @param pvBuf Pointer to buffer for writing data. … … 397 386 * @returns VBox status code. 398 387 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 399 * @param pDisk Pointer to VBoxHDD container.388 * @param pDisk Pointer to HDD container. 400 389 */ 401 390 VBOXDDU_DECL(int) VDFlush(PVBOXHDD pDisk); … … 405 394 * 406 395 * @returns Number of opened images for HDD container. 0 if no images have been opened. 407 * @param pDisk Pointer to VBoxHDD container.396 * @param pDisk Pointer to HDD container. 408 397 */ 409 398 VBOXDDU_DECL(unsigned) VDGetCount(PVBOXHDD pDisk); 410 399 411 400 /** 412 * Get read/write mode of the VBoxHDD container.401 * Get read/write mode of HDD container. 413 402 * 414 403 * @returns Virtual disk ReadOnly status. 415 404 * @returns true if no image is opened in HDD container. 416 * @param pDisk Pointer to VBoxHDD container.405 * @param pDisk Pointer to HDD container. 417 406 */ 418 407 VBOXDDU_DECL(bool) VDIsReadOnly(PVBOXHDD pDisk); 419 408 420 409 /** 421 * Get total disk size of the VBoxHDD container.410 * Get total capacity of an image in HDD container. 422 411 * 423 412 * @returns Virtual disk size in bytes. 424 * @returns 0 if no image is opened in HDD container. 425 * @param pDisk Pointer to VBox HDD container. 426 */ 427 VBOXDDU_DECL(uint64_t) VDGetSize(PVBOXHDD pDisk); 428 429 /** 430 * Get virtual disk geometry stored in HDD container. 431 * 432 * @returns VBox status code. 433 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 413 * @returns 0 if image with specified number was not opened. 414 * @param pDisk Pointer to HDD container. 415 * @param nImage Image number, counts from 0. 0 is always base image of container. 416 */ 417 VBOXDDU_DECL(uint64_t) VDGetSize(PVBOXHDD pDisk, unsigned nImage); 418 419 /** 420 * Get total file size of an image in HDD container. 421 * 422 * @returns Virtual disk size in bytes. 423 * @returns 0 if image with specified number was not opened. 424 * @param pDisk Pointer to HDD container. 425 * @param nImage Image number, counts from 0. 0 is always base image of container. 426 */ 427 VBOXDDU_DECL(uint64_t) VDGetFileSize(PVBOXHDD pDisk, unsigned nImage); 428 429 /** 430 * Get virtual disk PCHS geometry of an image in HDD container. 431 * 432 * @returns VBox status code. 433 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 434 434 * @returns VERR_VDI_GEOMETRY_NOT_SET if no geometry present in the HDD container. 435 * @param pDisk Pointer to VBox HDD container. 436 * @param pcCylinders Where to store the number of cylinders. NULL is ok. 437 * @param pcHeads Where to store the number of heads. NULL is ok. 438 * @param pcSectors Where to store the number of sectors. NULL is ok. 439 */ 440 VBOXDDU_DECL(int) VDGetGeometry(PVBOXHDD pDisk, 441 unsigned *pcCylinders, unsigned *pcHeads, unsigned *pcSectors); 442 443 /** 444 * Store virtual disk geometry in HDD container. 445 * 446 * Note that in case of unrecoverable error all images in HDD container will be closed. 447 * 448 * @returns VBox status code. 449 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 450 * @param pDisk Pointer to VBox HDD container. 451 * @param cCylinders Number of cylinders. 452 * @param cHeads Number of heads. 453 * @param cSectors Number of sectors. 454 */ 455 VBOXDDU_DECL(int) VDSetGeometry(PVBOXHDD pDisk, 456 unsigned cCylinders, unsigned cHeads, unsigned cSectors); 457 458 /** 459 * Get virtual disk translation mode stored in HDD container. 460 * 461 * @returns VBox status code. 462 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 435 * @param pDisk Pointer to HDD container. 436 * @param nImage Image number, counts from 0. 0 is always base image of container. 437 * @param pPCHSGeometry Where to store PCHS geometry. Not NULL. 438 */ 439 VBOXDDU_DECL(int) VDGetPCHSGeometry(PVBOXHDD pDisk, unsigned nImage, 440 PPDMMEDIAGEOMETRY pPCHSGeometry); 441 442 /** 443 * Store virtual disk PCHS geometry of an image in HDD container. 444 * 445 * @returns VBox status code. 446 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 447 * @param pDisk Pointer to HDD container. 448 * @param nImage Image number, counts from 0. 0 is always base image of container. 449 * @param pPCHSGeometry Where to load PCHS geometry from. Not NULL. 450 */ 451 VBOXDDU_DECL(int) VDSetPCHSGeometry(PVBOXHDD pDisk, unsigned nImage, 452 PCPDMMEDIAGEOMETRY pPCHSGeometry); 453 454 /** 455 * Get virtual disk LCHS geometry of an image in HDD container. 456 * 457 * @returns VBox status code. 458 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 463 459 * @returns VERR_VDI_GEOMETRY_NOT_SET if no geometry present in the HDD container. 464 * @param pDisk Pointer to VBox HDD container. 465 * @param penmTranslation Where to store the translation mode (see pdm.h). 466 */ 467 VBOXDDU_DECL(int) VDGetTranslation(PVBOXHDD pDisk, PPDMBIOSTRANSLATION penmTranslation); 468 469 /** 470 * Store virtual disk translation mode in HDD container. 471 * 472 * Note that in case of unrecoverable error all images in HDD container will be closed. 473 * 474 * @returns VBox status code. 475 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 476 * @param pDisk Pointer to VBox HDD container. 477 * @param enmTranslation Translation mode (see pdm.h). 478 */ 479 VBOXDDU_DECL(int) VDSetTranslation(PVBOXHDD pDisk, PDMBIOSTRANSLATION enmTranslation); 460 * @param pDisk Pointer to HDD container. 461 * @param nImage Image number, counts from 0. 0 is always base image of container. 462 * @param pLCHSGeometry Where to store LCHS geometry. Not NULL. 463 */ 464 VBOXDDU_DECL(int) VDGetLCHSGeometry(PVBOXHDD pDisk, unsigned nImage, 465 PPDMMEDIAGEOMETRY pLCHSGeometry); 466 467 /** 468 * Store virtual disk LCHS geometry of an image in HDD container. 469 * 470 * @returns VBox status code. 471 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 472 * @param pDisk Pointer to HDD container. 473 * @param nImage Image number, counts from 0. 0 is always base image of container. 474 * @param pLCHSGeometry Where to load LCHS geometry from. Not NULL. 475 */ 476 VBOXDDU_DECL(int) VDSetLCHSGeometry(PVBOXHDD pDisk, unsigned nImage, 477 PCPDMMEDIAGEOMETRY pLCHSGeometry); 480 478 481 479 /** … … 484 482 * @returns VBox status code. 485 483 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 486 * @param pDisk Pointer to VBoxHDD container.484 * @param pDisk Pointer to HDD container. 487 485 * @param nImage Image number, counts from 0. 0 is always base image of container. 488 486 * @param puVersion Where to store the image version. 489 487 */ 490 VBOXDDU_DECL(int) VDGetVersion(PVBOXHDD pDisk, unsigned nImage, unsigned *puVersion); 488 VBOXDDU_DECL(int) VDGetVersion(PVBOXHDD pDisk, unsigned nImage, 489 unsigned *puVersion); 491 490 492 491 /** … … 495 494 * @returns VBox status code. 496 495 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 497 * @param pDisk Pointer to VBoxHDD container.496 * @param pDisk Pointer to HDD container. 498 497 * @param nImage Image number, counts from 0. 0 is always base image of container. 499 498 * @param penmType Where to store the image type. 500 499 */ 501 VBOXDDU_DECL(int) VDGetImageType(PVBOXHDD pDisk, unsigned nImage, PVDIMAGETYPE penmType); 500 VBOXDDU_DECL(int) VDGetImageType(PVBOXHDD pDisk, unsigned nImage, 501 PVDIMAGETYPE penmType); 502 502 503 503 /** … … 506 506 * @returns VBox status code. 507 507 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 508 * @param pDisk Pointer to VBoxHDD container.508 * @param pDisk Pointer to HDD container. 509 509 * @param nImage Image number, counts from 0. 0 is always base image of container. 510 510 * @param puImageFlags Where to store the image flags. … … 513 513 514 514 /** 515 * Get open flags of last opened image in HDD container. 516 * 517 * @returns VBox status code. 518 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 519 * @param pDisk Pointer to VBox HDD container. 515 * Get open flags of image in HDD container. 516 * 517 * @returns VBox status code. 518 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 519 * @param pDisk Pointer to HDD container. 520 * @param nImage Image number, counts from 0. 0 is always base image of container. 520 521 * @param puOpenFlags Where to store the image open flags. 521 522 */ 522 VBOXDDU_DECL(int) VDGetOpenFlags(PVBOXHDD pDisk, unsigned *puOpenFlags); 523 524 /** 525 * Set open flags of last opened image in HDD container. 523 VBOXDDU_DECL(int) VDGetOpenFlags(PVBOXHDD pDisk, unsigned nImage, 524 unsigned *puOpenFlags); 525 526 /** 527 * Set open flags of image in HDD container. 526 528 * This operation may cause file locking changes and/or files being reopened. 527 529 * Note that in case of unrecoverable error all images in HDD container will be closed. … … 529 531 * @returns VBox status code. 530 532 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 531 * @param pDisk Pointer to VBox HDD container. 533 * @param pDisk Pointer to HDD container. 534 * @param nImage Image number, counts from 0. 0 is always base image of container. 532 535 * @param uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants. 533 536 */ 534 VBOXDDU_DECL(int) VDSetOpenFlags(PVBOXHDD pDisk, unsigned uOpenFlags); 537 VBOXDDU_DECL(int) VDSetOpenFlags(PVBOXHDD pDisk, unsigned nImage, 538 unsigned uOpenFlags); 535 539 536 540 /** 537 541 * Get base filename of image in HDD container. Some image formats use 538 * other filenames as well, so don't use this for anything but forinformational542 * other filenames as well, so don't use this for anything but informational 539 543 * purposes. 540 544 * … … 542 546 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 543 547 * @returns VERR_BUFFER_OVERFLOW if pszFilename buffer too small to hold filename. 544 * @param pDisk Pointer to VBoxHDD container.548 * @param pDisk Pointer to HDD container. 545 549 * @param nImage Image number, counts from 0. 0 is always base image of container. 546 550 * @param pszFilename Where to store the image file name. 547 551 * @param cbFilename Size of buffer pszFilename points to. 548 552 */ 549 VBOXDDU_DECL(int) VDGetFilename(PVBOXHDD pDisk, unsigned nImage, char *pszFilename, unsigned cbFilename); 553 VBOXDDU_DECL(int) VDGetFilename(PVBOXHDD pDisk, unsigned nImage, 554 char *pszFilename, unsigned cbFilename); 550 555 551 556 /** … … 555 560 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 556 561 * @returns VERR_BUFFER_OVERFLOW if pszComment buffer too small to hold comment text. 557 * @param pDisk Pointer to VBoxHDD container.562 * @param pDisk Pointer to HDD container. 558 563 * @param nImage Image number, counts from 0. 0 is always base image of container. 559 564 * @param pszComment Where to store the comment string of image. NULL is ok. 560 565 * @param cbComment The size of pszComment buffer. 0 is ok. 561 566 */ 562 VBOXDDU_DECL(int) VDGetComment(PVBOXHDD pDisk, unsigned nImage, char *pszComment, unsigned cbComment); 567 VBOXDDU_DECL(int) VDGetComment(PVBOXHDD pDisk, unsigned nImage, 568 char *pszComment, unsigned cbComment); 563 569 564 570 /** … … 567 573 * @returns VBox status code. 568 574 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 569 * @param pDisk Pointer to VBoxHDD container.575 * @param pDisk Pointer to HDD container. 570 576 * @param nImage Image number, counts from 0. 0 is always base image of container. 571 577 * @param pszComment New comment string (UTF-8). NULL is allowed to reset the comment. 572 578 */ 573 VBOXDDU_DECL(int) VDSetComment(PVBOXHDD pDisk, unsigned nImage, const char *pszComment); 579 VBOXDDU_DECL(int) VDSetComment(PVBOXHDD pDisk, unsigned nImage, 580 const char *pszComment); 574 581 575 582 /** … … 578 585 * @returns VBox status code. 579 586 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 580 * @param pDisk Pointer to VBoxHDD container.587 * @param pDisk Pointer to HDD container. 581 588 * @param nImage Image number, counts from 0. 0 is always base image of container. 582 589 * @param pUuid Where to store the image UUID. … … 589 596 * @returns VBox status code. 590 597 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 591 * @param pDisk Pointer to VBoxHDD container.592 * @param nImage Image number, counts from 0. 0 is always base image of container. 593 * @param pUuid Optional parameter, new UUID of the image.598 * @param pDisk Pointer to HDD container. 599 * @param nImage Image number, counts from 0. 0 is always base image of container. 600 * @param pUuid New UUID of the image. If NULL, a new UUID is created. 594 601 */ 595 602 VBOXDDU_DECL(int) VDSetUuid(PVBOXHDD pDisk, unsigned nImage, PCRTUUID pUuid); … … 600 607 * @returns VBox status code. 601 608 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 602 * @param pDisk Pointer to VBoxHDD container.609 * @param pDisk Pointer to HDD container. 603 610 * @param nImage Image number, counts from 0. 0 is always base image of container. 604 611 * @param pUuid Where to store the image modification UUID. 605 612 */ 606 VBOXDDU_DECL(int) VDGetModificationUuid(PVBOXHDD pDisk, unsigned nImage, PRTUUID pUuid); 613 VBOXDDU_DECL(int) VDGetModificationUuid(PVBOXHDD pDisk, unsigned nImage, 614 PRTUUID pUuid); 607 615 608 616 /** … … 611 619 * @returns VBox status code. 612 620 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 613 * @param pDisk Pointer to VBox HDD container. 614 * @param nImage Image number, counts from 0. 0 is always base image of container. 615 * @param pUuid Optional parameter, new last modification UUID of the image. 616 */ 617 VBOXDDU_DECL(int) VDSetModificationUuid(PVBOXHDD pDisk, unsigned nImage, PCRTUUID pUuid); 621 * @param pDisk Pointer to HDD container. 622 * @param nImage Image number, counts from 0. 0 is always base image of container. 623 * @param pUuid New modification UUID of the image. If NULL, a new UUID is created. 624 */ 625 VBOXDDU_DECL(int) VDSetModificationUuid(PVBOXHDD pDisk, unsigned nImage, 626 PCRTUUID pUuid); 618 627 619 628 /** … … 622 631 * @returns VBox status code. 623 632 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 624 * @param pDisk Pointer to VBoxHDD container.633 * @param pDisk Pointer to HDD container. 625 634 * @param nImage Image number, counts from 0. 0 is always base image of the container. 626 635 * @param pUuid Where to store the parent image UUID. 627 636 */ 628 VBOXDDU_DECL(int) VDGetParentUuid(PVBOXHDD pDisk, unsigned nImage, PRTUUID pUuid); 637 VBOXDDU_DECL(int) VDGetParentUuid(PVBOXHDD pDisk, unsigned nImage, 638 PRTUUID pUuid); 629 639 630 640 /** … … 632 642 * 633 643 * @returns VBox status code. 634 * @param pDisk Pointer to VBox HDD container. 635 * @param nImage Image number, counts from 0. 0 is always base image of container. 636 * @param pUuid Optional parameter, new parent UUID of the image. 637 */ 638 VBOXDDU_DECL(int) VDSetParentUuid(PVBOXHDD pDisk, unsigned nImage, PCRTUUID pUuid); 644 * @param pDisk Pointer to HDD container. 645 * @param nImage Image number, counts from 0. 0 is always base image of container. 646 * @param pUuid New parent UUID of the image. If NULL, a new UUID is created. 647 */ 648 VBOXDDU_DECL(int) VDSetParentUuid(PVBOXHDD pDisk, unsigned nImage, 649 PCRTUUID pUuid); 639 650 640 651 … … 642 653 * Debug helper - dumps all opened images in HDD container into the log file. 643 654 * 644 * @param pDisk Pointer to VBoxHDD container.655 * @param pDisk Pointer to HDD container. 645 656 */ 646 657 VBOXDDU_DECL(void) VDDumpImages(PVBOXHDD pDisk);
Note:
See TracChangeset
for help on using the changeset viewer.