VirtualBox

Changeset 2118 in vbox


Ignore:
Timestamp:
Apr 17, 2007 8:36:00 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
20438
Message:

Update new VBox HDD container interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxHDD-new.h

    r1949 r2118  
    2020 */
    2121
    22 #ifndef __VBox_VBoxHDDNew_h__
    23 #define __VBox_VBoxHDDNew_h__
     22#ifndef __VBox_VD_h__
     23#define __VBox_VD_h__
    2424
    2525#include <VBox/cdefs.h>
     
    3333#endif
    3434
    35 /** @defgroup grp_vbox_hdd     VBox HDD Container
     35/** @defgroup grp_vd            VBox HDD Container
    3636 * @{
    3737 */
     
    5454/** @name VBox HDD container image types
    5555 * @{ */
    56 typedef enum VBOXHDDIMAGETYPE
     56typedef enum VDIMAGETYPE
    5757{
    5858    /** Normal dynamically growing base image file. */
    59     VBOXHDD_IMAGE_TYPE_NORMAL   = 1,
     59    VD_IMAGE_TYPE_NORMAL    = 1,
    6060    /** Preallocated base image file of a fixed size. */
    61     VBOXHDD_IMAGE_TYPE_FIXED,
     61    VD_IMAGE_TYPE_FIXED,
    6262    /** Dynamically growing image file for undo/commit changes support. */
    63     VBOXHDD_IMAGE_TYPE_UNDO,
     63    VD_IMAGE_TYPE_UNDO,
    6464    /** Dynamically growing image file for differencing support. */
    65     VBOXHDD_IMAGE_TYPE_DIFF,
     65    VD_IMAGE_TYPE_DIFF,
    6666
    6767    /** First valid image type value. */
    68     VBOXHDD_IMAGE_TYPE_FIRST    = VBOXHDD_IMAGE_TYPE_NORMAL,
     68    VD_IMAGE_TYPE_FIRST     = VD_IMAGE_TYPE_NORMAL,
    6969    /** Last valid image type value. */
    70     VBOXHDD_IMAGE_TYPE_LAST     = VBOXHDD_IMAGE_TYPE_DIFF
    71 } VBOXHDDIMAGETYPE;
     70    VD_IMAGE_TYPE_LAST      = VD_IMAGE_TYPE_DIFF
     71} VDIMAGETYPE;
    7272/** Pointer to VBox HDD container image type. */
    73 typedef VBOXHDDIMAGETYPE *PVBOXHDDIMAGETYPE;
     73typedef VDIMAGETYPE *PVDIMAGETYPE;
    7474/** @} */
    7575
     
    7878 */
    7979/** No flags. */
    80 #define VBOXHDD_IMAGE_FLAGS_NONE                (0)
     80#define VD_IMAGE_FLAGS_NONE                 (0)
    8181/** VMDK: Split image into 2GB extents. */
    82 #define VBOXHDD_VMDK_IMAGE_FLAGS_SPLIT_2G       (0x0001)
     82#define VD_VMDK_IMAGE_FLAGS_SPLIT_2G        (0x0001)
    8383/** VMDK: Split image into 2GB extents. */
    84 #define VBOXHDD_VMDK_IMAGE_FLAGS_RAWDISK        (0x0002)
     84#define VD_VMDK_IMAGE_FLAGS_RAWDISK         (0x0002)
    8585/** VDI: Fill new blocks with zeroes while expanding image file. */
    86 #define VBOXHDD_VDI_IMAGE_FLAGS_ZERO_EXPAND     (0x0100)
     86#define VD_VDI_IMAGE_FLAGS_ZERO_EXPAND      (0x0100)
    8787
    8888/** Mask of valid image flags for VMDK. */
    89 #define VBOXHDD_VMDK_IMAGE_FLAGS_MASK           (VBOXHDD_IMAGE_FLAGS_NONE | VBOXHDD_VMDK_IMAGE_FLAGS_SPLIT_2G | VBOXHDD_VMDK_IMAGE_FLAGS_RAWDISK)
     89#define VD_VMDK_IMAGE_FLAGS_MASK            (VD_IMAGE_FLAGS_NONE | VD_VMDK_IMAGE_FLAGS_SPLIT_2G | VD_VMDK_IMAGE_FLAGS_RAWDISK)
    9090
    9191/** Mask of valid image flags for VDI. */
    92 #define VBOXHDD_VDI_IMAGE_FLAGS_MASK            (VBOXHDD_IMAGE_FLAGS_NONE | VBOXHDD_VDI_IMAGE_FLAGS_ZERO_EXPAND)
     92#define VD_VDI_IMAGE_FLAGS_MASK             (VD_IMAGE_FLAGS_NONE | VD_VDI_IMAGE_FLAGS_ZERO_EXPAND)
    9393
    9494/** Default image flags. */
    95 #define VBOXHDD_IMAGE_FLAGS_DEFAULT             (VBOXHDD_IMAGE_FLAGS_NONE)
     95#define VD_IMAGE_FLAGS_DEFAULT              (VD_IMAGE_FLAGS_NONE)
    9696/** @} */
    9797
     
    100100 */
    101101/** Try to open image in read/write exclusive access mode if possible, or in read-only elsewhere. */
    102 #define VBOXHDD_OPEN_FLAGS_NORMAL       (0)
     102#define VD_OPEN_FLAGS_NORMAL        (0)
    103103/** Open image in read-only mode with sharing access with others. */
    104 #define VBOXHDD_OPEN_FLAGS_READONLY     (1)
    105 /** Honor zero block writes instead of ignoring them whenever possible. */
    106 #define VBOXHDD_OPEN_FLAGS_HONOR_ZEROES (2)
     104#define VD_OPEN_FLAGS_READONLY      (1)
     105/** Honor zero block writes instead of ignoring them whenever possible.
     106 * This is not supported by all formats. It is silently ignored in this case. */
     107#define VD_OPEN_FLAGS_HONOR_ZEROES  (2)
    107108/** Mask of valid flags. */
    108 #define VBOXHDD_OPEN_FLAGS_MASK         (VBOXHDD_OPEN_FLAGS_NORMAL | VBOXHDD_OPEN_FLAGS_READONLY | VBOXHDD_OPEN_FLAGS_HONOR_ZEROES)
     109#define VD_OPEN_FLAGS_MASK          (VD_OPEN_FLAGS_NORMAL | VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_HONOR_ZEROES)
    109110/** @}*/
    110111
     
    121122 * No image files are opened.
    122123 *
    123  * @returns Pointer to newly created empty HDD container.
    124  * @returns NULL on failure, typically out of memory.
     124 * @returns VBox status code.
    125125 * @param   pszBackend      Name of the image file backend to use.
    126  */
    127 VBOXDDU_DECL(PVBOXHDD) VBOXHDDCreate(const char *pszBackend);
     126 * @param   ppDisk          Where to store the reference to the VBox HDD container.
     127 */
     128VBOXDDU_DECL(int) VDCreate(const char *pszBackend, PVBOXHDD *ppDisk);
    128129
    129130/**
     
    133134 * @param   pDisk           Pointer to VBox HDD container.
    134135 */
    135 VBOXDDU_DECL(void) VBOXHDDDestroy(PVBOXHDD pDisk);
     136VBOXDDU_DECL(void) VDDestroy(PVBOXHDD pDisk);
    136137
    137138/**
     
    146147 *
    147148 * Note that the image is opened in read-only mode if a read/write open is not possible.
    148  * Use VBOXHDDIsReadOnly to check open mode.
     149 * Use VDIsReadOnly to check open mode.
    149150 *
    150151 * @returns VBox status code.
    151152 * @param   pDisk           Pointer to VBox HDD container.
    152153 * @param   pszFilename     Name of the image file to open.
    153  * @param   uOpenFlags      Image file open mode, see VBOXHDD_OPEN_FLAGS_* constants.
    154  */
    155 VBOXDDU_DECL(int) VBOXHDDOpenImage(PVBOXHDD pDisk, const char *pszFilename, unsigned uOpenFlags);
     154 * @param   uOpenFlags      Image file open mode, see VD_OPEN_FLAGS_* constants.
     155 */
     156VBOXDDU_DECL(int) VDOpen(PVBOXHDD pDisk, const char *pszFilename, unsigned uOpenFlags);
    156157
    157158/**
     
    165166 * @param   uImageFlags     Flags specifying special image features.
    166167 * @param   pszComment      Pointer to image comment. NULL is ok.
    167  * @param   uOpenFlags      Image file open mode, see VBOXHDD_OPEN_FLAGS_* constants.
     168 * @param   uOpenFlags      Image file open mode, see VD_OPEN_FLAGS_* constants.
    168169 * @param   pfnProgress     Progress callback. Optional. NULL if not to be used.
    169170 * @param   pvUser          User argument for the progress callback.
    170171 */
    171 VBOXDDU_DECL(int) VBOXHDDCreateBaseImage(PVBOXHDD pDisk, const char *pszFilename,
    172                                          VBOXHDDIMAGETYPE enmType, uint64_t cbSize,
    173                                          unsigned uImageFlags, const char *pszComment,
    174                                          unsigned uOpenFlags,
    175                                          PFNVMPROGRESS pfnProgress, void *pvUser);
     172VBOXDDU_DECL(int) VDCreateBase(PVBOXHDD pDisk, const char *pszFilename,
     173                               VDIMAGETYPE enmType, uint64_t cbSize,
     174                               unsigned uImageFlags, const char *pszComment,
     175                               unsigned uOpenFlags,
     176                               PFNVMPROGRESS pfnProgress, void *pvUser);
    176177
    177178/**
    178179 * Creates and opens a new differencing image file in HDD container.
    179  * See comments for VBOXHDDOpenImage function about differencing images.
     180 * See comments for VDOpen function about differencing images.
    180181 *
    181182 * @returns VBox status code.
     
    184185 * @param   uImageFlags     Flags specifying special image features.
    185186 * @param   pszComment      Pointer to image comment. NULL is ok.
    186  * @param   uOpenFlags      Image file open mode, see VBOXHDD_OPEN_FLAGS_* constants.
     187 * @param   uOpenFlags      Image file open mode, see VD_OPEN_FLAGS_* constants.
    187188 * @param   pfnProgress     Progress callback. Optional. NULL if not to be used.
    188189 * @param   pvUser          User argument for the progress callback.
    189190 */
    190 VBOXDDU_DECL(int) VBOXHDDCreateDifferenceImage(PVBOXHDD pDisk, const char *pszFilename,
    191                                                unsigned uImageFlags, const char *pszComment,
    192                                                unsigned uOpenFlags,
    193                                                PFNVMPROGRESS pfnProgress, void *pvUser);
     191VBOXDDU_DECL(int) VDCreateDiff(PVBOXHDD pDisk, const char *pszFilename,
     192                               unsigned uImageFlags, const char *pszComment,
     193                               unsigned uOpenFlags,
     194                               PFNVMPROGRESS pfnProgress, void *pvUser);
    194195
    195196/**
     
    205206 * @param   pvUser          User argument for the progress callback.
    206207 */
    207 VBOXDDU_DECL(int) VBOXHDDMergeImage(PVBOXHDD pDisk, unsigned nImageFrom, unsigned nImageTo,
    208                                     PFNVMPROGRESS pfnProgress, void *pvUser);
     208VBOXDDU_DECL(int) VDMerge(PVBOXHDD pDisk, unsigned nImageFrom, unsigned nImageTo,
     209                          PFNVMPROGRESS pfnProgress, void *pvUser);
    209210
    210211/**
     
    214215 * backend for the destination VBox HDD container may be different from the
    215216 * source container.
     217 * If both the source and destination reference the same VBox HDD container,
     218 * then the image is moved (by copying/deleting) to the new location.
     219 * The source container is unchanged if the move operation fails, otherwise
     220 * the image at the new location is opened in the same way as the old one was.
    216221 *
    217222 * @returns VBox status code.
     
    222227 * @param   pvUser          User argument for the progress callback.
    223228 */
    224 VBOXDDU_DECL(int) VBOXHDDCopyImage(PVBOXHDD pDiskFrom, unsigned nImage, PVBOXHDD pDiskTo,
    225                                    PFNVMPROGRESS pfnProgress, void *pvUser);
     229VBOXDDU_DECL(int) VDCopy(PVBOXHDD pDiskFrom, unsigned nImage, PVBOXHDD pDiskTo,
     230                         PFNVMPROGRESS pfnProgress, void *pvUser);
    226231
    227232/**
     
    231236 *
    232237 * @returns VBox status code.
     238 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container.
    233239 * @param   pDisk           Pointer to VBox HDD container.
    234240 * @param   nImage          Image number, counts from 0. 0 is always base image of container.
     
    237243 * @param   pvUser          User argument for the progress callback.
    238244 */
    239 VBOXDDU_DECL(int) VBOXHDDCompactImage(PVBOXHDD pDisk, unsigned nImage,
    240                                       bool fDefragment,
    241                                       PFNVMPROGRESS pfnProgress, void *pvUser);
     245VBOXDDU_DECL(int) VDCompact(PVBOXHDD pDisk, unsigned nImage,
     246                            bool fDefragment,
     247                            PFNVMPROGRESS pfnProgress, void *pvUser);
    242248
    243249/**
     
    246252 *
    247253 * @returns VBox status code.
     254 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container.
    248255 * @param   pDisk           Pointer to VBox HDD container.
    249256 * @param   nImage          Image number, counts from 0. 0 is always base image of container.
     
    252259 * @param   pvUser          User argument for the progress callback.
    253260 */
    254 VBOXDDU_DECL(int) VBOXHDDResizeImage(PVBOXHDD pDisk, unsigned nImage, uint64_t cbSize,
    255                                      PFNVMPROGRESS pfnProgress, void *pvUser);
     261VBOXDDU_DECL(int) VDResize(PVBOXHDD pDisk, unsigned nImage, uint64_t cbSize,
     262                           PFNVMPROGRESS pfnProgress, void *pvUser);
    256263
    257264/**
     
    264271 * @param   fDelete         If true, delete the image from the host disk.
    265272 */
    266 VBOXDDU_DECL(void) VBOXHDDCloseImage(PVBOXHDD pDisk, bool fDelete);
     273VBOXDDU_DECL(void) VDClose(PVBOXHDD pDisk, bool fDelete);
    267274
    268275/**
     
    271278 * @param   pDisk           Pointer to VBox HDD container.
    272279 */
    273 VBOXDDU_DECL(void) VBOXHDDCloseAllImages(PVBOXHDD pDisk);
     280VBOXDDU_DECL(void) VDCloseAll(PVBOXHDD pDisk);
    274281
    275282/**
     
    277284 *
    278285 * @returns VBox status code.
    279  * @param   pDisk           Pointer to VBox HDD container.
    280  * @param   offStart        Offset of first reading byte from start of disk.
     286 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container.
     287 * @param   pDisk           Pointer to VBox HDD container.
     288 * @param   off             Offset of first reading byte from start of disk.
    281289 * @param   pvBuf           Pointer to buffer for reading data.
    282  * @param   cbToRead        Number of bytes to read.
    283  */
    284 VBOXDDU_DECL(int) VBOXHDDRead(PVBOXHDD pDisk, uint64_t offStart, void *pvBuf, unsigned cbToRead);
     290 * @param   cbRead          Number of bytes to read.
     291 */
     292VBOXDDU_DECL(int) VDRead(PVBOXHDD pDisk, uint64_t off, void *pvBuf, unsigned cbRead);
    285293
    286294/**
     
    288296 *
    289297 * @returns VBox status code.
    290  * @param   pDisk           Pointer to VBox HDD container.
    291  * @param   offStart        Offset of first writing byte from start of disk.
    292  * @param   pvBuf           Pointer to buffer of writing data.
    293  * @param   cbToWrite       Number of bytes to write.
    294  */
    295 VBOXDDU_DECL(int) VBOXHDDWrite(PVBOXHDD pDisk, uint64_t offStart, const void *pvBuf, unsigned cbToWrite);
     298 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container.
     299 * @param   pDisk           Pointer to VBox HDD container.
     300 * @param   off             Offset of first writing byte from start of disk.
     301 * @param   pvBuf           Pointer to buffer for writing data.
     302 * @param   cbWrite         Number of bytes to write.
     303 */
     304VBOXDDU_DECL(int) VDWrite(PVBOXHDD pDisk, uint64_t off, const void *pvBuf, unsigned cbWrite);
    296305
    297306/**
     
    299308 *
    300309 * @returns VBox status code.
    301  * @param   pDisk           Pointer to VBox HDD container.
    302  */
    303 VBOXDDU_DECL(int) VBOXHDDFlush(PVBOXHDD pDisk);
     310 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container.
     311 * @param   pDisk           Pointer to VBox HDD container.
     312 */
     313VBOXDDU_DECL(int) VDFlush(PVBOXHDD pDisk);
    304314
    305315/**
    306316 * Get number of opened images in HDD container.
    307317 *
    308  * @returns Number of opened images for HDD container. 0 if no images has been opened.
    309  * @param   pDisk           Pointer to VBox HDD container.
    310  */
    311 VBOXDDU_DECL(int) VBOXHDDGetImagesCount(PVBOXHDD pDisk);
     318 * @returns Number of opened images for HDD container. 0 if no images have been opened.
     319 * @param   pDisk           Pointer to VBox HDD container.
     320 */
     321VBOXDDU_DECL(unsigned) VDGetCount(PVBOXHDD pDisk);
    312322
    313323/**
     
    318328 * @param   pDisk           Pointer to VBox HDD container.
    319329 */
    320 VBOXDDU_DECL(bool) VBOXHDDIsReadOnly(PVBOXHDD pDisk);
     330VBOXDDU_DECL(bool) VDIsReadOnly(PVBOXHDD pDisk);
    321331
    322332/**
     
    327337 * @param   pDisk           Pointer to VBox HDD container.
    328338 */
    329 VBOXDDU_DECL(uint64_t) VBOXHDDGetSize(PVBOXHDD pDisk);
     339VBOXDDU_DECL(uint64_t) VDGetSize(PVBOXHDD pDisk);
    330340
    331341/**
     
    336346 * @param   pDisk           Pointer to VBox HDD container.
    337347 */
    338 VBOXDDU_DECL(unsigned) VBOXHDDGetBlockSize(PVBOXHDD pDisk);
    339 
    340 /**
    341  * Get optimal buffer size for working with the VBox HDD container.
    342  * The working buffer size is an integral multiple of the block size.
    343  *
    344  * @returns Virtual disk working buffer size in bytes.
    345  * @param   pDisk           Pointer to VBox HDD container.
    346  */
    347 VBOXDDU_DECL(unsigned) VBOXHDDGetBufferSize(PVBOXHDD pDisk);
     348VBOXDDU_DECL(unsigned) VDGetBlockSize(PVBOXHDD pDisk);
    348349
    349350/**
     
    358359 * @param   pcSectors       Where to store the number of sectors. NULL is ok.
    359360 */
    360 VBOXDDU_DECL(int) VBOXHDDGetGeometry(PVBOXHDD pDisk, unsigned *pcCylinders, unsigned *pcHeads, unsigned *pcSectors);
     361VBOXDDU_DECL(int) VDGetGeometry(PVBOXHDD pDisk,
     362                                unsigned *pcCylinders, unsigned *pcHeads, unsigned *pcSectors);
    361363
    362364/**
     
    372374 * @param   cSectors        Number of sectors.
    373375 */
    374 VBOXDDU_DECL(int) VBOXHDDSetGeometry(PVBOXHDD pDisk, unsigned cCylinders, unsigned cHeads, unsigned cSectors);
     376VBOXDDU_DECL(int) VDSetGeometry(PVBOXHDD pDisk,
     377                                unsigned cCylinders, unsigned cHeads, unsigned cSectors);
    375378
    376379/**
     
    379382 * @returns VBox status code.
    380383 * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container.
     384 * @returns VERR_VDI_GEOMETRY_NOT_SET if no geometry present in the HDD container.
    381385 * @param   pDisk           Pointer to VBox HDD container.
    382386 * @param   penmTranslation Where to store the translation mode (see pdm.h).
    383387 */
    384 VBOXDDU_DECL(int) VBOXHDDGetTranslation(PVBOXHDD pDisk, PPDMBIOSTRANSLATION penmTranslation);
     388VBOXDDU_DECL(int) VDGetTranslation(PVBOXHDD pDisk, PPDMBIOSTRANSLATION penmTranslation);
    385389
    386390/**
     
    394398 * @param   enmTranslation  Translation mode (see pdm.h).
    395399 */
    396 VBOXDDU_DECL(int) VBOXHDDSetTranslation(PVBOXHDD pDisk, PDMBIOSTRANSLATION enmTranslation);
    397 
    398 /**
    399  * Get version of opened image in HDD container.
     400VBOXDDU_DECL(int) VDSetTranslation(PVBOXHDD pDisk, PDMBIOSTRANSLATION enmTranslation);
     401
     402/**
     403 * Get version of image in HDD container.
    400404 *
    401405 * @returns VBox status code.
     
    405409 * @param   puVersion       Where to store the image version.
    406410 */
    407 VBOXDDU_DECL(int) VBOXHDDGetImageVersion(PVBOXHDD pDisk, unsigned nImage, unsigned *puVersion);
    408 
    409 /**
    410  * Get type of opened image in HDD container.
     411VBOXDDU_DECL(int) VDGetVersion(PVBOXHDD pDisk, unsigned nImage, unsigned *puVersion);
     412
     413/**
     414 * Get type of image in HDD container.
    411415 *
    412416 * @returns VBox status code.
     
    416420 * @param   penmType        Where to store the image type.
    417421 */
    418 VBOXDDU_DECL(int) VBOXHDDGetImageType(PVBOXHDD pDisk, unsigned nImage, PVBOXHDDIMAGETYPE penmType);
    419 
    420 /**
    421  * Get flags of opened image in HDD container.
     422VBOXDDU_DECL(int) VDGetImageType(PVBOXHDD pDisk, unsigned nImage, PVDIMAGETYPE penmType);
     423
     424/**
     425 * Get flags of image in HDD container.
    422426 *
    423427 * @returns VBox status code.
     
    427431 * @param   puImageFlags    Where to store the image flags.
    428432 */
    429 VBOXDDU_DECL(int) VBOXHDDGetImageFlags(PVBOXHDD pDisk, unsigned nImage, unsigned *puImageFlags);
     433VBOXDDU_DECL(int) VDGetImageFlags(PVBOXHDD pDisk, unsigned nImage, unsigned *puImageFlags);
    430434
    431435/**
     
    437441 * @param   puOpenFlags     Where to store the image open flags.
    438442 */
    439 VBOXDDU_DECL(int) VBOXHDDGetOpenFlags(PVBOXHDD pDisk, unsigned *puOpenFlags);
     443VBOXDDU_DECL(int) VDGetOpenFlags(PVBOXHDD pDisk, unsigned *puOpenFlags);
    440444
    441445/**
     
    447451 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.
    448452 * @param   pDisk           Pointer to VBox HDD container.
    449  * @param   uOpenFlags      Image file open mode, see VBOXHDD_OPEN_FLAGS_* constants.
    450  */
    451 VBOXDDU_DECL(int) VBOXHDDSetOpenFlags(PVBOXHDD pDisk, unsigned uOpenFlags);
    452 
    453 /**
    454  * Get base filename of opened image in HDD container. Some image formats use
     453 * @param   uOpenFlags      Image file open mode, see VD_OPEN_FLAGS_* constants.
     454 */
     455VBOXDDU_DECL(int) VDSetOpenFlags(PVBOXHDD pDisk, unsigned uOpenFlags);
     456
     457/**
     458 * Get base filename of image in HDD container. Some image formats use
    455459 * other filenames as well, so don't use this for anything but for informational
    456460 * purposes.
     
    464468 * @param   cbFilename      Size of buffer pszFilename points to.
    465469 */
    466 VBOXDDU_DECL(int) VBOXHDDGetImageFilename(PVBOXHDD pDisk, unsigned nImage, char *pszFilename, unsigned cbFilename);
    467 
    468 /**
    469  * Get the comment line of opened image in HDD container.
     470VBOXDDU_DECL(int) VDGetFilename(PVBOXHDD pDisk, unsigned nImage, char *pszFilename, unsigned cbFilename);
     471
     472/**
     473 * Get the comment line of image in HDD container.
    470474 *
    471475 * @returns VBox status code.
     
    477481 * @param   cbComment       The size of pszComment buffer. 0 is ok.
    478482 */
    479 VBOXDDU_DECL(int) VBOXHDDGetImageComment(PVBOXHDD pDisk, unsigned nImage, char *pszComment, unsigned cbComment);
    480 
    481 /**
    482  * Changes the comment line of opened image in HDD container.
     483VBOXDDU_DECL(int) VDGetComment(PVBOXHDD pDisk, unsigned nImage, char *pszComment, unsigned cbComment);
     484
     485/**
     486 * Changes the comment line of image in HDD container.
    483487 *
    484488 * @returns VBox status code.
     
    488492 * @param   pszComment      New comment string (UTF-8). NULL is allowed to reset the comment.
    489493 */
    490 VBOXDDU_DECL(int) VBOXHDDSetImageComment(PVBOXHDD pDisk, unsigned nImage, const char *pszComment);
    491 
    492 /**
    493  * Get UUID of opened image in HDD container.
    494  *
    495  * @returns VBox status code.
    496  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.
    497  * @param   pDisk           Pointer to VBox HDD container.
    498  * @param   nImage          Image number, counts from 0. 0 is always base image of container.
    499  * @param   pUuid           Where to store the image creation uuid.
    500  */
    501 VBOXDDU_DECL(int) VBOXHDDGetImageUuid(PVBOXHDD pDisk, unsigned nImage, PRTUUID pUuid);
    502 
    503 /**
    504  * Set the opened image's UUID. Should not be used by normal applications.
     494VBOXDDU_DECL(int) VDSetComment(PVBOXHDD pDisk, unsigned nImage, const char *pszComment);
     495
     496/**
     497 * Get UUID of image in HDD container.
     498 *
     499 * @returns VBox status code.
     500 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.
     501 * @param   pDisk           Pointer to VBox HDD container.
     502 * @param   nImage          Image number, counts from 0. 0 is always base image of container.
     503 * @param   pUuid           Where to store the image uuid.
     504 */
     505VBOXDDU_DECL(int) VDGetUuid(PVBOXHDD pDisk, unsigned nImage, PRTUUID pUuid);
     506
     507/**
     508 * Set the image's UUID. Should not be used by normal applications.
    505509 *
    506510 * @returns VBox status code.
     
    510514 * @param   pUuid           Optional parameter, new UUID of the image.
    511515 */
    512 VBOXDDU_DECL(int) VBOXHDDSetImageUuid(PVBOXHDD pDisk, unsigned nImage, PCRTUUID pUuid);
    513 
    514 /**
    515  * Get last modification UUID of opened image in HDD container.
     516VBOXDDU_DECL(int) VDSetUuid(PVBOXHDD pDisk, unsigned nImage, PCRTUUID pUuid);
     517
     518/**
     519 * Get last modification UUID of image in HDD container.
    516520 *
    517521 * @returns VBox status code.
     
    521525 * @param   pUuid           Where to store the image modification uuid.
    522526 */
    523 VBOXDDU_DECL(int) VBOXHDDGetImageModificationUuid(PVBOXHDD pDisk, unsigned nImage, PRTUUID pUuid);
    524 
    525 /**
    526  * Set the opened image's last modification UUID. Should not be used by normal applications.
     527VBOXDDU_DECL(int) VDGetModificationUuid(PVBOXHDD pDisk, unsigned nImage, PRTUUID pUuid);
     528
     529/**
     530 * Set the image's last modification UUID. Should not be used by normal applications.
    527531 *
    528532 * @returns VBox status code.
     
    532536 * @param   pUuid           Optional parameter, new last modification UUID of the image.
    533537 */
    534 VBOXDDU_DECL(int) VBOXHDDSetImageModificationUuid(PVBOXHDD pDisk, unsigned nImage, PCRTUUID pUuid);
    535 
    536 /**
    537  * Get parent UUID of opened image in HDD container.
     538VBOXDDU_DECL(int) VDSetModificationUuid(PVBOXHDD pDisk, unsigned nImage, PCRTUUID pUuid);
     539
     540/**
     541 * Get parent UUID of image in HDD container.
    538542 *
    539543 * @returns VBox status code.
     
    541545 * @param   pDisk           Pointer to VBox HDD container.
    542546 * @param   nImage          Image number, counts from 0. 0 is always base image of the container.
    543  * @param   pUuid           Where to store the image creation uuid.
    544  */
    545 VBOXDDU_DECL(int) VBOXHDDGetParentImageUuid(PVBOXHDD pDisk, unsigned nImage, PRTUUID pUuid);
     547 * @param   pUuid           Where to store the parent image uuid.
     548 */
     549VBOXDDU_DECL(int) VDGetParentUuid(PVBOXHDD pDisk, unsigned nImage, PRTUUID pUuid);
    546550
    547551/**
     
    553557 * @param   pUuid           Optional parameter, new parent UUID of the image.
    554558 */
    555 VBOXDDU_DECL(int) VBOXHDDSetImageParentUuid(PVBOXHDD pDisk, unsigned nImage, PCRTUUID pUuid);
     559VBOXDDU_DECL(int) VDSetParentUuid(PVBOXHDD pDisk, unsigned nImage, PCRTUUID pUuid);
    556560
    557561
     
    562566 * @param   pDisk           Pointer to VBox HDD container.
    563567 */
    564 VBOXDDU_DECL(void) VBOXHDDDumpImages(PVBOXHDD pDisk);
     568VBOXDDU_DECL(void) VDDumpImages(PVBOXHDD pDisk);
    565569
    566570__END_DECLS
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette