VirtualBox

Ignore:
Timestamp:
Feb 10, 2023 3:10:50 PM (2 years ago)
Author:
vboxsync
Message:

Guest Control: Initial commit (work in progress, disabled by default). bugref:9783

IGuestDirectory:

Added new attributes id + status + an own event source. Also added for rewind support via rewind().

New event types for guest directory [un]registration, state changes and entry reads.

Location:
trunk/src/VBox/HostServices/GuestControl
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestControl/Makefile.kmk

    r98133 r98526  
    3939VBoxGuestControlSvc_NAME.os2  = VBoxGCTL
    4040VBoxGuestControlSvc_DEFS      = VBOX_WITH_HGCM
     41ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS
     42 VBoxGuestControlSvc_DEFS    += VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS
     43endif
    4144VBoxGuestControlSvc_INCS      = $(PATH_ROOT)/src/VBox/Main/include
    4245VBoxGuestControlSvc_INCS.win  = \
  • trunk/src/VBox/HostServices/GuestControl/VBoxGuestControlSvc.cpp

    r98103 r98526  
    7373#include <VBox/HostServices/GuestControlSvc.h>
    7474#include <VBox/GuestHost/GuestControl.h> /** @todo r=bird: Why two headers??? */
     75
     76#include "VBoxGuestControlSvc-internal.h"
    7577
    7678#include <VBox/err.h>
     
    16261628                        break;
    16271629                    case HOST_MSG_FILE_READ:
     1630                        RT_FALL_THROUGH();
    16281631                    case HOST_MSG_FILE_READ_AT:
    16291632                        HGCMSvcSetU32(&aReplyParams[1], GUEST_FILE_NOTIFYTYPE_READ);  /* type */
     
    16331636                        break;
    16341637                    case HOST_MSG_FILE_WRITE:
     1638                        RT_FALL_THROUGH();
    16351639                    case HOST_MSG_FILE_WRITE_AT:
    16361640                        HGCMSvcSetU32(&aReplyParams[1], GUEST_FILE_NOTIFYTYPE_WRITE); /* type */
     
    16571661                        hostCallback(GUEST_MSG_FILE_NOTIFY, 4, aReplyParams);
    16581662                        break;
    1659 
    1660                     case HOST_MSG_EXEC_GET_OUTPUT: /** @todo This can't be right/work. */
    1661                     case HOST_MSG_EXEC_TERMINATE:  /** @todo This can't be right/work. */
    1662                     case HOST_MSG_EXEC_WAIT_FOR:   /** @todo This can't be right/work. */
     1663#ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS
     1664                    case HOST_MSG_FS_QUERY_INFO:
     1665                        RT_FALL_THROUGH();
     1666                    case HOST_MSG_FS_CREATE_TEMP:
     1667                        RT_FALL_THROUGH();
     1668                    case HOST_MSG_FILE_REMOVE:
     1669                        RT_FALL_THROUGH();
     1670                    case HOST_MSG_DIR_OPEN:
     1671                        RT_FALL_THROUGH();
     1672                    case HOST_MSG_DIR_CLOSE:
     1673                        RT_FALL_THROUGH();
     1674                    case HOST_MSG_DIR_READ:
     1675                        RT_FALL_THROUGH();
     1676                    case HOST_MSG_DIR_REWIND:
     1677                        RT_FALL_THROUGH();
     1678                    case HOST_MSG_DIR_CREATE:
     1679                        RT_FALL_THROUGH();
     1680#endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */
     1681                    case HOST_MSG_EXEC_GET_OUTPUT: /** @todo BUGBUG This can't be right/work. */
     1682                    case HOST_MSG_EXEC_TERMINATE:  /** @todo BUGBUG This can't be right/work. */
     1683                    case HOST_MSG_EXEC_WAIT_FOR:   /** @todo BUGBUG This can't be right/work. */
     1684                        break;
     1685                    case HOST_MSG_DIR_REMOVE:
     1686                        RT_FALL_THROUGH();
     1687                    case HOST_MSG_PATH_RENAME:
     1688                        RT_FALL_THROUGH();
    16631689                    case HOST_MSG_PATH_USER_DOCUMENTS:
     1690                        RT_FALL_THROUGH();
    16641691                    case HOST_MSG_PATH_USER_HOME:
    1665                     case HOST_MSG_PATH_RENAME:
    1666                     case HOST_MSG_DIR_REMOVE:
     1692                        RT_FALL_THROUGH();
    16671693                    default:
    16681694                        HGCMSvcSetU32(&aReplyParams[1], pFirstMsg->mType);
     
    26102636    return rc;
    26112637}
    2612 
  • trunk/src/VBox/HostServices/GuestControl/testcase/Makefile.kmk

    r98415 r98526  
    3131if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
    3232
     33 #
     34 # Testcase which mocks HGCM to also test the VbglR3-side of Guest Control.
     35 #
     36 # Goal is to use and test as much guest side code as possible as a self-contained
     37 # binary on the host here.
     38 #
     39 # Note: No #ifdef TESTCASE hacks or similar allowed, has to run
     40 #       without #ifdef modifications to the core code!
     41 #
     42 PROGRAMS += tstGuestControlMockHGCM
     43
     44 tstGuestControlMockHGCM_TEMPLATE = VBoxR3TstExe
     45 tstGuestControlMockHGCM_DEFS     = VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL
     46 tstGuestControlMockHGCM_SOURCES  = \
     47        ../VBoxGuestControlSvc.cpp \
     48        $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp \
     49        $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibMisc.cpp \
     50        $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3Lib.cpp \
     51        $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGR.cpp \
     52        $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
     53        tstGuestControlMockHGCM.cpp
     54 tstGuestControlMockHGCM_LIBS     = $(LIB_RUNTIME)
     55 tstGuestControlMockHGCM_CLEAN    = $(tstGuestControlMockHGCM_0_OUTDIR)/tstGuestControlMockHGCM.run
     56
     57 if 0 # Enable this if you want automatic runs after compilation.
     58  $$(tstGuestControlMockHGCM_0_OUTDIR)/tstGuestControlMockHGCM.run: $$(tstGuestControlMockHGCM_1_STAGE_TARGET)
     59        export VBOX_LOG_DEST=nofile; $(tstGuestControlMockHGCM_1_STAGE_TARGET) quiet
     60        $(QUIET)$(APPEND) -t "$@" "done"
     61  OTHERS += $(tstGuestControlMockHGCM_0_OUTDIR)/tstGuestControlMockHGCM.run
     62 endif
     63
     64
    3365 # Set this in LocalConfig.kmk if you are working on the guest property
    3466 # service to automatically run the testcase at build time.
     
    5385endif
    5486
     87#
     88# List of above testcases that will be included in the ValKit.
     89#
     90ifdef VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
     91 if1of ($(KBUILD_TARGET), linux solaris win)
     92  VALKIT_UNITTESTS_WHITELIST_GUEST_ADDITIONS += \
     93        tstGuestControlMockHGCM
     94 endif
     95endif # VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
     96
    5597include $(FILE_KBUILD_SUB_FOOTER)
    56 
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