VirtualBox

Changeset 3652 in vbox


Ignore:
Timestamp:
Jul 16, 2007 4:02:03 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
22924
Message:

Parallel port support. Contributed by: Alexander Eichner

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

Legend:

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

    r3603 r3652  
    18471847    //  Paused, Starting, Saving, Stopping, etc? if not, we should make a
    18481848    //  stricter check (mMachineState != MachineState_Running).
    1849     /* bird: It is not permitted to attach or detach while the VM is saving, is restoring 
     1849    /* bird: It is not permitted to attach or detach while the VM is saving, is restoring
    18501850     * or has stopped - definintly not.
    18511851     *
    1852      * Attaching while starting, well, if you don't create any deadlock it should work... 
    1853      * Paused should work I guess, but we shouldn't push our luck if we're pausing because an 
    1854      * runtime error condition was raised (which is one of the reasons there better be a separate 
     1852     * Attaching while starting, well, if you don't create any deadlock it should work...
     1853     * Paused should work I guess, but we shouldn't push our luck if we're pausing because an
     1854     * runtime error condition was raised (which is one of the reasons there better be a separate
    18551855     * state for that in the VMM).
    18561856     */
     
    19111911
    19121912#ifdef __DARWIN__
    1913     /* Notify the USB Proxy that we're about to detach the device. Since 
    1914      * we don't dare do IPC when holding the console lock, so we'll have 
     1913    /* Notify the USB Proxy that we're about to detach the device. Since
     1914     * we don't dare do IPC when holding the console lock, so we'll have
    19151915     * to revalidate the device when we get back. */
    19161916    alock.leave();
     
    19251925    if (it == mUSBDevices.end())
    19261926        return S_OK;
    1927 #endif 
     1927#endif
    19281928
    19291929    /* First, request VMM to detach the device */
     
    30543054 */
    30553055HRESULT Console::onSerialPortChange(ISerialPort *serialPort)
     3056{
     3057    LogFlowThisFunc (("\n"));
     3058
     3059    AutoCaller autoCaller (this);
     3060    AssertComRCReturnRC (autoCaller.rc());
     3061
     3062    AutoLock alock (this);
     3063
     3064    /* Don't do anything if the VM isn't running */
     3065    if (!mpVM)
     3066        return S_OK;
     3067
     3068    /* protect mpVM */
     3069    AutoVMCaller autoVMCaller (this);
     3070    CheckComRCReturnRC (autoVMCaller.rc());
     3071
     3072    LogFlowThisFunc (("Leaving rc=%#x\n", S_OK));
     3073    return S_OK;
     3074}
     3075
     3076/**
     3077 *  Called by IInternalSessionControl::OnParallelPortChange().
     3078 *
     3079 *  @note Locks this object for writing.
     3080 */
     3081HRESULT Console::onParallelPortChange(IParallelPort *parallelPort)
    30563082{
    30573083    LogFlowThisFunc (("\n"));
     
    54355461
    54365462    /*
     5463     * Parallel (LPT) Ports
     5464     */
     5465    rc = CFGMR3InsertNode(pDevices, "parallel", &pDev);                             RC_CHECK();
     5466    for (ULONG ulInstance = 0; ulInstance < SchemaDefs::ParallelPortCount; ulInstance++)
     5467    {
     5468        ComPtr<IParallelPort> parallelPort;
     5469        hrc = pMachine->GetParallelPort (ulInstance, parallelPort.asOutParam());    H();
     5470        BOOL fEnabled = FALSE;
     5471        if (parallelPort)
     5472            hrc = parallelPort->COMGETTER(Enabled)(&fEnabled);                      H();
     5473        if (!fEnabled)
     5474            continue;
     5475
     5476        char szInstance[4]; Assert(ulInstance <= 999);
     5477        RTStrPrintf(szInstance, sizeof(szInstance), "%lu", ulInstance);
     5478
     5479        rc = CFGMR3InsertNode(pDev, szInstance, &pInst);                            RC_CHECK();
     5480        rc = CFGMR3InsertNode(pInst, "Config", &pCfg);                              RC_CHECK();
     5481
     5482        ULONG uIRQ, uIOBase;
     5483        Bstr  DevicePath;
     5484        hrc = parallelPort->COMGETTER(IRQ)(&uIRQ);                                  H();
     5485        hrc = parallelPort->COMGETTER(IOBase)(&uIOBase);                            H();
     5486        hrc = parallelPort->COMGETTER(DevicePath)(DevicePath.asOutParam());         H();
     5487        rc = CFGMR3InsertInteger(pCfg,   "IRQ", uIRQ);                              RC_CHECK();
     5488        rc = CFGMR3InsertInteger(pCfg,   "IOBase", uIOBase);                        RC_CHECK();
     5489        rc = CFGMR3InsertNode(pInst,     "LUN#0", &pLunL0);                         RC_CHECK();
     5490        rc = CFGMR3InsertString(pLunL0,  "Driver", "HostParallel");                 RC_CHECK();
     5491        rc = CFGMR3InsertNode(pLunL0,    "AttachedDriver", &pLunL1);                RC_CHECK();
     5492        rc = CFGMR3InsertString(pLunL1,  "DevicePath", Utf8Str(DevicePath));        RC_CHECK();
     5493    }
     5494
     5495    /*
    54375496     * VMM Device
    54385497     */
  • trunk/src/VBox/Main/MachineImpl.cpp

    r3566 r3652  
    458458        unconst (mSerialPorts [slot]).createObject();
    459459        mSerialPorts [slot]->init (this, slot);
     460    }
     461
     462    /* create associated parallel port objects */
     463    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot ++)
     464    {
     465        unconst (mParallelPorts [slot]).createObject();
     466        mParallelPorts [slot]->init (this, slot);
    460467    }
    461468
     
    18381845}
    18391846
     1847STDMETHODIMP Machine::GetParallelPort (ULONG slot, IParallelPort **port)
     1848{
     1849    if (!port)
     1850        return E_POINTER;
     1851    if (slot >= ELEMENTS (mParallelPorts))
     1852        return setError (E_INVALIDARG, tr ("Invalid slot number: %d"), slot);
     1853
     1854    AutoCaller autoCaller (this);
     1855    CheckComRCReturnRC (autoCaller.rc());
     1856
     1857    AutoReaderLock alock (this);
     1858
     1859    mParallelPorts [slot].queryInterfaceTo (port);
     1860
     1861    return S_OK;
     1862}
     1863
    18401864STDMETHODIMP Machine::GetNetworkAdapter (ULONG slot, INetworkAdapter **adapter)
    18411865{
     
    32593283    }
    32603284
     3285    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot ++)
     3286    {
     3287        if (mParallelPorts [slot])
     3288        {
     3289            mParallelPorts [slot]->uninit();
     3290            unconst (mParallelPorts [slot]).setNull();
     3291        }
     3292    }
     3293
    32613294    if (mFloppyDrive)
    32623295    {
     
    42854318        }
    42864319        CFGLDRReleaseNode (serialNode);
     4320    }
     4321
     4322    /* Parallel node (optional) */
     4323    CFGNODE parallelNode = 0;
     4324    CFGLDRGetChildNode (aNode, "Lpt", 0, &parallelNode);
     4325    if (parallelNode)
     4326    {
     4327        HRESULT rc = S_OK;
     4328        unsigned cPorts = 0;
     4329        CFGLDRCountChildren (parallelNode, "Port", &cPorts);
     4330        for (unsigned slot = 0; slot < cPorts; slot++)
     4331        {
     4332            rc = mParallelPorts [slot]->loadSettings (parallelNode, slot);
     4333            CheckComRCReturnRC (rc);
     4334        }
     4335        CFGLDRReleaseNode (parallelNode);
    42874336    }
    42884337
     
    60966145    CFGLDRReleaseNode (serialNode);
    60976146
     6147    /* Parallel ports */
     6148    CFGNODE parallelNode = 0;
     6149    CFGLDRCreateChildNode (aNode, "Lpt", &parallelNode);
     6150
     6151    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot++)
     6152    {
     6153        rc = mParallelPorts [slot]->saveSettings (parallelNode);
     6154        CheckComRCReturnRC (rc);
     6155    }
     6156    CFGLDRReleaseNode (parallelNode);
     6157
    60986158    /* Audio adapter */
    60996159    do
     
    71447204            return true;
    71457205
     7206    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot ++)
     7207        if (mParallelPorts [slot] && mParallelPorts [slot]->isModified())
     7208            return true;
     7209
    71467210    return
    71477211        mUserData.isBackedUp() ||
     
    71797243    for (ULONG slot = 0; slot < ELEMENTS (mSerialPorts); slot ++)
    71807244        if (mSerialPorts [slot] && mSerialPorts [slot]->isReallyModified())
     7245            return true;
     7246
     7247    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot ++)
     7248        if (mParallelPorts [slot] && mParallelPorts [slot]->isReallyModified())
    71817249            return true;
    71827250
     
    72217289    ComPtr <INetworkAdapter> networkAdapters [ELEMENTS (mNetworkAdapters)];
    72227290    ComPtr <ISerialPort> serialPorts [ELEMENTS (mSerialPorts)];
     7291    ComPtr <IParallelPort> parallelPorts [ELEMENTS (mParallelPorts)];
    72237292
    72247293    if (mBIOSSettings)
     
    72517320            if (mSerialPorts [slot]->rollback())
    72527321                serialPorts [slot] = mSerialPorts [slot];
     7322
     7323    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot ++)
     7324        if (mParallelPorts [slot])
     7325            if (mParallelPorts [slot]->rollback())
     7326                parallelPorts [slot] = mParallelPorts [slot];
    72537327
    72547328    if (aNotify)
     
    72737347            if (serialPorts [slot])
    72747348                that->onSerialPortChange (serialPorts [slot]);
     7349        for (ULONG slot = 0; slot < ELEMENTS (parallelPorts); slot ++)
     7350            if (parallelPorts [slot])
     7351                that->onParallelPortChange (parallelPorts [slot]);
    72757352    }
    72767353}
     
    73217398    for (ULONG slot = 0; slot < ELEMENTS (mSerialPorts); slot ++)
    73227399        mSerialPorts [slot]->commit();
     7400    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot ++)
     7401        mParallelPorts [slot]->commit();
    73237402
    73247403    if (mType == IsSessionMachine)
     
    73847463    for (ULONG slot = 0; slot < ELEMENTS (mSerialPorts); slot ++)
    73857464        mSerialPorts [slot]->copyFrom (aThat->mSerialPorts [slot]);
     7465    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot ++)
     7466        mParallelPorts [slot]->copyFrom (aThat->mParallelPorts [slot]);
    73867467}
    73877468
     
    75707651        mSerialPorts [slot]->init (this, aMachine->mSerialPorts [slot]);
    75717652    }
     7653    /* create a list of parallel ports that will be mutable */
     7654    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot ++)
     7655    {
     7656        unconst (mParallelPorts [slot]).createObject();
     7657        mParallelPorts [slot]->init (this, aMachine->mParallelPorts [slot]);
     7658    }
    75727659    /* create another USB controller object that will be mutable */
    75737660    unconst (mUSBController).createObject();
     
    87368823 *  @note Locks this object for reading.
    87378824 */
     8825HRESULT SessionMachine::onParallelPortChange(IParallelPort *parallelPort)
     8826{
     8827    LogFlowThisFunc (("\n"));
     8828
     8829    AutoCaller autoCaller (this);
     8830    AssertComRCReturn (autoCaller.rc(), autoCaller.rc());
     8831
     8832    ComPtr <IInternalSessionControl> directControl;
     8833    {
     8834        AutoReaderLock alock (this);
     8835        directControl = mData->mSession.mDirectControl;
     8836    }
     8837
     8838    /* ignore notifications sent after #OnSessionEnd() is called */
     8839    if (!directControl)
     8840        return S_OK;
     8841
     8842    return directControl->OnParallelPortChange(parallelPort);
     8843}
     8844
     8845/**
     8846 *  @note Locks this object for reading.
     8847 */
    87388848HRESULT SessionMachine::onVRDPServerChange()
    87398849{
     
    1005510165    }
    1005610166
     10167    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot ++)
     10168    {
     10169        unconst (mParallelPorts [slot]).createObject();
     10170        mParallelPorts [slot]->initCopy (this, mPeer->mParallelPorts [slot]);
     10171    }
     10172
    1005710173    /* Confirm a successful initialization when it's the case */
    1005810174    autoInitSpan.setSucceeded();
     
    1014510261    }
    1014610262
     10263    for (ULONG slot = 0; slot < ELEMENTS (mParallelPorts); slot ++)
     10264    {
     10265        unconst (mParallelPorts [slot]).createObject();
     10266        mParallelPorts [slot]->init (this, slot);
     10267    }
     10268
    1014710269    /* load hardware and harddisk settings */
    1014810270
  • trunk/src/VBox/Main/Makefile.kmk

    r3494 r3652  
    182182        NetworkAdapterImpl.cpp \
    183183        SerialPortImpl.cpp \
     184        ParallelPortImpl.cpp \
    184185        USBControllerImpl.cpp \
    185186        AudioAdapterImpl.cpp \
  • trunk/src/VBox/Main/SessionImpl.cpp

    r3497 r3652  
    551551
    552552    return mConsole->onSerialPortChange(serialPort);
     553}
     554
     555STDMETHODIMP Session::OnParallelPortChange(IParallelPort *parallelPort)
     556{
     557    LogFlowThisFunc (("\n"));
     558
     559    AutoCaller autoCaller (this);
     560    AssertComRCReturn (autoCaller.rc(), autoCaller.rc());
     561
     562    AutoReaderLock alock (this);
     563    AssertReturn (mState == SessionState_SessionOpen &&
     564                  mType == SessionType_DirectSession, E_FAIL);
     565
     566    return mConsole->onParallelPortChange(parallelPort);
    553567}
    554568
  • trunk/src/VBox/Main/SystemPropertiesImpl.cpp

    r3494 r3652  
    202202}
    203203
     204STDMETHODIMP SystemProperties::COMGETTER(ParallelPortCount)(ULONG *count)
     205{
     206    if (!count)
     207        return E_POINTER;
     208    AutoLock lock (this);
     209    CHECK_READY();
     210
     211    *count = SchemaDefs::ParallelPortCount;
     212
     213    return S_OK;
     214}
     215
    204216STDMETHODIMP SystemProperties::COMGETTER(MaxBootPosition)(ULONG *aMaxBootPosition)
    205217{
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r3611 r3652  
    16551655    <method name="detachUSBDevice">
    16561656      <desc>
    1657         Notification that a VM is going to detach (done = false) or has 
     1657        Notification that a VM is going to detach (done = false) or has
    16581658        already detached (done = true) the given USB device.
    16591659        When the done = true request is completed, the VM process will
     
    16611661        notification.
    16621662        <note>
    1663           In the done = true case, the server must run its own filters 
    1664           and filters of all VMs but this one on the detached device 
     1663          In the done = true case, the server must run its own filters
     1664          and filters of all VMs but this one on the detached device
    16651665          as if it were just attached to the host computer.
    16661666        </note>
     
    16821682      <desc>
    16831683        Notification that a VM that is being powered down. The done
    1684         parameter indicates whether which stage of the power down 
    1685         we're at. When done = false the VM is announcing its 
    1686         intentions, while when done = true the VM is reporting 
     1684        parameter indicates whether which stage of the power down
     1685        we're at. When done = false the VM is announcing its
     1686        intentions, while when done = true the VM is reporting
    16871687        what it has done.
    16881688        <note>
    1689           In the done = true case, the server must run its own filters 
    1690           and filters of all VMs but this one on all detach devices as 
     1689          In the done = true case, the server must run its own filters
     1690          and filters of all VMs but this one on all detach devices as
    16911691          if they were just attached to the host computer.
    16921692        </note>
     
    19001900  <interface
    19011901     name="IMachine" extends="$unknown"
    1902      uuid="0332de0e-ce75-461f-8c6f-0fa42616404a"
     1902     uuid="31f7169f-14da-4c55-8cb6-a3665186e35e"
    19031903     wsmap="managed"
    19041904     >
     
    24562456    </method>
    24572457
     2458    <method name="getParallelPort" const="yes">
     2459      <desc>
     2460        Returns the parallel port associated with the given slot.
     2461        Slots are numbered sequentially, starting with zero. The total
     2462        number of parallel ports per every machine is defined by the
     2463        <link to="ISystemProperties::parallelPortCount"/> property,
     2464        so the maximum slot number is one less than that property's value.
     2465      </desc>
     2466      <param name="slot" type="unsigned long" dir="in"/>
     2467      <param name="port" type="IParallelPort" dir="return"/>
     2468    </method>
     2469
    24582470    <method name="getNextExtraDataKey">
    24592471      <desc>
     
    39283940     name="ISystemProperties"
    39293941     extends="$unknown"
    3930      uuid="6dc28c62-7924-43de-8336-fa754aa531d7"
     3942     uuid="12c2e31e-247f-4d51-82e5-5b9d4a6c7d5b"
    39313943     wsmap="struct"
    39323944     >
     
    39723984      <desc>
    39733985        Number of serial ports associated with every
     3986        <link to="IMachine"/> instance.
     3987      </desc>
     3988    </attribute>
     3989
     3990    <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
     3991      <desc>
     3992        Number of parallel ports associated with every
    39743993        <link to="IMachine"/> instance.
    39753994      </desc>
     
    67856804     wsmap="managed"
    67866805     >
    6787  
     6806
    67886807     <attribute name="slot" type="unsigned long" readonly="yes">
    67896808      <desc>
     
    68156834    <attribute name="server" type="boolean">
    68166835      <desc>Flag whether this serial port acts as a server or a client.</desc>
     6836    </attribute>
     6837
     6838  </interface>
     6839
     6840  <!--
     6841  // IParallelPort
     6842  /////////////////////////////////////////////////////////////////////////
     6843  -->
     6844
     6845  <interface
     6846     name="IParallelPort" extends="$unknown"
     6847     uuid="6d7f2385-8ce3-4342-a042-61fa1882354b"
     6848     wsmap="managed"
     6849     >
     6850
     6851     <attribute name="slot" type="unsigned long" readonly="yes">
     6852      <desc>
     6853        Slot number this parallel port is plugged into. Corresponds to
     6854        the value you pass to <link to="IMachine::getParallelPort"/>
     6855        to obtain this instance.
     6856      </desc>
     6857    </attribute>
     6858
     6859    <attribute name="enabled" type="boolean">
     6860      <desc>
     6861        Flag whether the parallel port is enabled. If it is disabled,
     6862        the parallel port will not be reported to the guest.
     6863      </desc>
     6864    </attribute>
     6865
     6866    <attribute name="IOBase" type="unsigned long">
     6867      <desc>Gets the I/O base of the parallel port.</desc>
     6868    </attribute>
     6869
     6870    <attribute name="IRQ" type="unsigned long">
     6871      <desc>Gets the IRQ of the parallel port.</desc>
     6872    </attribute>
     6873
     6874    <attribute name="DevicePath" type="wstring">
     6875      <desc>Gets the of the device path connected to the parallel port.</desc>
    68176876    </attribute>
    68186877
     
    77947853    </method>
    77957854
     7855    <method name="onParallelPortChange">
     7856      <desc>
     7857        Triggered when settings of a parallel port of the
     7858        associated virtual machine have changed.
     7859      </desc>
     7860      <param name="parallelPort" type="IParallelPort" dir="in"/>
     7861    </method>
     7862
    77967863    <method name="onVRDPServerChange">
    77977864      <desc>
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r3566 r3652  
    173173    HRESULT onNetworkAdapterChange(INetworkAdapter *networkAdapter);
    174174    HRESULT onSerialPortChange(ISerialPort *serialPort);
     175    HRESULT onParallelPortChange(IParallelPort *parallelPort);
    175176    HRESULT onVRDPServerChange();
    176177    HRESULT onUSBControllerChange();
  • trunk/src/VBox/Main/include/MachineImpl.h

    r3566 r3652  
    3535#include "AudioAdapterImpl.h"
    3636#include "SerialPortImpl.h"
     37#include "ParallelPortImpl.h"
    3738#include "BIOSSettingsImpl.h"
    3839
     
    482483    STDMETHOD(DetachHardDisk) (DiskControllerType_T aCtl, LONG aDev);
    483484    STDMETHOD(GetSerialPort) (ULONG slot, ISerialPort **port);
     485    STDMETHOD(GetParallelPort) (ULONG slot, IParallelPort **port);
    484486    STDMETHOD(GetNetworkAdapter) (ULONG slot, INetworkAdapter **adapter);
    485487    STDMETHOD(GetNextExtraDataKey)(INPTR BSTR aKey, BSTR *aNextKey, BSTR *aNextValue);
     
    529531    virtual HRESULT onNetworkAdapterChange(INetworkAdapter *networkAdapter) { return S_OK; }
    530532    virtual HRESULT onSerialPortChange(ISerialPort *serialPort) { return S_OK; }
     533    virtual HRESULT onParallelPortChange(IParallelPort *ParallelPort) { return S_OK; }
    531534    virtual HRESULT onVRDPServerChange() { return S_OK; }
    532535    virtual HRESULT onUSBControllerChange() { return S_OK; }
     
    680683    const ComObjPtr <SerialPort>
    681684        mSerialPorts [SchemaDefs::SerialPortCount];
     685    const ComObjPtr <ParallelPort>
     686        mParallelPorts [SchemaDefs::ParallelPortCount];
    682687    const ComObjPtr <AudioAdapter> mAudioAdapter;
    683688    const ComObjPtr <USBController> mUSBController;
     
    771776    HRESULT onNetworkAdapterChange(INetworkAdapter *networkAdapter);
    772777    HRESULT onSerialPortChange(ISerialPort *serialPort);
     778    HRESULT onParallelPortChange(IParallelPort *parallelPort);
    773779    HRESULT onVRDPServerChange();
    774780    HRESULT onUSBControllerChange();
  • trunk/src/VBox/Main/include/SessionImpl.h

    r3494 r3652  
    9999    STDMETHOD(OnNetworkAdapterChange)(INetworkAdapter *networkAdapter);
    100100    STDMETHOD(OnSerialPortChange)(ISerialPort *serialPort);
     101    STDMETHOD(OnParallelPortChange)(IParallelPort *parallelPort);
    101102    STDMETHOD(OnVRDPServerChange)();
    102103    STDMETHOD(OnUSBControllerChange)();
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r3494 r3652  
    6464    STDMETHOD(COMGETTER(NetworkAdapterCount)(ULONG *count));
    6565    STDMETHOD(COMGETTER(SerialPortCount)(ULONG *count));
     66    STDMETHOD(COMGETTER(ParallelPortCount)(ULONG *count));
    6667    STDMETHOD(COMGETTER(MaxBootPosition)(ULONG *aMaxBootPosition));
    6768    STDMETHOD(COMGETTER(DefaultVDIFolder)) (BSTR *aDefaultVDIFolder);
  • trunk/src/VBox/Main/linux/server.cpp

    r3494 r3652  
    9898#include <NetworkAdapterImpl.h>
    9999#include <SerialPortImpl.h>
     100#include <ParallelPortImpl.h>
    100101#include <USBControllerImpl.h>
    101102#include <USBDeviceImpl.h>
     
    155156NS_DECL_CLASSINFO(SerialPort)
    156157NS_IMPL_THREADSAFE_ISUPPORTS1_CI(SerialPort, ISerialPort)
     158NS_DECL_CLASSINFO(ParallelPort)
     159NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ParallelPort, IParallelPort)
    157160NS_DECL_CLASSINFO(USBController)
    158161NS_IMPL_THREADSAFE_ISUPPORTS1_CI(USBController, IUSBController)
  • trunk/src/VBox/Main/xml/SchemaDefs.xsl

    r3494 r3652  
    143143  </xsl:call-template>
    144144  <xsl:call-template name="defineEnumMember">
     145      <xsl:with-param name="member" select="'        ParallelPortCount'"/>
     146      <xsl:with-param name="select" select="
     147        xsd:complexType[@name='TLptPort']/xsd:attribute[@name='slot']//xsd:maxExclusive/@value
     148      "/>
     149  </xsl:call-template>
     150  <xsl:call-template name="defineEnumMember">
    145151      <xsl:with-param name="member" select="'        MaxBootPosition'"/>
    146152      <xsl:with-param name="select" select="
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r3494 r3652  
    544544</xsd:complexType>
    545545
     546<xsd:complexType name="TLptPort">
     547  <xsd:attribute name="slot" use="required">
     548    <xsd:simpleType>
     549      <xsd:restriction base="xsd:unsignedInt">
     550        <xsd:minInclusive value="0"/>
     551        <xsd:maxExclusive value="2"/>
     552      </xsd:restriction>
     553    </xsd:simpleType>
     554  </xsd:attribute>
     555  <xsd:attribute name="enabled" type="xsd:boolean" use="required"/>
     556  <xsd:attribute name="IRQ" type="xsd:unsignedInt" default="4"/>
     557  <xsd:attribute name="IOBase" type="xsd:unsignedInt" default="888"/>
     558  <xsd:attribute name="DevicePath" type="TLocalFile"/>
     559</xsd:complexType>
     560
     561<xsd:complexType name="TLpt">
     562  <xsd:sequence>
     563    <xsd:element name="Port" minOccurs="0" maxOccurs="unbounded">
     564      <xsd:complexType>
     565        <xsd:complexContent>
     566          <xsd:extension base="TLptPort">
     567          </xsd:extension>
     568        </xsd:complexContent>
     569      </xsd:complexType>
     570    </xsd:element>
     571  </xsd:sequence>
     572</xsd:complexType>
     573
    546574<xsd:complexType name="TSharedFolder">
    547575  <xsd:attribute name="name" type="TNonEmptyString" use="required"/>
     
    583611    <xsd:element name="Uart" type="TUart" minOccurs="0">
    584612      <xsd:unique name="THardware-Uart-Port">
     613        <xsd:selector xpath="vb:Port"/>
     614        <xsd:field xpath="@slot"/>
     615      </xsd:unique>
     616    </xsd:element>
     617    <xsd:element name="Lpt" type="TLpt" minOccurs="0">
     618      <xsd:unique name="THardware-Lpt-Port">
    585619        <xsd:selector xpath="vb:Port"/>
    586620        <xsd:field xpath="@slot"/>
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