VirtualBox

Changeset 23643 in vbox


Ignore:
Timestamp:
Oct 9, 2009 12:23:32 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53341
Message:

VRDP port range API.

Location:
trunk
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/settings.h

    r23600 r23643  
    234234    VRDPSettings()
    235235        : fEnabled(true),
    236           ulPort(0),
    237236          authType(VRDPAuthType_Null),
    238237          ulAuthTimeout(5000),
     
    242241
    243242    bool            fEnabled;
    244     uint32_t        ulPort;
     243    com::Utf8Str    strPort;
    245244    com::Utf8Str    strNetAddress;
    246245    VRDPAuthType_T  authType;
  • trunk/include/VBox/vrdpapi.h

    r22663 r23643  
    571571#define VRDP_QI_ENCRYPTION_STYLE       (13)
    572572
     573/** TCP port where the server listens.
     574 *  Values: 0 - VRDP server failed to start.
     575 *          -1 - .
     576 * int32_t.
     577 */
     578#define VRDP_QI_PORT                   (14)
     579
    573580
    574581/** Hints what has been intercepted by the application. */
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r23223 r23643  
    199199    }
    200200
     201    STDMETHOD(OnRemoteDisplayInfoChange)()
     202    {
     203#ifdef VBOX_WITH_VRDP
     204        if (gConsole)
     205        {
     206            ComPtr<IRemoteDisplayInfo> info;
     207            gConsole->COMGETTER(RemoteDisplayInfo)(info.asOutParam());
     208            if (info)
     209            {
     210                LONG port;
     211                info->COMGETTER(Port)(&port);
     212                if (port != 0)
     213                    RTPrintf("Listening on port %d\n", port);
     214                else
     215                    RTPrintf("VRDP server failed to start\n");
     216            }
     217        }
     218#endif
     219        return S_OK;
     220    }
     221
    201222    STDMETHOD(OnUSBControllerChange)()
    202223    {
     
    398419{
    399420#ifdef VBOX_WITH_VRDP
    400     ULONG vrdpPort = ~0U;
     421    const char *vrdpPort = NULL;
    401422    const char *vrdpAddress = NULL;
    402423    const char *vrdpEnabled = NULL;
     
    505526#ifdef VBOX_WITH_VRDP
    506527            case 'p':
    507                 vrdpPort = ValueUnion.u32;
     528                vrdpPort = ValueUnion.psz;
    508529                break;
    509530            case 'a':
     
    850871
    851872            /* set VRDP port if requested by the user */
    852             if (vrdpPort != ~0U)
    853                 CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Port)(vrdpPort));
    854             else
    855                 CHECK_ERROR_BREAK(vrdpServer, COMGETTER(Port)(&vrdpPort));
     873            if (vrdpPort != NULL)
     874            {
     875                Bstr bstr = vrdpPort;
     876                CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Ports)(bstr));
     877            }
    856878            /* set VRDP address if requested by the user */
    857879            if (vrdpAddress != NULL)
     
    875897#endif
    876898        Log (("VBoxHeadless: Powering up the machine...\n"));
    877 #ifdef VBOX_WITH_VRDP
    878         if (fVRDPEnable)
    879             RTPrintf("Listening on port %d\n", !vrdpPort ? VRDP_DEFAULT_PORT : vrdpPort);
    880 #endif
    881899
    882900        ComPtr <IProgress> progress;
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r23287 r23643  
    10181018            if (vrdpServer)
    10191019            {
    1020                 uint16_t vrdpport;
     1020                Bstr vrdpports;
    10211021
    10221022                if (!strcmp(a->argv[2], "default"))
    1023                 {
    1024                     vrdpport = 0;
    1025                 }
     1023                    vrdpports = "0";
    10261024                else
    1027                 {
    1028                     int vrc = RTStrToUInt16Full(a->argv[2], 0, &vrdpport);
    1029 
    1030                     if (vrc != VINF_SUCCESS)
    1031                     {
    1032                         vrdpport = UINT16_MAX;
    1033                     }
    1034                 }
    1035 
    1036                 if (vrdpport != UINT16_MAX)
    1037                 {
    1038                     CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Port)(vrdpport));
    1039                 }
    1040                 else
    1041                 {
    1042                     errorArgument("Invalid vrdp server port '%s'", Utf8Str(a->argv[2]).raw());
    1043                     rc = E_FAIL;
    1044                     break;
    1045                 }
     1025                    vrdpports = a->argv [2];
     1026
     1027                CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Ports)(vrdpports));
    10461028            }
    10471029        }
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r23561 r23643  
    989989        if (fEnabled)
    990990        {
    991             ULONG port;
    992             vrdpServer->COMGETTER(Port)(&port);
     991            LONG vrdpPort = -1;
     992            Bstr ports;
     993            vrdpServer->COMGETTER(Ports)(ports.asOutParam());
    993994            Bstr address;
    994995            vrdpServer->COMGETTER(NetAddress)(address.asOutParam());
     
    10151016                    break;
    10161017            }
     1018            if (console)
     1019            {
     1020                ComPtr<IRemoteDisplayInfo> remoteDisplayInfo;
     1021                CHECK_ERROR_RET(console, COMGETTER(RemoteDisplayInfo)(remoteDisplayInfo.asOutParam()), rc);
     1022                rc = remoteDisplayInfo->COMGETTER(Port)(&vrdpPort);
     1023                if (rc == E_ACCESSDENIED)
     1024                {
     1025                    vrdpPort = -1; /* VM not powered up */
     1026                }
     1027                if (FAILED(rc))
     1028                {
     1029                    com::ErrorInfo info (remoteDisplayInfo);
     1030                    GluePrintErrorInfo(info);
     1031                    return rc;
     1032                }
     1033            }
    10171034            if (details == VMINFO_MACHINEREADABLE)
    10181035            {
    10191036                RTPrintf("vrdp=\"on\"\n");
    1020                 RTPrintf("vrdpport=%d\n", port);
     1037                RTPrintf("vrdpport=%d\n", vrdpPort);
     1038                RTPrintf("vrdpports=\"%lS\"\n", ports.raw());
    10211039                RTPrintf("vrdpaddress=\"%lS\"\n", address.raw());
    10221040                RTPrintf("vrdpauthtype=\"%s\"\n", strAuthType);
     
    10281046                if (address.isEmpty())
    10291047                    address = "0.0.0.0";
    1030                 RTPrintf("VRDP:            enabled (Address %lS, Port %d, MultiConn: %s, ReuseSingleConn: %s, Authentication type: %s)\n", address.raw(), port, fMultiCon ? "on" : "off", fReuseCon ? "on" : "off", strAuthType);
     1048                RTPrintf("VRDP:            enabled (Address %lS, Ports %lS, MultiConn: %s, ReuseSingleConn: %s, Authentication type: %s)\n", address.raw(), ports.raw(), fMultiCon ? "on" : "off", fReuseCon ? "on" : "off", strAuthType);
     1049                if (console && vrdpPort != -1 && vrdpPort != 0)
     1050                   RTPrintf("VRDP port:       %d\n", vrdpPort);
    10311051            }
    10321052        }
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r23635 r23643  
    9393#ifdef VBOX_WITH_VRDP
    9494    char *vrdp = NULL;
    95     uint16_t vrdpport = UINT16_MAX;
     95    char *vrdpport = NULL;
    9696    char *vrdpaddress = NULL;
    9797    char *vrdpauthtype = NULL;
     
    609609            i++;
    610610            if (!strcmp(a->argv[i], "default"))
    611                 vrdpport = 0;
    612             else
    613                 vrdpport = RTStrToUInt16(a->argv[i]);
     611                vrdpport = "0";
     612            else
     613                vrdpport = a->argv[i];
    614614        }
    615615        else if (   !strcmp(a->argv[i], "--vrdpaddress")
     
    18121812
    18131813#ifdef VBOX_WITH_VRDP
    1814         if (vrdp || (vrdpport != UINT16_MAX) || vrdpaddress || vrdpauthtype || vrdpmulticon || vrdpreusecon)
     1814        if (vrdp || vrdpport || vrdpaddress || vrdpauthtype || vrdpmulticon || vrdpreusecon)
    18151815        {
    18161816            ComPtr<IVRDPServer> vrdpServer;
     
    18361836                    }
    18371837                }
    1838                 if (vrdpport != UINT16_MAX)
    1839                 {
    1840                     CHECK_ERROR(vrdpServer, COMSETTER(Port)(vrdpport));
     1838                if (vrdpport)
     1839                {
     1840                    CHECK_ERROR(vrdpServer, COMSETTER(Ports)(Bstr(vrdpport)));
    18411841                }
    18421842                if (vrdpaddress)
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r23249 r23643  
    509509
    510510    STDMETHOD(OnVRDPServerChange)()
     511    {
     512        return S_OK;
     513    }
     514
     515    STDMETHOD(OnRemoteDisplayInfoChange)()
    511516    {
    512517        return S_OK;
     
    865870    char *fdaFile   = NULL;
    866871#ifdef VBOX_WITH_VRDP
    867     int portVRDP = ~0;
     872    char *portVRDP = NULL;
    868873#endif
    869874    bool fDiscardState = false;
     
    12731278        {
    12741279            // start with the standard VRDP port
    1275             portVRDP = 0;
     1280            portVRDP = "0";
    12761281
    12771282            // is there another argument
    12781283            if (argc > (curArg + 1))
    12791284            {
    1280                 // check if the next argument is a number
    1281                 int port = atoi(argv[curArg + 1]);
    1282                 if (port > 0)
    1283                 {
    1284                     curArg++;
    1285                     portVRDP = port;
    1286                     LogFlow(("Using non standard VRDP port %d\n", portVRDP));
    1287                 }
     1285                curArg++;
     1286                portVRDP = argv[curArg];
     1287                LogFlow(("Using non standard VRDP port %s\n", portVRDP));
    12881288            }
    12891289        }
     
    18381838
    18391839#ifdef VBOX_WITH_VRDP
    1840     if (portVRDP != ~0)
     1840    if (portVRDP)
    18411841    {
    18421842        rc = gMachine->COMGETTER(VRDPServer)(gVrdpServer.asOutParam());
     
    18471847            if (portVRDP > 0)
    18481848            {
    1849                 rc = gVrdpServer->COMSETTER(Port)(portVRDP);
     1849                Bstr bstr = portVRDP;
     1850                rc = gVrdpServer->COMSETTER(Ports)(bstr);
    18501851                if (rc != S_OK)
    18511852                {
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r23223 r23643  
    564564
    565565    STDMETHOD(OnVRDPServerChange)()
     566    {
     567        return S_OK;
     568    }
     569
     570    STDMETHOD(OnRemoteDisplayInfoChange)()
    566571    {
    567572        return S_OK;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r23588 r23643  
    16961696                item += QString (sSectionItemTpl2)
    16971697                        .arg (tr ("Remote Display Server Port", "details report (VRDP Server)"))
    1698                         .arg (srv.GetPort());
     1698                        .arg (srv.GetPorts());
    16991699            else
    17001700                item += QString (sSectionItemTpl2)
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp

    r23493 r23643  
    463463        else
    464464            osType = vboxGlobal().vmGuestOSTypeDescription (osType);
     465        int vrdpPort = console.GetRemoteDisplayInfo().GetPort();
     466        QString vrdpInfo = (vrdpPort == 0 || vrdpPort == -1)?
     467            tr ("Not Available", "details report (VRDP server port)") :
     468            QString ("%1").arg (vrdpPort);
    465469
    466470        /* Searching for longest string */
    467471        QStringList valuesList;
    468         valuesList << resolution << virtualization << nested << addVerisonStr << osType;
     472        valuesList << resolution << virtualization << nested << addVerisonStr << osType << vrdpInfo;
    469473        int maxLength = 0;
    470474        foreach (const QString &value, valuesList)
     
    478482        result += formatValue (tr ("Guest Additions"), addVerisonStr, maxLength);
    479483        result += formatValue (tr ("Guest OS Type"), osType, maxLength);
     484        result += formatValue (tr ("Remote Display Server Port"), vrdpInfo, maxLength);
    480485        result += paragraph;
    481486    }
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsDisplay.cpp

    r23590 r23643  
    5858    /* Setup validators */
    5959    mLeMemory->setValidator (new QIntValidator (MinVRAM, MaxVRAM, this));
    60     mLeVRDPPort->setValidator (new QIntValidator (0, 0xFFFF, this));
     60    mLeVRDPPort->setValidator (new QRegExpValidator (QRegExp ("(([0-9]{1,5}(\\-[0-9]{1,5}){0,1}),)*([0-9]{1,5}(\\-[0-9]{1,5}){0,1})"), this));
    6161    mLeVRDPTimeout->setValidator (new QIntValidator (this));
    6262
     
    123123    {
    124124        mCbVRDP->setChecked (vrdp.GetEnabled());
    125         mLeVRDPPort->setText (QString::number (vrdp.GetPort()));
     125        mLeVRDPPort->setText (vrdp.GetPorts());
    126126        mCbVRDPMethod->setCurrentIndex (mCbVRDPMethod->
    127127                                        findText (vboxGlobal().toString (vrdp.GetAuthType())));
     
    153153    {
    154154        vrdp.SetEnabled (mCbVRDP->isChecked());
    155         vrdp.SetPort (mLeVRDPPort->text().toULong());
     155        vrdp.SetPorts (mLeVRDPPort->text());
    156156        vrdp.SetAuthType (vboxGlobal().toVRDPAuthType (mCbVRDPMethod->currentText()));
    157157        vrdp.SetAuthTimeout (mLeVRDPTimeout->text().toULong());
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r23633 r23643  
    35853585
    35863586/**
     3587 * @note Locks this object for reading.
     3588 */
     3589void Console::onRemoteDisplayInfoChange()
     3590{
     3591    AutoCaller autoCaller(this);
     3592    AssertComRCReturnVoid(autoCaller.rc());
     3593
     3594    AutoReadLock alock(this);
     3595
     3596    CallbackList::iterator it = mCallbacks.begin();
     3597    while (it != mCallbacks.end())
     3598        (*it++)->OnRemoteDisplayInfoChange();
     3599}
     3600
     3601
     3602
     3603/**
    35873604 * Called by IInternalSessionControl::OnUSBControllerChange().
    35883605 *
     
    65816598        {
    65826599            Utf8Str errMsg;
    6583             ULONG port = 0;
    6584             console->mVRDPServer->COMGETTER(Port)(&port);
    6585             errMsg = Utf8StrFmt(tr("VRDP server port %d is already in use"),
    6586                                 port);
     6600            Bstr bstr;
     6601            console->mVRDPServer->COMGETTER(Ports)(bstr.asOutParam());
     6602            Utf8Str ports = bstr;
     6603            errMsg = Utf8StrFmt(tr("VRDP server can't bind to a port: %s"),
     6604                                ports.raw());
    65876605            LogRel(("Warning: failed to launch VRDP server (%Rrc): '%s'\n",
    65886606                    vrc, errMsg.raw()));
  • trunk/src/VBox/Main/ConsoleVRDPServer.cpp

    r23223 r23643  
    143143
    144144    STDMETHOD(OnVRDPServerChange)()
     145    {
     146        return S_OK;
     147    }
     148
     149    STDMETHOD(OnRemoteDisplayInfoChange)()
    145150    {
    146151        return S_OK;
     
    622627        case VRDP_QP_NETWORK_PORT:
    623628        {
     629            /* This is obsolete, the VRDP server uses VRDP_QP_NETWORK_PORT_RANGE instead. */
    624630            ULONG port = 0;
    625             server->mConsole->getVRDPServer ()->COMGETTER(Port) (&port);
    626             if (port == 0)
    627             {
    628                 port = VRDP_DEFAULT_PORT;
    629             }
    630631
    631632            if (cbBuffer >= sizeof (uint32_t))
     
    707708            com::Bstr bstr;
    708709            HRESULT hrc = server->mConsole->machine ()->GetExtraData(Bstr("VBoxInternal2/VRDPPortRange"), bstr.asOutParam());
     710            if (hrc != S_OK || bstr == "")
     711            {
     712                hrc = server->mConsole->getVRDPServer ()->COMGETTER(Ports) (bstr.asOutParam());
     713            }
    709714            if (hrc != S_OK)
    710715            {
    711716                bstr = "";
     717            }
     718
     719            if (bstr == "0")
     720            {
     721                bstr = "3389";
    712722            }
    713723
     
    758768
    759769            ULONG port = *(uint32_t *)pvBuffer;
     770           
     771            server->mVRDPBindPort = port;
    760772
    761773            com::Bstr bstr = Utf8StrFmt("%d", port);
     
    769781                *pcbOut = sizeof (uint32_t);
    770782            }
     783
     784            server->mConsole->onRemoteDisplayInfoChange ();
    771785        } break;
    772786
     
    11301144
    11311145    mConsole->machine ()->SetExtraData(Bstr("VBoxInternal2/VRDPPortRange"), Bstr(""));
     1146    mVRDPBindPort = -1;
    11321147#endif /* VBOX_WITH_VRDP */
    11331148
     
    20192034{
    20202035#ifdef VBOX_WITH_VRDP
    2021     if (mpEntryPoints && mhServer)
     2036    if (index == VRDP_QI_PORT)
     2037    {
     2038        uint32_t cbOut = sizeof (int32_t);
     2039
     2040        if (cbBuffer >= cbOut)
     2041        {
     2042            *pcbOut = cbOut;
     2043            *(int32_t *)pvBuffer = (int32_t)mVRDPBindPort;
     2044        }
     2045    }
     2046    else if (mpEntryPoints && mhServer)
    20222047    {
    20232048        mpEntryPoints->VRDPQueryInfo (mhServer, index, pvBuffer, cbBuffer, pcbOut);
     
    22422267
    22432268IMPL_GETTER_BOOL   (BOOL,    Active,             VRDP_QI_ACTIVE);
     2269IMPL_GETTER_SCALAR (LONG,    Port,               VRDP_QI_PORT);
    22442270IMPL_GETTER_SCALAR (ULONG,   NumberOfClients,    VRDP_QI_NUMBER_OF_CLIENTS);
    22452271IMPL_GETTER_SCALAR (LONG64,  BeginTime,          VRDP_QI_BEGIN_TIME);
  • trunk/src/VBox/Main/VirtualBoxCallbackImpl.cpp

    r23223 r23643  
    230230    return mConsoleCallback->OnParallelPortChange(aParallelPort);
    231231}
     232
     233STDMETHODIMP CallbackWrapper::OnRemoteDisplayInfoChange()
     234{
     235    if (mConsoleCallback.isNull())
     236        return S_OK;
     237
     238    return mConsoleCallback->OnRemoteDisplayInfoChange();
     239}
     240
    232241STDMETHODIMP CallbackWrapper::OnVRDPServerChange()
    233242{
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r23601 r23643  
    54415441  <interface
    54425442     name="IConsoleCallback" extends="$unknown"
    5443      uuid="db67f6e5-799d-474c-8452-b10d7736a412"
     5443     uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
    54445444     wsmap="suppress"
    54455445     >
     
    56255625        Interested callees should use IVRDPServer methods and attributes to
    56265626        find out what has changed.
     5627      </desc>
     5628    </method>
     5629
     5630    <method name="onRemoteDisplayInfoChange">
     5631      <desc>
     5632        Notification when the status of the VRDP server changes. Interested callees
     5633        should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
     5634        attributes to find out what is the current status.
    56275635      </desc>
    56285636    </method>
     
    58425850  <interface
    58435851     name="IRemoteDisplayInfo" extends="$unknown"
    5844      uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
     5852     uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
    58455853     wsmap="struct"
    58465854     >
     
    58535861      <desc>
    58545862        Whether the remote display connection is active.
     5863      </desc>
     5864    </attribute>
     5865
     5866    <attribute name="port" type="long" readonly="yes">
     5867      <desc>
     5868        VRDP server port number. If this property is equal to <tt>0</tt>, then
     5869        the VRDP server failed to start, usually because there are no free TCP
     5870        ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
     5871        server has not yet been started.
    58555872      </desc>
    58565873    </attribute>
     
    1178911806  <interface
    1179011807     name="IVRDPServer" extends="$unknown"
    11791      uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
     11808     uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
    1179211809     wsmap="managed"
    1179311810     >
     
    1179611813    </attribute>
    1179711814
    11798     <attribute name="port" type="unsigned long">
    11799       <desc>
    11800         VRDP server port number.
     11815    <attribute name="ports" type="wstring">
     11816      <desc>
     11817        VRDP server port numbers.
    1180111818        <note>
    11802           Setting the value of this property to <tt>0</tt> will reset the port
    11803           number to the default value which is
    11804           currently <tt>3389</tt>. Reading this property will always return a
    11805           real port number, even after it has been set to <tt>0</tt> (in which
    11806           case the default port is returned).
     11819          This is a string of comma separated TCP port numbers or port number ranges.
     11820          The server will try to bind to one of ports from the list. Example
     11821          <tt>3000,3010-3012,3015</tt>
    1180711822        </note>
    1180811823      </desc>
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r23633 r23643  
    214214    void onRuntimeError (BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage);
    215215    HRESULT onShowWindow (BOOL aCheck, BOOL *aCanShow, ULONG64 *aWinId);
     216    void onRemoteDisplayInfoChange();
    216217
    217218    static const PDMDRVREG DrvStatusReg;
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r23223 r23643  
    185185
    186186    VRDPInputSynch m_InputSynch;
     187
     188    int32_t mVRDPBindPort;
    187189#endif /* VBOX_WITH_VRDP */
    188190
     
    264266    #define DECL_GETTER(_aType, _aName) STDMETHOD(COMGETTER(_aName)) (_aType *a##_aName)
    265267        DECL_GETTER (BOOL,    Active);
     268        DECL_GETTER (LONG,    Port);
    266269        DECL_GETTER (ULONG,   NumberOfClients);
    267270        DECL_GETTER (LONG64,  BeginTime);
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r23223 r23643  
    198198    }
    199199
     200    STDMETHOD(OnRemoteDisplayInfoChange)()
     201    {
     202        return S_OK;
     203    }
     204
    200205    STDMETHOD(OnUSBControllerChange)()
    201206    {
  • trunk/src/VBox/Main/include/VRDPServerImpl.h

    r23223 r23643  
    5050            return this == &that ||
    5151                   (mEnabled == that.mEnabled &&
    52                     mVRDPPort == that.mVRDPPort &&
     52                    mVRDPPorts == that.mVRDPPorts &&
    5353                    mVRDPAddress == that.mVRDPAddress &&
    5454                    mAuthType == that.mAuthType &&
     
    5959
    6060        BOOL mEnabled;
    61         ULONG mVRDPPort;
     61        Bstr mVRDPPorts;
    6262        Bstr mVRDPAddress;
    6363        VRDPAuthType_T mAuthType;
     
    9393    STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
    9494    STDMETHOD(COMSETTER(Enabled)) (BOOL aEnable);
    95     STDMETHOD(COMGETTER(Port)) (ULONG *aPort);
    96     STDMETHOD(COMSETTER(Port)) (ULONG aPort);
     95    STDMETHOD(COMGETTER(Ports)) (BSTR *aPorts);
     96    STDMETHOD(COMSETTER(Ports)) (IN_BSTR aPorts);
    9797    STDMETHOD(COMGETTER(NetAddress)) (BSTR *aAddress);
    9898    STDMETHOD(COMSETTER(NetAddress)) (IN_BSTR aAddress);
  • trunk/src/VBox/Main/include/VirtualBoxCallbackImpl.h

    r23223 r23643  
    8787    STDMETHOD(OnParallelPortChange) (IParallelPort *aParallelPort);
    8888    STDMETHOD(OnVRDPServerChange)();
     89    STDMETHOD(OnRemoteDisplayInfoChange)();
    8990    STDMETHOD(OnUSBControllerChange)();
    9091    STDMETHOD(OnUSBDeviceStateChange) (IUSBDevice *aDevice, BOOL aAttached,
  • trunk/src/VBox/Main/xml/Settings.cpp

    r23600 r23643  
    15451545        {
    15461546            pelmHwChild->getAttributeValue("enabled", hw.vrdpSettings.fEnabled);
    1547             pelmHwChild->getAttributeValue("port", hw.vrdpSettings.ulPort);
     1547            pelmHwChild->getAttributeValue("port", hw.vrdpSettings.strPort);
    15481548            pelmHwChild->getAttributeValue("netAddress", hw.vrdpSettings.strNetAddress);
    15491549
     
    23572357    xml::ElementNode *pelmVRDP = pelmHardware->createChild("RemoteDisplay");
    23582358    pelmVRDP->setAttribute("enabled", hw.vrdpSettings.fEnabled);
    2359     pelmVRDP->setAttribute("port", hw.vrdpSettings.ulPort);
     2359    pelmVRDP->setAttribute("port", hw.vrdpSettings.strPort);
    23602360    if (hw.vrdpSettings.strNetAddress.length())
    23612361        pelmVRDP->setAttribute("netAddress", hw.vrdpSettings.strNetAddress);
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r23465 r23643  
    506506<xsd:complexType name="TRemoteDisplay">
    507507  <xsd:attribute name="enabled" type="xsd:boolean" use="required"/>
    508   <xsd:attribute name="port" type="xsd:unsignedInt" default="0"/>
     508  <xsd:attribute name="port" type="xsd:token" default="0"/>
    509509  <xsd:attribute name="netAddress" type="xsd:token" default=""/>
    510510  <xsd:attribute name="authType" type="TVRDPAuthType" default="Null"/>
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