VirtualBox

Ignore:
Timestamp:
Nov 18, 2008 12:22:15 AM (16 years ago)
Author:
vboxsync
Message:

Main: HardDisk2: Fixed opening VMDK images for the first time. Made the implicit diff creatoin routine use the default backend extension. Improved setLocation() to distinguish between file and non-file locations according to the backend capability.

File:
1 edited

Legend:

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

    r14225 r14272  
    3333struct VDBACKENDINFO;
    3434
     35/**
     36 * The HardDiskFormat class represents the backend used to store hard disk data
     37 * (IHardDiskFormat interface).
     38 *
     39 * @note Instances of this class are permanently caller-referenced by HardDisk2
     40 * objects (through addCaller()) so that an attempt to uninitialize or delete
     41 * them before all HardDisk2 objects are uninitialized will produce an endless
     42 * wait!
     43 */
    3544class ATL_NO_VTABLE HardDiskFormat :
    3645    public VirtualBoxBaseNEXT,
     
    4049{
    4150public:
     51
     52    struct Property
     53    {
     54        Bstr name;
     55        Bstr description;
     56        DataType_T type;
     57        ULONG flags;
     58        Bstr defaultValue;
     59    };
     60
     61    typedef std::list <Bstr> BstrList;
     62    typedef std::list <Property> PropertyList;
     63
     64    struct Data
     65    {
     66        Data() : capabilities (0) {}
     67
     68        const Bstr id;
     69        const Bstr name;
     70        const BstrList fileExtensions;
     71        const uint64_t capabilities;
     72        const PropertyList properties;
     73    };
    4274
    4375    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (HardDiskFormat)
     
    84116    const Bstr &id() { return m.id; }
    85117    /** Const, no need to lock */
     118    const BstrList &fileExtensions() { return m.fileExtensions; }
     119    /** Const, no need to lock */
    86120    uint64_t capabilities() { return m.capabilities; }
    87121
     
    91125private:
    92126
    93     typedef std::list <Bstr> BstrList;
    94 
    95     struct Property
    96     {
    97         Bstr name;
    98         Bstr description;
    99         DataType_T type;
    100         ULONG flags;
    101         Bstr defaultValue;
    102     };
    103     typedef std::list <Property> PropertyList;
    104 
    105     struct Data
    106     {
    107         Data() : capabilities (0) {}
    108 
    109         const Bstr id;
    110         const Bstr name;
    111         const BstrList fileExtensions;
    112         const uint64_t capabilities;
    113         const PropertyList properties;
    114     };
    115 
    116127    Data m;
    117128};
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