VirtualBox

Changeset 33524 in vbox for trunk/include


Ignore:
Timestamp:
Oct 27, 2010 4:44:37 PM (14 years ago)
Author:
vboxsync
Message:

Storage: Implement offical support for other disk types like DVD and floppy images. DMG images can be used now without hacks

Location:
trunk/include/VBox
Files:
3 edited

Legend:

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

    r32536 r33524  
    6161
    6262    /**
    63      * Pointer to a NULL-terminated array of strings, containing the supported
     63     * Pointer to a NULL-terminated array, containing the supported
    6464     * file extensions. Note that some backends do not work on files, so this
    6565     * pointer may just contain NULL.
    6666     */
    67     const char * const *papszFileExtensions;
     67    PCVDFILEEXTENSION paFileExtensions;
    6868
    6969    /**
     
    8787     * @param   pVDIfsDisk      Pointer to the per-disk VD interface list.
    8888     * @param   pVDIfsImage     Pointer to the per-image VD interface list.
    89      */
    90     DECLR3CALLBACKMEMBER(int, pfnCheckIfValid, (const char *pszFilename, PVDINTERFACE pVDIfsDisk, PVDINTERFACE pVDIfsImage));
     89     * @param   penmType        Returns the supported device type on success.
     90     */
     91    DECLR3CALLBACKMEMBER(int, pfnCheckIfValid, (const char *pszFilename, PVDINTERFACE pVDIfsDisk,
     92                                                PVDINTERFACE pVDIfsImage, VDTYPE *penmType));
    9193
    9294    /**
     
    99101     * @param   pVDIfsDisk      Pointer to the per-disk VD interface list.
    100102     * @param   pVDIfsImage     Pointer to the per-image VD interface list.
     103     * @param   enmType         Requested type of the image.
    101104     * @param   ppBackendData   Opaque state data for this image.
    102105     */
    103106    DECLR3CALLBACKMEMBER(int, pfnOpen, (const char *pszFilename, unsigned uOpenFlags,
    104107                                        PVDINTERFACE pVDIfsDisk, PVDINTERFACE pVDIfsImage,
    105                                         void **ppBackendData));
     108                                        VDTYPE enmType, void **ppBackendData));
    106109
    107110    /**
  • trunk/include/VBox/VBoxHDD.h

    r33205 r33524  
    247247/** @}*/
    248248
     249/** @name VBox HDD container type.
     250 * @{
     251 */
     252typedef enum VDTYPE
     253{
     254    /** Invalid. */
     255    VDTYPE_INVALID = 0,
     256    /** HardDisk */
     257    VDTYPE_HDD,
     258    /** CD/DVD */
     259    VDTYPE_DVD,
     260    /** Floppy. */
     261    VDTYPE_FLOPPY
     262} VDTYPE;
     263/** @}*/
     264
    249265/**
    250266 * Supported interface types.
     
    15291545
    15301546/**
     1547 * Structure describing a file extension.
     1548 */
     1549typedef struct VDFILEEXTENSION
     1550{
     1551    /** Pointer to the NULL-terminated string containing the extension. */
     1552    const char *pszExtension;
     1553    /** The device type the extension supports. */
     1554    VDTYPE      enmType;
     1555} VDFILEEXTENSION;
     1556
     1557/** Pointer to a structure describing a file extension. */
     1558typedef VDFILEEXTENSION *PVDFILEEXTENSION;
     1559
     1560/** Pointer to a const structure describing a file extension. */
     1561typedef const VDFILEEXTENSION *PCVDFILEEXTENSION;
     1562
     1563/**
    15311564 * Data structure for returning a list of backend capabilities.
    15321565 */
     
    15401573     * file extensions. Note that some backends do not work on files, so this
    15411574     * pointer may just contain NULL. */
    1542     const char * const *papszFileExtensions;
     1575    PCVDFILEEXTENSION paFileExtensions;
    15431576    /** Pointer to an array of structs describing each supported config key.
    15441577     * Terminated by a NULL config key. Note that some backends do not support
     
    20002033 * @return  VBox status code.
    20012034 * @param   pVDIfsDisk      Pointer to the per-disk VD interface list.
     2035 * @param   enmType         Type of the image container.
    20022036 * @param   ppDisk          Where to store the reference to HDD container.
    20032037 */
    2004 VBOXDDU_DECL(int) VDCreate(PVDINTERFACE pVDIfsDisk, PVBOXHDD *ppDisk);
     2038VBOXDDU_DECL(int) VDCreate(PVDINTERFACE pVDIfsDisk, VDTYPE enmType, PVBOXHDD *ppDisk);
    20052039
    20062040/**
     
    20242058 * @param   ppszFormat      Receives pointer of the UTF-8 string which contains the format name.
    20252059 *                          The returned pointer must be freed using RTStrFree().
     2060 * @param   penmType        Where to store the type of the image.
    20262061 */
    20272062VBOXDDU_DECL(int) VDGetFormat(PVDINTERFACE pVDIfsDisk, PVDINTERFACE pVDIfsImage,
    2028                               const char *pszFilename, char **ppszFormat);
     2063                              const char *pszFilename, char **ppszFormat, VDTYPE *penmType);
    20292064
    20302065/**
  • trunk/include/VBox/settings.h

    r33386 r33524  
    185185                               const USBDeviceFiltersList &ll,
    186186                               bool fHostMode);
    187     void buildHardDisk(xml::ElementNode &elmMedium,
    188                        const Medium &m,
    189                        uint32_t level);
     187    void buildMedium(xml::ElementNode &elmMedium,
     188                     DeviceType_T devType,
     189                     const Medium &m,
     190                     uint32_t level);
    190191    void buildMediaRegistry(xml::ElementNode &elmParent,
    191192                            const MediaRegistry &mr);
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