VirtualBox

Ignore:
Timestamp:
Mar 21, 2023 12:15:00 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156450
Message:

Guest Control: Added directory listing support via IDirectory::list(). Added (randomized) testcase support for it. bugref:9783

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/HostServices/GuestControlSvc.h

    r98824 r99085  
    232232     */
    233233    HOST_MSG_DIR_CREATE = 314,
     234    /**
     235     * Lists one or multiple directory entries at once.
     236     *
     237     * @since   7.1
     238     */
     239    HOST_MSG_DIR_LIST = 315,
    234240#endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */
    235241    /**
     
    302308        RT_CASE_RET_STR(HOST_MSG_DIR_REWIND);
    303309        RT_CASE_RET_STR(HOST_MSG_DIR_CREATE);
     310        RT_CASE_RET_STR(HOST_MSG_DIR_LIST);
    304311#endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */
    305312        RT_CASE_RET_STR(HOST_MSG_DIR_REMOVE);
     
    729736    /** Guest directory was rewind. */
    730737    GUEST_DIR_NOTIFYTYPE_REWIND = 22,
     738    /** Guest directory listing. */
     739    GUEST_DIR_NOTIFYTYPE_LIST = 23,
    731740#endif
    732741    /** Information about an open guest directory. */
     
    10921101    HGCMFunctionParameter flags;
    10931102} HGCMMsgDirCreate;
     1103
     1104/**
     1105 * Lists the entries of a directory on the guest.
     1106 */
     1107typedef struct HGCMMsgDirList
     1108{
     1109    VBGLIOCHGCMCALL hdr;
     1110    /** Context ID. */
     1111    HGCMFunctionParameter context;
     1112    /** Handle of directory listing to list. */
     1113    HGCMFunctionParameter handle;
     1114    /** Number of entries to read at once.
     1115     *  Specify UINT32_MAX to read as much as possible. 0 is not allowed. */
     1116    HGCMFunctionParameter num_entries;
     1117    /** Listing flags (GSTCTL_DIRLIST_F_XXX). */
     1118    HGCMFunctionParameter flags;
     1119} HGCMMsgDirList;
    10941120#endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */
    10951121
     
    15281554    {
    15291555        /**
    1530          * Parameters used for \a type GUEST_DIR_NOTIFYTYPE_OPEN.
     1556         * Parameters used for \a reply_hdr.type GUEST_DIR_NOTIFYTYPE_OPEN.
    15311557         *
    15321558         * @since 7.1
     
    15381564        } open;
    15391565        /**
    1540          * Parameters used for \a type GUEST_DIR_NOTIFYTYPE_READ.
     1566         * Parameters used for \a reply_hdr.type GUEST_DIR_NOTIFYTYPE_READ.
    15411567         *
    15421568         * @since 7.1
     
    15501576            /** Resolved group IDs as a string.
    15511577             *
    1552              *  Multiple groups are delimited by "\r\n", whereas
     1578             *  Multiple groups are delimited by GSTCTL_DIRENTRY_GROUPS_DELIMITER_STR, whereas
    15531579             *  the first group always is the primary group. */
    15541580            HGCMFunctionParameter groups;
    15551581        } read;
     1582        /**
     1583         * Parameters used for \a reply_hdr.type GUEST_DIR_NOTIFYTYPE_LIST.
     1584         *
     1585         * @since 7.1
     1586         */
     1587        struct
     1588        {
     1589            /** Number of entries in \a buffer. */
     1590            HGCMFunctionParameter num_entries;
     1591            /** Buffer containing the GSTCTLDIRENTRYEX entries, immediately followed
     1592             *  by resolved user + groups as a string (empty strings if not resolved).
     1593             *
     1594             *  Only will be sent if \a num_entries > 0. */
     1595            HGCMFunctionParameter buffer;
     1596        } list;
    15561597    } u;
    15571598} HGCMReplyDirNotify;
     
    15821623            /** Resolved group IDs as a string.
    15831624             *
    1584              *  Multiple groups are delimited by "\r\n", whereas
     1625             *  Multiple groups are delimited by GSTCTL_DIRENTRY_GROUPS_DELIMITER_STR, whereas
    15851626             *  the first group always is the primary group. */
    15861627            HGCMFunctionParameter groups;
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