VirtualBox

Changeset 25203 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Dec 4, 2009 7:30:50 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55684
Message:

Main: make SerialPort instance data private and make it use the XML settings struct for simplicity

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

Legend:

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

    r25202 r25203  
    9393
    9494private:
    95 
    9695    HRESULT checkSetPath(const Utf8Str &str);
    9796
  • trunk/src/VBox/Main/include/SerialPortImpl.h

    r24989 r25203  
    4242{
    4343public:
    44 
    45     struct Data
    46     {
    47         Data()
    48             : mSlot (0)
    49             , mEnabled (FALSE)
    50             , mIRQ (4)
    51             , mIOBase (0x3f8)
    52             , mHostMode (PortMode_Disconnected)
    53             , mServer (FALSE)
    54         {}
    55 
    56         bool operator== (const Data &that) const
    57         {
    58             return this == &that ||
    59                    (mSlot     == that.mSlot     &&
    60                     mEnabled  == that.mEnabled  &&
    61                     mIRQ      == that.mIRQ      &&
    62                     mIOBase   == that.mIOBase   &&
    63                     mHostMode == that.mHostMode &&
    64                     mPath     == that.mPath     &&
    65                     mServer   == that.mServer);
    66         }
    67 
    68         ULONG mSlot;
    69         BOOL  mEnabled;
    70         ULONG mIRQ;
    71         ULONG mIOBase;
    72         PortMode_T mHostMode;
    73         Bstr  mPath;
    74         BOOL  mServer;
    75     };
    76 
    7744    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (SerialPort)
    7845
     
    11885    HRESULT saveSettings(settings::SerialPort &data);
    11986
    120     bool isModified() { AutoWriteLock alock (this); return mData.isBackedUp(); }
    121     bool isReallyModified() { AutoWriteLock alock (this); return mData.hasActualChanges(); }
     87    bool isModified();
     88    bool isReallyModified();
    12289    bool rollback();
    12390    void commit();
    124     void copyFrom (SerialPort *aThat);
     91    void copyFrom(SerialPort *aThat);
     92
    12593    void applyDefaults (GuestOSType *aOsType);
    12694
     
    132100
    133101private:
     102    HRESULT checkSetPath(const Utf8Str &str);
    134103
    135     HRESULT checkSetPath (CBSTR aPath);
    136 
    137     const ComObjPtr<Machine, ComWeakRef> mParent;
    138     const ComObjPtr<SerialPort> mPeer;
    139 
    140     Backupable<Data> mData;
     104    struct Data;
     105    Data *m;
    141106};
    142107
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