VirtualBox

Changeset 44253 in vbox


Ignore:
Timestamp:
Jan 8, 2013 1:24:18 PM (12 years ago)
Author:
vboxsync
Message:

Storage: Missing file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vd-plugin.h

    r39519 r44253  
    175175
    176176    /**
    177      * Read data from a disk image. The area read never crosses a block
    178      * boundary.
    179      *
    180      * @returns VBox status code.
    181      * @returns VERR_VD_BLOCK_FREE if this image contains no data for this block.
    182      * @param   pBackendData    Opaque state data for this image.
    183      * @param   uOffset         Offset to start reading from.
    184      * @param   pvBuf           Where to store the read bits.
    185      * @param   cbRead          Number of bytes to read.
    186      * @param   pcbActuallyRead Pointer to returned number of bytes read.
    187      */
    188     DECLR3CALLBACKMEMBER(int, pfnRead, (void *pBackendData, uint64_t uOffset, void *pvBuf,
    189                                         size_t cbRead, size_t *pcbActuallyRead));
    190 
    191     /**
    192      * Write data to a disk image. The area written never crosses a block
    193      * boundary.
    194      *
    195      * @returns VBox status code.
    196      * @returns VERR_VD_BLOCK_FREE if this image contains no data for this block and
    197      *          this is not a full-block write. The write must be repeated with
    198      *          the correct amount of prefix/postfix data read from the images below
    199      *          in the image stack. This might not be the most convenient interface,
    200      *          but it works with arbitrary block sizes, especially when the image
    201      *          stack uses different block sizes.
    202      * @param   pBackendData    Opaque state data for this image.
    203      * @param   uOffset         Offset to start writing to.
    204      * @param   pvBuf           Where to retrieve the written bits.
    205      * @param   cbWrite         Number of bytes to write.
    206      * @param   pcbWriteProcess Pointer to returned number of bytes that could
    207      *                          be processed. In case the function returned
    208      *                          VERR_VD_BLOCK_FREE this is the number of bytes
    209      *                          that could be written in a full block write,
    210      *                          when prefixed/postfixed by the appropriate
    211      *                          amount of (previously read) padding data.
    212      * @param   pcbPreRead      Pointer to the returned amount of data that must
    213      *                          be prefixed to perform a full block write.
    214      * @param   pcbPostRead     Pointer to the returned amount of data that must
    215      *                          be postfixed to perform a full block write.
    216      * @param   fWrite          Flags which affect write behavior. Combination
    217      *                          of the VD_WRITE_* flags.
    218      */
    219     DECLR3CALLBACKMEMBER(int, pfnWrite, (void *pBackendData, uint64_t uOffset,
    220                                          const void *pvBuf, size_t cbWrite,
    221                                          size_t *pcbWriteProcess, size_t *pcbPreRead,
    222                                          size_t *pcbPostRead, unsigned fWrite));
    223 
    224     /**
    225      * Flush data to disk.
    226      *
    227      * @returns VBox status code.
    228      * @param   pBackendData    Opaque state data for this image.
    229      */
    230     DECLR3CALLBACKMEMBER(int, pfnFlush, (void *pBackendData));
    231 
    232     /**
    233      * Get the version of a disk image.
    234      *
    235      * @returns version of disk image.
    236      * @param   pBackendData    Opaque state data for this image.
    237      */
    238     DECLR3CALLBACKMEMBER(unsigned, pfnGetVersion, (void *pBackendData));
    239 
    240     /**
    241      * Get the capacity of a disk image.
    242      *
    243      * @returns size of disk image in bytes.
    244      * @param   pBackendData    Opaque state data for this image.
    245      */
    246     DECLR3CALLBACKMEMBER(uint64_t, pfnGetSize, (void *pBackendData));
    247 
    248     /**
    249      * Get the file size of a disk image.
    250      *
    251      * @returns size of disk image in bytes.
    252      * @param   pBackendData    Opaque state data for this image.
    253      */
    254     DECLR3CALLBACKMEMBER(uint64_t, pfnGetFileSize, (void *pBackendData));
    255 
    256     /**
    257      * Get virtual disk PCHS geometry stored in a disk image.
    258      *
    259      * @returns VBox status code.
    260      * @returns VERR_VD_GEOMETRY_NOT_SET if no geometry present in the image.
    261      * @param   pBackendData    Opaque state data for this image.
    262      * @param   pPCHSGeometry   Where to store the geometry. Not NULL.
    263      */
    264     DECLR3CALLBACKMEMBER(int, pfnGetPCHSGeometry, (void *pBackendData, PVDGEOMETRY pPCHSGeometry));
    265 
    266     /**
    267      * Set virtual disk PCHS geometry stored in a disk image.
    268      * Only called if geometry is different than before.
    269      *
    270      * @returns VBox status code.
    271      * @param   pBackendData    Opaque state data for this image.
    272      * @param   pPCHSGeometry   Where to load the geometry from. Not NULL.
    273      */
    274     DECLR3CALLBACKMEMBER(int, pfnSetPCHSGeometry, (void *pBackendData, PCVDGEOMETRY pPCHSGeometry));
    275 
    276     /**
    277      * Get virtual disk LCHS geometry stored in a disk image.
    278      *
    279      * @returns VBox status code.
    280      * @returns VERR_VD_GEOMETRY_NOT_SET if no geometry present in the image.
    281      * @param   pBackendData    Opaque state data for this image.
    282      * @param   pLCHSGeometry   Where to store the geometry. Not NULL.
    283      */
    284     DECLR3CALLBACKMEMBER(int, pfnGetLCHSGeometry, (void *pBackendData,  PVDGEOMETRY pLCHSGeometry));
    285 
    286     /**
    287      * Set virtual disk LCHS geometry stored in a disk image.
    288      * Only called if geometry is different than before.
    289      *
    290      * @returns VBox status code.
    291      * @param   pBackendData    Opaque state data for this image.
    292      * @param   pLCHSGeometry   Where to load the geometry from. Not NULL.
    293      */
    294     DECLR3CALLBACKMEMBER(int, pfnSetLCHSGeometry, (void *pBackendData,  PCVDGEOMETRY pLCHSGeometry));
    295 
    296     /**
    297      * Get the image flags of a disk image.
    298      *
    299      * @returns image flags of disk image.
    300      * @param   pBackendData    Opaque state data for this image.
    301      */
    302     DECLR3CALLBACKMEMBER(unsigned, pfnGetImageFlags, (void *pBackendData));
    303 
    304     /**
    305      * Get the open flags of a disk image.
    306      *
    307      * @returns open flags of disk image.
    308      * @param   pBackendData    Opaque state data for this image.
    309      */
    310     DECLR3CALLBACKMEMBER(unsigned, pfnGetOpenFlags, (void *pBackendData));
    311 
    312     /**
    313      * Set the open flags of a disk image. May cause the image to be locked
    314      * in a different mode or be reopened (which can fail).
    315      *
    316      * @returns VBox status code.
    317      * @param   pBackendData    Opaque state data for this image.
    318      * @param   uOpenFlags      New open flags for this image.
    319      */
    320     DECLR3CALLBACKMEMBER(int, pfnSetOpenFlags, (void *pBackendData, unsigned uOpenFlags));
    321 
    322     /**
    323      * Get comment of a disk image.
    324      *
    325      * @returns VBox status code.
    326      * @param   pBackendData    Opaque state data for this image.
    327      * @param   pszComment      Where to store the comment.
    328      * @param   cbComment       Size of the comment buffer.
    329      */
    330     DECLR3CALLBACKMEMBER(int, pfnGetComment, (void *pBackendData, char *pszComment, size_t cbComment));
    331 
    332     /**
    333      * Set comment of a disk image.
    334      *
    335      * @returns VBox status code.
    336      * @param   pBackendData    Opaque state data for this image.
    337      * @param   pszComment      Where to get the comment from. NULL resets comment.
    338      *                          The comment is silently truncated if the image format
    339      *                          limit is exceeded.
    340      */
    341     DECLR3CALLBACKMEMBER(int, pfnSetComment, (void *pBackendData, const char *pszComment));
    342 
    343     /**
    344      * Get UUID of a disk image.
    345      *
    346      * @returns VBox status code.
    347      * @param   pBackendData    Opaque state data for this image.
    348      * @param   pUuid           Where to store the image UUID.
    349      */
    350     DECLR3CALLBACKMEMBER(int, pfnGetUuid, (void *pBackendData, PRTUUID pUuid));
    351 
    352     /**
    353      * Set UUID of a disk image.
    354      *
    355      * @returns VBox status code.
    356      * @param   pBackendData    Opaque state data for this image.
    357      * @param   pUuid           Where to get the image UUID from.
    358      */
    359     DECLR3CALLBACKMEMBER(int, pfnSetUuid, (void *pBackendData, PCRTUUID pUuid));
    360 
    361     /**
    362      * Get last modification UUID of a disk image.
    363      *
    364      * @returns VBox status code.
    365      * @param   pBackendData    Opaque state data for this image.
    366      * @param   pUuid           Where to store the image modification UUID.
    367      */
    368     DECLR3CALLBACKMEMBER(int, pfnGetModificationUuid, (void *pBackendData, PRTUUID pUuid));
    369 
    370     /**
    371      * Set last modification UUID of a disk image.
    372      *
    373      * @returns VBox status code.
    374      * @param   pBackendData    Opaque state data for this image.
    375      * @param   pUuid           Where to get the image modification UUID from.
    376      */
    377     DECLR3CALLBACKMEMBER(int, pfnSetModificationUuid, (void *pBackendData, PCRTUUID pUuid));
    378 
    379     /**
    380      * Get parent UUID of a disk image.
    381      *
    382      * @returns VBox status code.
    383      * @param   pBackendData    Opaque state data for this image.
    384      * @param   pUuid           Where to store the parent image UUID.
    385      */
    386     DECLR3CALLBACKMEMBER(int, pfnGetParentUuid, (void *pBackendData, PRTUUID pUuid));
    387 
    388     /**
    389      * Set parent UUID of a disk image.
    390      *
    391      * @returns VBox status code.
    392      * @param   pBackendData    Opaque state data for this image.
    393      * @param   pUuid           Where to get the parent image UUID from.
    394      */
    395     DECLR3CALLBACKMEMBER(int, pfnSetParentUuid, (void *pBackendData, PCRTUUID pUuid));
    396 
    397     /**
    398      * Get parent modification UUID of a disk image.
    399      *
    400      * @returns VBox status code.
    401      * @param   pBackendData    Opaque state data for this image.
    402      * @param   pUuid           Where to store the parent image modification UUID.
    403      */
    404     DECLR3CALLBACKMEMBER(int, pfnGetParentModificationUuid, (void *pBackendData, PRTUUID pUuid));
    405 
    406     /**
    407      * Set parent modification UUID of a disk image.
    408      *
    409      * @returns VBox status code.
    410      * @param   pBackendData    Opaque state data for this image.
    411      * @param   pUuid           Where to get the parent image modification UUID from.
    412      */
    413     DECLR3CALLBACKMEMBER(int, pfnSetParentModificationUuid, (void *pBackendData, PCRTUUID pUuid));
    414 
    415     /**
    416      * Dump information about a disk image.
    417      *
    418      * @param   pBackendData    Opaque state data for this image.
    419      */
    420     DECLR3CALLBACKMEMBER(void, pfnDump, (void *pBackendData));
    421 
    422     /**
    423      * Get a time stamp of a disk image. May be NULL.
    424      *
    425      * @returns VBox status code.
    426      * @param   pBackendData    Opaque state data for this image.
    427      * @param   pTimeStamp      Where to store the time stamp.
    428      */
    429     DECLR3CALLBACKMEMBER(int, pfnGetTimeStamp, (void *pBackendData, PRTTIMESPEC pTimeStamp));
    430 
    431     /**
    432      * Get the parent time stamp of a disk image. May be NULL.
    433      *
    434      * @returns VBox status code.
    435      * @param   pBackendData    Opaque state data for this image.
    436      * @param   pTimeStamp      Where to store the time stamp.
    437      */
    438     DECLR3CALLBACKMEMBER(int, pfnGetParentTimeStamp, (void *pBackendData, PRTTIMESPEC pTimeStamp));
    439 
    440     /**
    441      * Set the parent time stamp of a disk image. May be NULL.
    442      *
    443      * @returns VBox status code.
    444      * @param   pBackendData    Opaque state data for this image.
    445      * @param   pTimeStamp      Where to get the time stamp from.
    446      */
    447     DECLR3CALLBACKMEMBER(int, pfnSetParentTimeStamp, (void *pBackendData, PCRTTIMESPEC pTimeStamp));
    448 
    449     /**
    450      * Get the relative path to parent image. May be NULL.
    451      *
    452      * @returns VBox status code.
    453      * @param   pBackendData      Opaque state data for this image.
    454      * @param   pszParentFilename Where to store the path.
    455      */
    456     DECLR3CALLBACKMEMBER(int, pfnGetParentFilename, (void *pBackendData, char **ppszParentFilename));
    457 
    458     /**
    459      * Set the relative path to parent image. May be NULL.
    460      *
    461      * @returns VBox status code.
    462      * @param   pBackendData      Opaque state data for this image.
    463      * @param   pszParentFilename Where to get the path from.
    464      */
    465     DECLR3CALLBACKMEMBER(int, pfnSetParentFilename, (void *pBackendData, const char *pszParentFilename));
    466 
    467     /**
    468      * Start an asynchronous read request.
     177     * Start a read request.
    469178     *
    470179     * @returns VBox status code.
     
    475184     * @param   pcbActuallyRead Pointer to returned number of bytes read.
    476185     */
    477     DECLR3CALLBACKMEMBER(int, pfnAsyncRead, (void *pBackendData, uint64_t uOffset, size_t cbRead,
    478                                              PVDIOCTX pIoCtx, size_t *pcbActuallyRead));
    479 
    480     /**
    481      * Start an asynchronous write request.
     186    DECLR3CALLBACKMEMBER(int, pfnRead, (void *pBackendData, uint64_t uOffset, size_t cbRead,
     187                                        PVDIOCTX pIoCtx, size_t *pcbActuallyRead));
     188
     189    /**
     190     * Start a write request.
    482191     *
    483192     * @returns VBox status code.
     
    499208     *                          of the VD_WRITE_* flags.
    500209     */
    501     DECLR3CALLBACKMEMBER(int, pfnAsyncWrite, (void *pBackendData, uint64_t uOffset, size_t cbWrite,
    502                                               PVDIOCTX pIoCtx,
    503                                               size_t *pcbWriteProcess, size_t *pcbPreRead,
    504                                               size_t *pcbPostRead, unsigned fWrite));
     210    DECLR3CALLBACKMEMBER(int, pfnWrite, (void *pBackendData, uint64_t uOffset, size_t cbWrite,
     211                                         PVDIOCTX pIoCtx,
     212                                         size_t *pcbWriteProcess, size_t *pcbPreRead,
     213                                         size_t *pcbPostRead, unsigned fWrite));
    505214
    506215    /**
     
    511220     * @param   pIoCtx          I/O context associated with this request.
    512221     */
    513     DECLR3CALLBACKMEMBER(int, pfnAsyncFlush, (void *pBackendData, PVDIOCTX pIoCtx));
    514 
    515     /** Returns a human readable hard disk location string given a
    516      *  set of hard disk configuration keys. The returned string is an
    517      *  equivalent of the full file path for image-based hard disks.
    518      *  Mandatory for backends with no VD_CAP_FILE and NULL otherwise. */
    519     DECLR3CALLBACKMEMBER(int, pfnComposeLocation, (PVDINTERFACE pConfig, char **pszLocation));
    520 
    521     /** Returns a human readable hard disk name string given a
    522      *  set of hard disk configuration keys. The returned string is an
    523      *  equivalent of the file name part in the full file path for
    524      *  image-based hard disks. Mandatory for backends with no
    525      *  VD_CAP_FILE and NULL otherwise. */
    526     DECLR3CALLBACKMEMBER(int, pfnComposeName, (PVDINTERFACE pConfig, char **pszName));
    527 
    528     /**
    529      * Compact the image. The pointer may be NULL, indicating that this
    530      * isn't supported yet (for file-based images) or not necessary.
    531      *
    532      * @returns VBox status code.
    533      * @returns VERR_NOT_SUPPORTED if this image cannot be compacted yet.
    534      * @param   pBackendData    Opaque state data for this image.
    535      * @param   uPercentStart   Starting value for progress percentage.
    536      * @param   uPercentSpan    Span for varying progress percentage.
    537      * @param   pVDIfsDisk      Pointer to the per-disk VD interface list.
    538      * @param   pVDIfsImage     Pointer to the per-image VD interface list.
    539      * @param   pVDIfsOperation Pointer to the per-operation VD interface list.
    540      */
    541     DECLR3CALLBACKMEMBER(int, pfnCompact, (void *pBackendData,
    542                                            unsigned uPercentStart, unsigned uPercentSpan,
    543                                            PVDINTERFACE pVDIfsDisk,
    544                                            PVDINTERFACE pVDIfsImage,
    545                                            PVDINTERFACE pVDIfsOperation));
    546 
    547     /**
    548      * Resize the image. The pointer may be NULL, indicating that this
    549      * isn't supported yet (for file-based images) or not necessary.
    550      *
    551      * @returns VBox status code.
    552      * @returns VERR_NOT_SUPPORTED if this image cannot be resized yet.
    553      * @param   pBackendData    Opaque state data for this image.
    554      * @param   cbSize          New size of the image.
    555      * @param   pPCHSGeometry   Pointer to the new physical disk geometry <= (16383,16,63). Not NULL.
    556      * @param   pLCHSGeometry   Pointer to the new logical disk geometry <= (x,255,63). Not NULL.
    557      * @param   uPercentStart   Starting value for progress percentage.
    558      * @param   uPercentSpan    Span for varying progress percentage.
    559      * @param   pVDIfsDisk      Pointer to the per-disk VD interface list.
    560      * @param   pVDIfsImage     Pointer to the per-image VD interface list.
    561      * @param   pVDIfsOperation Pointer to the per-operation VD interface list.
    562      */
    563     DECLR3CALLBACKMEMBER(int, pfnResize, (void *pBackendData,
    564                                           uint64_t cbSize,
    565                                           PCVDGEOMETRY pPCHSGeometry,
    566                                           PCVDGEOMETRY pLCHSGeometry,
    567                                           unsigned uPercentStart, unsigned uPercentSpan,
    568                                           PVDINTERFACE pVDIfsDisk,
    569                                           PVDINTERFACE pVDIfsImage,
    570                                           PVDINTERFACE pVDIfsOperation));
    571 
    572     /**
    573      * Discards the given amount of bytes decreasing the size of the image if possible.
    574      *
    575      * @returns VBox status code.
    576      * @retval  VERR_VD_DISCARD_ALIGNMENT_NOT_MET if the range doesn't meet the required alignment
    577      *          for the discard.
    578      * @param   pBackendData         Opaque state data for this image.
    579      * @param   uOffset              The offset of the first byte to discard.
    580      * @param   cbDiscard            How many bytes to discard.
    581      * @param   pcbPreAllocated      Pointer to the returned amount of bytes that must
    582      *                               be discarded before the range to perform a full
    583      *                               block discard.
    584      * @param   pcbPostAllocated     Pointer to the returned amount of bytes that must
    585      *                               be discarded after the range to perform a full
    586      *                               block discard.
    587      * @param   pcbActuallyDiscarded Pointer to the returned amount of bytes which
    588      *                               could be actually discarded.
    589      * @param   ppbmAllocationBitmap Where to store the pointer to the allocation bitmap
    590      *                               if VERR_VD_DISCARD_ALIGNMENT_NOT_MET is returned or NULL
    591      *                               if the allocation bitmap should be returned.
    592      * @param   fDiscard             Flags which affect discard behavior. Combination
    593      *                               of the VD_DISCARD_* flags.
    594      */
    595     DECLR3CALLBACKMEMBER(int, pfnDiscard, (void *pBackendData,
    596                                            uint64_t uOffset, size_t cbDiscard,
    597                                            size_t *pcbPreAllocated,
    598                                            size_t *pcbPostAllocated,
    599                                            size_t *pcbActuallyDiscarded,
    600                                            void   **ppbmAllocationBitmap,
    601                                            unsigned fDiscard));
     222    DECLR3CALLBACKMEMBER(int, pfnFlush, (void *pBackendData, PVDIOCTX pIoCtx));
    602223
    603224    /**
    604225     * Discards the given amount of bytes decreasing the size of the image if possible
    605      * callback version for asynchronous I/O.
    606226     *
    607227     * @returns VBox status code.
     
    626246     *                               of the VD_DISCARD_* flags.
    627247     */
    628     DECLR3CALLBACKMEMBER(int, pfnAsyncDiscard, (void *pBackendData, PVDIOCTX pIoCtx,
    629                                                 uint64_t uOffset, size_t cbDiscard,
    630                                                 size_t *pcbPreAllocated,
    631                                                 size_t *pcbPostAllocated,
    632                                                 size_t *pcbActuallyDiscarded,
    633                                                 void   **ppbmAllocationBitmap,
    634                                                 unsigned fDiscard));
     248    DECLR3CALLBACKMEMBER(int, pfnDiscard, (void *pBackendData, PVDIOCTX pIoCtx,
     249                                           uint64_t uOffset, size_t cbDiscard,
     250                                           size_t *pcbPreAllocated,
     251                                           size_t *pcbPostAllocated,
     252                                           size_t *pcbActuallyDiscarded,
     253                                           void   **ppbmAllocationBitmap,
     254                                           unsigned fDiscard));
     255
     256    /**
     257     * Get the version of a disk image.
     258     *
     259     * @returns version of disk image.
     260     * @param   pBackendData    Opaque state data for this image.
     261     */
     262    DECLR3CALLBACKMEMBER(unsigned, pfnGetVersion, (void *pBackendData));
     263
     264    /**
     265     * Get the capacity of a disk image.
     266     *
     267     * @returns size of disk image in bytes.
     268     * @param   pBackendData    Opaque state data for this image.
     269     */
     270    DECLR3CALLBACKMEMBER(uint64_t, pfnGetSize, (void *pBackendData));
     271
     272    /**
     273     * Get the file size of a disk image.
     274     *
     275     * @returns size of disk image in bytes.
     276     * @param   pBackendData    Opaque state data for this image.
     277     */
     278    DECLR3CALLBACKMEMBER(uint64_t, pfnGetFileSize, (void *pBackendData));
     279
     280    /**
     281     * Get virtual disk PCHS geometry stored in a disk image.
     282     *
     283     * @returns VBox status code.
     284     * @returns VERR_VD_GEOMETRY_NOT_SET if no geometry present in the image.
     285     * @param   pBackendData    Opaque state data for this image.
     286     * @param   pPCHSGeometry   Where to store the geometry. Not NULL.
     287     */
     288    DECLR3CALLBACKMEMBER(int, pfnGetPCHSGeometry, (void *pBackendData, PVDGEOMETRY pPCHSGeometry));
     289
     290    /**
     291     * Set virtual disk PCHS geometry stored in a disk image.
     292     * Only called if geometry is different than before.
     293     *
     294     * @returns VBox status code.
     295     * @param   pBackendData    Opaque state data for this image.
     296     * @param   pPCHSGeometry   Where to load the geometry from. Not NULL.
     297     */
     298    DECLR3CALLBACKMEMBER(int, pfnSetPCHSGeometry, (void *pBackendData, PCVDGEOMETRY pPCHSGeometry));
     299
     300    /**
     301     * Get virtual disk LCHS geometry stored in a disk image.
     302     *
     303     * @returns VBox status code.
     304     * @returns VERR_VD_GEOMETRY_NOT_SET if no geometry present in the image.
     305     * @param   pBackendData    Opaque state data for this image.
     306     * @param   pLCHSGeometry   Where to store the geometry. Not NULL.
     307     */
     308    DECLR3CALLBACKMEMBER(int, pfnGetLCHSGeometry, (void *pBackendData,  PVDGEOMETRY pLCHSGeometry));
     309
     310    /**
     311     * Set virtual disk LCHS geometry stored in a disk image.
     312     * Only called if geometry is different than before.
     313     *
     314     * @returns VBox status code.
     315     * @param   pBackendData    Opaque state data for this image.
     316     * @param   pLCHSGeometry   Where to load the geometry from. Not NULL.
     317     */
     318    DECLR3CALLBACKMEMBER(int, pfnSetLCHSGeometry, (void *pBackendData,  PCVDGEOMETRY pLCHSGeometry));
     319
     320    /**
     321     * Get the image flags of a disk image.
     322     *
     323     * @returns image flags of disk image.
     324     * @param   pBackendData    Opaque state data for this image.
     325     */
     326    DECLR3CALLBACKMEMBER(unsigned, pfnGetImageFlags, (void *pBackendData));
     327
     328    /**
     329     * Get the open flags of a disk image.
     330     *
     331     * @returns open flags of disk image.
     332     * @param   pBackendData    Opaque state data for this image.
     333     */
     334    DECLR3CALLBACKMEMBER(unsigned, pfnGetOpenFlags, (void *pBackendData));
     335
     336    /**
     337     * Set the open flags of a disk image. May cause the image to be locked
     338     * in a different mode or be reopened (which can fail).
     339     *
     340     * @returns VBox status code.
     341     * @param   pBackendData    Opaque state data for this image.
     342     * @param   uOpenFlags      New open flags for this image.
     343     */
     344    DECLR3CALLBACKMEMBER(int, pfnSetOpenFlags, (void *pBackendData, unsigned uOpenFlags));
     345
     346    /**
     347     * Get comment of a disk image.
     348     *
     349     * @returns VBox status code.
     350     * @param   pBackendData    Opaque state data for this image.
     351     * @param   pszComment      Where to store the comment.
     352     * @param   cbComment       Size of the comment buffer.
     353     */
     354    DECLR3CALLBACKMEMBER(int, pfnGetComment, (void *pBackendData, char *pszComment, size_t cbComment));
     355
     356    /**
     357     * Set comment of a disk image.
     358     *
     359     * @returns VBox status code.
     360     * @param   pBackendData    Opaque state data for this image.
     361     * @param   pszComment      Where to get the comment from. NULL resets comment.
     362     *                          The comment is silently truncated if the image format
     363     *                          limit is exceeded.
     364     */
     365    DECLR3CALLBACKMEMBER(int, pfnSetComment, (void *pBackendData, const char *pszComment));
     366
     367    /**
     368     * Get UUID of a disk image.
     369     *
     370     * @returns VBox status code.
     371     * @param   pBackendData    Opaque state data for this image.
     372     * @param   pUuid           Where to store the image UUID.
     373     */
     374    DECLR3CALLBACKMEMBER(int, pfnGetUuid, (void *pBackendData, PRTUUID pUuid));
     375
     376    /**
     377     * Set UUID of a disk image.
     378     *
     379     * @returns VBox status code.
     380     * @param   pBackendData    Opaque state data for this image.
     381     * @param   pUuid           Where to get the image UUID from.
     382     */
     383    DECLR3CALLBACKMEMBER(int, pfnSetUuid, (void *pBackendData, PCRTUUID pUuid));
     384
     385    /**
     386     * Get last modification UUID of a disk image.
     387     *
     388     * @returns VBox status code.
     389     * @param   pBackendData    Opaque state data for this image.
     390     * @param   pUuid           Where to store the image modification UUID.
     391     */
     392    DECLR3CALLBACKMEMBER(int, pfnGetModificationUuid, (void *pBackendData, PRTUUID pUuid));
     393
     394    /**
     395     * Set last modification UUID of a disk image.
     396     *
     397     * @returns VBox status code.
     398     * @param   pBackendData    Opaque state data for this image.
     399     * @param   pUuid           Where to get the image modification UUID from.
     400     */
     401    DECLR3CALLBACKMEMBER(int, pfnSetModificationUuid, (void *pBackendData, PCRTUUID pUuid));
     402
     403    /**
     404     * Get parent UUID of a disk image.
     405     *
     406     * @returns VBox status code.
     407     * @param   pBackendData    Opaque state data for this image.
     408     * @param   pUuid           Where to store the parent image UUID.
     409     */
     410    DECLR3CALLBACKMEMBER(int, pfnGetParentUuid, (void *pBackendData, PRTUUID pUuid));
     411
     412    /**
     413     * Set parent UUID of a disk image.
     414     *
     415     * @returns VBox status code.
     416     * @param   pBackendData    Opaque state data for this image.
     417     * @param   pUuid           Where to get the parent image UUID from.
     418     */
     419    DECLR3CALLBACKMEMBER(int, pfnSetParentUuid, (void *pBackendData, PCRTUUID pUuid));
     420
     421    /**
     422     * Get parent modification UUID of a disk image.
     423     *
     424     * @returns VBox status code.
     425     * @param   pBackendData    Opaque state data for this image.
     426     * @param   pUuid           Where to store the parent image modification UUID.
     427     */
     428    DECLR3CALLBACKMEMBER(int, pfnGetParentModificationUuid, (void *pBackendData, PRTUUID pUuid));
     429
     430    /**
     431     * Set parent modification UUID of a disk image.
     432     *
     433     * @returns VBox status code.
     434     * @param   pBackendData    Opaque state data for this image.
     435     * @param   pUuid           Where to get the parent image modification UUID from.
     436     */
     437    DECLR3CALLBACKMEMBER(int, pfnSetParentModificationUuid, (void *pBackendData, PCRTUUID pUuid));
     438
     439    /**
     440     * Dump information about a disk image.
     441     *
     442     * @param   pBackendData    Opaque state data for this image.
     443     */
     444    DECLR3CALLBACKMEMBER(void, pfnDump, (void *pBackendData));
     445
     446    /**
     447     * Get a time stamp of a disk image. May be NULL.
     448     *
     449     * @returns VBox status code.
     450     * @param   pBackendData    Opaque state data for this image.
     451     * @param   pTimeStamp      Where to store the time stamp.
     452     */
     453    DECLR3CALLBACKMEMBER(int, pfnGetTimeStamp, (void *pBackendData, PRTTIMESPEC pTimeStamp));
     454
     455    /**
     456     * Get the parent time stamp of a disk image. May be NULL.
     457     *
     458     * @returns VBox status code.
     459     * @param   pBackendData    Opaque state data for this image.
     460     * @param   pTimeStamp      Where to store the time stamp.
     461     */
     462    DECLR3CALLBACKMEMBER(int, pfnGetParentTimeStamp, (void *pBackendData, PRTTIMESPEC pTimeStamp));
     463
     464    /**
     465     * Set the parent time stamp of a disk image. May be NULL.
     466     *
     467     * @returns VBox status code.
     468     * @param   pBackendData    Opaque state data for this image.
     469     * @param   pTimeStamp      Where to get the time stamp from.
     470     */
     471    DECLR3CALLBACKMEMBER(int, pfnSetParentTimeStamp, (void *pBackendData, PCRTTIMESPEC pTimeStamp));
     472
     473    /**
     474     * Get the relative path to parent image. May be NULL.
     475     *
     476     * @returns VBox status code.
     477     * @param   pBackendData      Opaque state data for this image.
     478     * @param   pszParentFilename Where to store the path.
     479     */
     480    DECLR3CALLBACKMEMBER(int, pfnGetParentFilename, (void *pBackendData, char **ppszParentFilename));
     481
     482    /**
     483     * Set the relative path to parent image. May be NULL.
     484     *
     485     * @returns VBox status code.
     486     * @param   pBackendData      Opaque state data for this image.
     487     * @param   pszParentFilename Where to get the path from.
     488     */
     489    DECLR3CALLBACKMEMBER(int, pfnSetParentFilename, (void *pBackendData, const char *pszParentFilename));
     490
     491    /** Returns a human readable hard disk location string given a
     492     *  set of hard disk configuration keys. The returned string is an
     493     *  equivalent of the full file path for image-based hard disks.
     494     *  Mandatory for backends with no VD_CAP_FILE and NULL otherwise. */
     495    DECLR3CALLBACKMEMBER(int, pfnComposeLocation, (PVDINTERFACE pConfig, char **pszLocation));
     496
     497    /** Returns a human readable hard disk name string given a
     498     *  set of hard disk configuration keys. The returned string is an
     499     *  equivalent of the file name part in the full file path for
     500     *  image-based hard disks. Mandatory for backends with no
     501     *  VD_CAP_FILE and NULL otherwise. */
     502    DECLR3CALLBACKMEMBER(int, pfnComposeName, (PVDINTERFACE pConfig, char **pszName));
     503
     504    /**
     505     * Compact the image. The pointer may be NULL, indicating that this
     506     * isn't supported yet (for file-based images) or not necessary.
     507     *
     508     * @returns VBox status code.
     509     * @returns VERR_NOT_SUPPORTED if this image cannot be compacted yet.
     510     * @param   pBackendData    Opaque state data for this image.
     511     * @param   uPercentStart   Starting value for progress percentage.
     512     * @param   uPercentSpan    Span for varying progress percentage.
     513     * @param   pVDIfsDisk      Pointer to the per-disk VD interface list.
     514     * @param   pVDIfsImage     Pointer to the per-image VD interface list.
     515     * @param   pVDIfsOperation Pointer to the per-operation VD interface list.
     516     */
     517    DECLR3CALLBACKMEMBER(int, pfnCompact, (void *pBackendData,
     518                                           unsigned uPercentStart, unsigned uPercentSpan,
     519                                           PVDINTERFACE pVDIfsDisk,
     520                                           PVDINTERFACE pVDIfsImage,
     521                                           PVDINTERFACE pVDIfsOperation));
     522
     523    /**
     524     * Resize the image. The pointer may be NULL, indicating that this
     525     * isn't supported yet (for file-based images) or not necessary.
     526     *
     527     * @returns VBox status code.
     528     * @returns VERR_NOT_SUPPORTED if this image cannot be resized yet.
     529     * @param   pBackendData    Opaque state data for this image.
     530     * @param   cbSize          New size of the image.
     531     * @param   pPCHSGeometry   Pointer to the new physical disk geometry <= (16383,16,63). Not NULL.
     532     * @param   pLCHSGeometry   Pointer to the new logical disk geometry <= (x,255,63). Not NULL.
     533     * @param   uPercentStart   Starting value for progress percentage.
     534     * @param   uPercentSpan    Span for varying progress percentage.
     535     * @param   pVDIfsDisk      Pointer to the per-disk VD interface list.
     536     * @param   pVDIfsImage     Pointer to the per-image VD interface list.
     537     * @param   pVDIfsOperation Pointer to the per-operation VD interface list.
     538     */
     539    DECLR3CALLBACKMEMBER(int, pfnResize, (void *pBackendData,
     540                                          uint64_t cbSize,
     541                                          PCVDGEOMETRY pPCHSGeometry,
     542                                          PCVDGEOMETRY pLCHSGeometry,
     543                                          unsigned uPercentStart, unsigned uPercentSpan,
     544                                          PVDINTERFACE pVDIfsDisk,
     545                                          PVDINTERFACE pVDIfsImage,
     546                                          PVDINTERFACE pVDIfsOperation));
    635547
    636548    /**
Note: See TracChangeset for help on using the changeset viewer.

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