VirtualBox

Changeset 33064 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Oct 12, 2010 1:20:50 PM (14 years ago)
Author:
vboxsync
Message:

Guest Execution/Copy: Added support for input handling, added more code for data copying.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestControl/service.cpp

    r30681 r33064  
    389389    if (cParms != pBuf->uParmCount)
    390390    {
     391        LogFlowFunc(("Parameter count does not match (%u (buffer), %u (guest))\n",
     392                     pBuf->uParmCount, cParms));
    391393        rc = VERR_INVALID_PARAMETER;
    392394    }
     
    583585            if (it->mNumParms >= 2)
    584586            {
    585                 it->mParms[0].setUInt32(GETHOSTMSG_EXEC_HOST_CANCEL_WAIT); /* Message ID. */
    586                 it->mParms[1].setUInt32(0);                                /* Required parameters for message. */
     587                it->mParms[0].setUInt32(HOST_CANCEL_PENDING_WAITS); /* Message ID. */
     588                it->mParms[1].setUInt32(0);                         /* Required parameters for message. */
    587589            }
    588590            if (mpHelpers)
     
    628630        paParms[3].getUInt32(&data.u32Flags);
    629631        paParms[4].getPointer(&data.pvData, &data.cbData);
     632
     633        if (mpfnHostCallback)
     634            rc = mpfnHostCallback(mpvHostData, eFunction,
     635                                  (void *)(&data), sizeof(data));
     636    }
     637    else if (   eFunction == GUEST_EXEC_SEND_INPUT_STATUS
     638             && cParms    == 4)
     639    {
     640        CALLBACKDATAEXECINSTATUS data;
     641        data.hdr.u32Magic = CALLBACKDATAMAGICEXECINSTATUS;
     642        paParms[0].getUInt32(&data.hdr.u32ContextID);
     643
     644        paParms[1].getUInt32(&data.u32PID);
     645        paParms[2].getUInt32(&data.u32Flags);
     646        paParms[3].getUInt32(&data.cbProcessed);
    630647
    631648        if (mpfnHostCallback)
     
    745762
    746763            /*
    747              * The guest notifies the host of the current client status.
     764             * The guest notifies the host of the executed process status.
    748765             */
    749766            case GUEST_EXEC_SEND_STATUS:
    750                 LogFlowFunc(("SEND_STATUS\n"));
     767                LogFlowFunc(("GUEST_EXEC_SEND_STATUS\n"));
     768                rc = notifyHost(eFunction, cParms, paParms);
     769                break;
     770
     771            case GUEST_EXEC_SEND_INPUT_STATUS:
     772                LogFlowFunc(("GUEST_EXEC_SEND_INPUT_STATUS\n"));
    751773                rc = notifyHost(eFunction, cParms, paParms);
    752774                break;
     
    790812                break;
    791813
    792             /* The host wants to send something to the guest's stdin pipe. */
     814            /* The host wants to send something to the
     815             * started process' stdin pipe. */
    793816            case HOST_EXEC_SET_INPUT:
    794817                LogFlowFunc(("HOST_EXEC_SET_INPUT\n"));
     818                rc = processHostCmd(eFunction, cParms, paParms);
    795819                break;
    796820
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