VirtualBox

Changeset 33524 in vbox for trunk/src/VBox/Main/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/src/VBox/Main/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/MediumFormatImpl.h

    r32531 r33524  
    5353    };
    5454
    55     typedef std::list<Utf8Str>  StrList;
    56     typedef std::list<Property> PropertyList;
     55    typedef std::list<Utf8Str>      StrList;
     56    typedef std::list<DeviceType_T> DeviceTypeList;
     57    typedef std::list<Property>     PropertyList;
    5758
    5859    struct Data
     
    6061        Data() : capabilities(0) {}
    6162
    62         const Utf8Str       strId;
    63         const Utf8Str       strName;
    64         const StrList       llFileExtensions;
    65         const uint64_t      capabilities;
    66         const PropertyList  llProperties;
     63        const Utf8Str        strId;
     64        const Utf8Str        strName;
     65        const StrList        llFileExtensions;
     66        const DeviceTypeList llDeviceTypes;
     67        const uint64_t       capabilities;
     68        const PropertyList   llProperties;
    6769    };
    6870
     
    9193    STDMETHOD(COMGETTER(Id))(BSTR *aId);
    9294    STDMETHOD(COMGETTER(Name))(BSTR *aName);
    93     STDMETHOD(COMGETTER(FileExtensions))(ComSafeArrayOut(BSTR, aFileExtensions));
    9495    STDMETHOD(COMGETTER(Capabilities))(ULONG *aCaps);
    9596
    9697    // IMediumFormat methods
     98    STDMETHOD(DescribeFileExtensions)(ComSafeArrayOut(BSTR, aFileExtensions),
     99                                      ComSafeArrayOut(DeviceType_T, aDeviceTypes));
    97100    STDMETHOD(DescribeProperties)(ComSafeArrayOut(BSTR, aNames),
    98101                                  ComSafeArrayOut(BSTR, aDescriptions),
  • trunk/src/VBox/Main/include/MediumImpl.h

    r33339 r33524  
    300300    Utf8Str vdError(int aVRC);
    301301
     302    VDTYPE convertDeviceType();
     303    DeviceType_T convertToDeviceType(VDTYPE enmType);
     304
    302305    static DECLCALLBACK(void) vdErrorCall(void *pvUser, int rc, RT_SRC_POS_DECL,
    303306                                          const char *pszFormat, va_list va);
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r31539 r33524  
    164164
    165165/**
     166 *  Special version of the AssertFailed macro to be used within VirtualBoxBase
     167 *  subclasses that also inherit the VirtualBoxSupportErrorInfoImpl template.
     168 *
     169 *  In the debug build, this macro is equivalent to AssertFailed.
     170 *  In the release build, this macro uses |setError(E_FAIL, ...)| to set the
     171 *  error info from the asserted expression.
     172 *
     173 *  @see VirtualBoxSupportErrorInfoImpl::setError
     174 *
     175 */
     176#if defined (DEBUG)
     177#define ComAssertFailed()    AssertFailed()
     178#else
     179#define ComAssertFailed()    \
     180    do { \
     181        setError(E_FAIL, \
     182                 "Assertion failed: at '%s' (%d) in %s.\nPlease contact the product vendor!", \
     183                 __FILE__, __LINE__, __PRETTY_FUNCTION__); \
     184    } while (0)
     185#endif
     186
     187/**
    166188 *  Special version of the AssertMsg macro to be used within VirtualBoxBase
    167189 *  subclasses that also inherit the VirtualBoxSupportErrorInfoImpl template.
     
    280302#define ComAssertComRCThrowRC(rc)                 \
    281303    if (1)  { ComAssertComRC(rc); if (!SUCCEEDED(rc)) { throw rc; } } else do {} while (0)
     304/** Special version of ComAssert that throws eval */
     305#define ComAssertFailedThrow(eval)                \
     306    if (1) { ComAssertFailed(); { throw (eval); } } else do {} while (0)
    282307
    283308////////////////////////////////////////////////////////////////////////////////
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