VirtualBox

Changeset 31479 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 9, 2010 12:02:47 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64561
Message:

Main: add registry machine methods

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MediumImpl.cpp

    r31370 r31479  
    103103          numCreateDiffTasks(0),
    104104          vdDiskIfaces(NULL)
    105     {}
     105    { }
    106106
    107107    /** weak VirtualBox parent */
    108108    VirtualBox * const pVirtualBox;
     109
     110    // pParent and llChildren are protected by VirtualBox::getMediaTreeLockHandle()
     111    ComObjPtr<Medium> pParent;
     112    MediaList llChildren;           // to add a child, just call push_back; to remove a child, call child->deparent() which does a lookup
     113
     114    Guid uuidRegistryMachine;       // machine in whose registry this medium is listed or NULL; see getRegistryMachine()
    109115
    110116    const Guid id;
     
    117123    Utf8Str strLastAccessError;
    118124
    119     // pParent and llChildren are protected by VirtualBox::getMediaTreeLockHandle()
    120     ComObjPtr<Medium> pParent;
    121     MediaList llChildren;           // to add a child, just call push_back; to remove a child, call child->deparent() which does a lookup
    122 
    123125    BackRefList backRefs;
    124126
     
    148150    bool hostDrive : 1;
    149151
    150     typedef std::map <Bstr, Bstr> PropertyMap;
     152    typedef std::map<Bstr, Bstr> PropertyMap;
    151153    PropertyMap properties;
    152154
     
    986988     * XML format version change if we wish) */
    987989    for (settings::PropertiesMap::const_iterator it = data.properties.begin();
    988          it != data.properties.end(); ++it)
     990         it != data.properties.end();
     991         ++it)
    989992    {
    990993        const Utf8Str &name = it->first;
     
    25752578{
    25762579    return m->llChildren;
     2580}
     2581
     2582/**
     2583 * Internal method to return the medium's registry machine (i.e. the machine in whose
     2584 * machine XML this medium is listed), or NULL if the medium is registered globally.
     2585 *
     2586 * Must have caller + locking!
     2587 *
     2588 * @return
     2589 */
     2590const Guid& Medium::getRegistryMachineId() const
     2591{
     2592    return m->uuidRegistryMachine;
    25772593}
    25782594
  • trunk/src/VBox/Main/include/MediumImpl.h

    r31370 r31479  
    163163    const MediaList& getChildren() const;
    164164
     165    const Guid& getRegistryMachineId() const;
     166
    165167    const Guid& getId() const;
    166168    MediumState_T getState() const;
Note: See TracChangeset for help on using the changeset viewer.

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