VirtualBox

Changeset 7277 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Mar 4, 2008 2:12:17 PM (17 years ago)
Author:
vboxsync
Message:

Make the backend type a per-image property and get away from the per container property. Required e.g. for snapshotting iSCSI disks (whenever we get there).

File:
1 edited

Legend:

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

    r6291 r7277  
    202202 *
    203203 * @returns VBox status code.
    204  * @param   pszBackend      Name of the image file backend to use.
    205204 * @param   pfnError        Callback for setting extended error information.
    206205 * @param   pvErrorUser     Opaque parameter for pfnError.
    207206 * @param   ppDisk          Where to store the reference to HDD container.
    208207 */
    209 VBOXDDU_DECL(int) VDCreate(const char *pszBackend, PFNVDERROR pfnError,
    210                            void *pvErrorUser, PVBOXHDD *ppDisk);
     208VBOXDDU_DECL(int) VDCreate(PFNVDERROR pfnError, void *pvErrorUser,
     209                           PVBOXHDD *ppDisk);
    211210
    212211/**
     
    243242 * @returns VBox status code.
    244243 * @param   pDisk           Pointer to HDD container.
     244 * @param   pszBackend      Name of the image file backend to use.
    245245 * @param   pszFilename     Name of the image file to open.
    246246 * @param   uOpenFlags      Image file open mode, see VD_OPEN_FLAGS_* constants.
    247247 */
    248 VBOXDDU_DECL(int) VDOpen(PVBOXHDD pDisk, const char *pszFilename,
    249                          unsigned uOpenFlags);
     248VBOXDDU_DECL(int) VDOpen(PVBOXHDD pDisk, const char *pszBackend,
     249                         const char *pszFilename, unsigned uOpenFlags);
    250250
    251251/**
     
    254254 * @returns VBox status code.
    255255 * @param   pDisk           Pointer to HDD container.
     256 * @param   pszBackend      Name of the image file backend to use.
    256257 * @param   pszFilename     Name of the image file to create.
    257258 * @param   enmType         Image type, only base image types are acceptable.
     
    265266 * @param   pvUser          User argument for the progress callback.
    266267 */
    267 VBOXDDU_DECL(int) VDCreateBase(PVBOXHDD pDisk, const char *pszFilename,
    268                                VDIMAGETYPE enmType, uint64_t cbSize,
    269                                unsigned uImageFlags, const char *pszComment,
     268VBOXDDU_DECL(int) VDCreateBase(PVBOXHDD pDisk, const char *pszBackend,
     269                               const char *pszFilename, VDIMAGETYPE enmType,
     270                               uint64_t cbSize, unsigned uImageFlags,
     271                               const char *pszComment,
    270272                               PCPDMMEDIAGEOMETRY pPCHSGeometry,
    271273                               PCPDMMEDIAGEOMETRY pLCHSGeometry,
     
    279281 * @returns VBox status code.
    280282 * @param   pDisk           Pointer to HDD container.
     283 * @param   pszBackend      Name of the image file backend to use.
    281284 * @param   pszFilename     Name of the differencing image file to create.
    282285 * @param   uImageFlags     Flags specifying special image features.
     
    286289 * @param   pvUser          User argument for the progress callback.
    287290 */
    288 VBOXDDU_DECL(int) VDCreateDiff(PVBOXHDD pDisk, const char *pszFilename,
    289                                unsigned uImageFlags, const char *pszComment,
    290                                unsigned uOpenFlags, PFNVMPROGRESS pfnProgress,
    291                                void *pvUser);
     291VBOXDDU_DECL(int) VDCreateDiff(PVBOXHDD pDisk, const char *pszBackend,
     292                               const char *pszFilename, unsigned uImageFlags,
     293                               const char *pszComment, unsigned uOpenFlags,
     294                               PFNVMPROGRESS pfnProgress, void *pvUser);
    292295
    293296/**
     
    313316 * The copy is opened in the target HDD container.
    314317 * It is possible to convert between different image formats, because the
    315  * backend for the destination HDD container may be different from the
    316  * source container.
     318 * backend for the destination may be different from the source.
    317319 * If both the source and destination reference the same HDD container,
    318320 * then the image is moved (by copying/deleting or renaming) to the new location.
     
    325327 * @param   nImage          Image number, counts from 0. 0 is always base image of container.
    326328 * @param   pDiskTo         Pointer to destination HDD container.
     329 * @param   pszBackend      Name of the image file backend to use (may be NULL to use the same as the source).
    327330 * @param   pszFilename     New name of the image (may be NULL if pDiskFrom == pDiskTo).
    328331 * @param   fMoveByRename   If true, attempt to perform a move by renaming (if successful the new size is ignored).
     
    332335 */
    333336VBOXDDU_DECL(int) VDCopy(PVBOXHDD pDiskFrom, unsigned nImage, PVBOXHDD pDiskTo,
    334                          const char *pszFilename, bool fMoveByRename,
    335                          uint64_t cbSize, PFNVMPROGRESS pfnProgress,
    336                          void *pvUser);
     337                         const char *pszBackend, const char *pszFilename,
     338                         bool fMoveByRename, uint64_t cbSize,
     339                         PFNVMPROGRESS pfnProgress, void *pvUser);
    337340
    338341/**
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