VirtualBox

Changeset 37352 in vbox


Ignore:
Timestamp:
Jun 7, 2011 1:48:44 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72116
Message:

HostServices/GuestCtrl: Simplified host/guest command handling.

File:
1 edited

Legend:

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

    r36872 r37352  
    55
    66/*
    7  * Copyright (C) 2010 Oracle Corporation
     7 * Copyright (C) 2011 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    883883
    884884            /*
    885              * The guest notifies the host that some output at stdout/stderr is available.
     885             * For all other regular commands we call our notifyHost
     886             * function. If the current command does not support notifications
     887             * notifyHost will return VERR_NOT_SUPPORTED.
    886888             */
    887             case GUEST_EXEC_SEND_OUTPUT:
    888                 LogFlowFunc(("GUEST_EXEC_SEND_OUTPUT\n"));
     889            default:
    889890                rc = notifyHost(eFunction, cParms, paParms);
    890                 break;
    891 
    892             /*
    893              * The guest notifies the host of the executed process status.
    894              */
    895             case GUEST_EXEC_SEND_STATUS:
    896                 LogFlowFunc(("GUEST_EXEC_SEND_STATUS\n"));
    897                 rc = notifyHost(eFunction, cParms, paParms);
    898                 break;
    899 
    900             case GUEST_EXEC_SEND_INPUT_STATUS:
    901                 LogFlowFunc(("GUEST_EXEC_SEND_INPUT_STATUS\n"));
    902                 rc = notifyHost(eFunction, cParms, paParms);
    903                 break;
    904 
    905             default:
    906                 rc = VERR_NOT_SUPPORTED;
    907891                break;
    908892        }
     
    928912int Service::hostCall(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
    929913{
    930     int rc = VINF_SUCCESS;
     914    int rc = VERR_NOT_SUPPORTED;
    931915    LogFlowFunc(("fn = %d, cParms = %d, pparms = %d\n",
    932916                 eFunction, cParms, paParms));
    933917    try
    934918    {
    935         switch (eFunction)
    936         {
    937             case HOST_CANCEL_PENDING_WAITS:
    938                 LogFlowFunc(("HOST_CANCEL_PENDING_WAITS\n"));
    939                 rc = processHostCmd(eFunction, cParms, paParms);
    940                 break;
    941 
    942             /* The host wants to execute something. */
    943             case HOST_EXEC_CMD:
    944                 LogFlowFunc(("HOST_EXEC_CMD\n"));
    945                 rc = processHostCmd(eFunction, cParms, paParms);
    946                 break;
    947 
    948             /* The host wants to send something to the
    949              * started process' stdin pipe. */
    950             case HOST_EXEC_SET_INPUT:
    951                 LogFlowFunc(("HOST_EXEC_SET_INPUT\n"));
    952                 rc = processHostCmd(eFunction, cParms, paParms);
    953                 break;
    954 
    955             case HOST_EXEC_GET_OUTPUT:
    956                 LogFlowFunc(("HOST_EXEC_GET_OUTPUT\n"));
    957                 rc = processHostCmd(eFunction, cParms, paParms);
    958                 break;
    959 
    960             default:
    961                 rc = VERR_NOT_SUPPORTED;
    962                 break;
    963         }
     919        rc = processHostCmd(eFunction, cParms, paParms);
    964920    }
    965921    catch (std::bad_alloc)
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