VirtualBox

Changeset 98709 in vbox for trunk/include


Ignore:
Timestamp:
Feb 24, 2023 8:49:40 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156009
Message:

Guest Control: Implemented directory handling / walking as non-toolbox variants. bugref:9783

Location:
trunk/include/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/GuestHost/GuestControl.h

    r98665 r98709  
    402402typedef const GSTCTLFSOBJATTR *PCGSTCTLFSOBJATTR;
    403403
    404 /** @name GSTCTL_QUERYINFO_F_XXX - Generic flags for querying guest file system information.
     404/** @name GSTCTL_PATH_F_XXX - Generic flags for querying guest file system information.
    405405 * @{ */
    406406/** No guest stat flags specified. */
    407 #define GSTCTL_QUERYINFO_F_NONE               UINT32_C(0)
     407#define GSTCTL_PATH_F_NONE               UINT32_C(0)
    408408/** Last component: Work on the link. */
    409 #define GSTCTL_QUERYINFO_F_ON_LINK            RT_BIT_32(0)
     409#define GSTCTL_PATH_F_ON_LINK            RT_BIT_32(0)
    410410/** Last component: Follow if link. */
    411 #define GSTCTL_QUERYINFO_F_FOLLOW_LINK        RT_BIT_32(1)
     411#define GSTCTL_PATH_F_FOLLOW_LINK        RT_BIT_32(1)
    412412/** Don't allow symbolic links as part of the path. */
    413 #define GSTCTL_QUERYINFO_F_NO_SYMLINKS        RT_BIT_32(2)
    414 /** GSTCTL_QUERYINFO_F_XXX flag valid mask. */
    415 #define GSTCTL_QUERYINFO_F_VALID_MASK         UINT32_C(0x00000007)
     413#define GSTCTL_PATH_F_NO_SYMLINKS        RT_BIT_32(2)
     414/** GSTCTL_PATH_F_XXX flag valid mask. */
     415#define GSTCTL_PATH_F_VALID_MASK         UINT32_C(0x00000007)
    416416/** @} */
    417417
     
    443443/** @name GSTCTLDIR_F_XXX - Directory flags for HOST_MSG_DIR_OPEN.
    444444 * @{ */
     445/** No directory open flags specified. */
     446#define GSTCTLDIR_F_NONE            UINT32_C(0)
    445447/** Don't allow symbolic links as part of the path.
    446448 * @remarks this flag is currently not implemented and will be ignored. */
     
    532534typedef GSTCTLDIRENTRYEX const *PCGSTCTLDIRENTRYEX;
    533535
     536/** The maximum size (in bytes) of a GSTCTLDIRENTRYEX (includes dynamic szName[pDirEntry->cbName + 1]). */
     537#define GSTCTL_DIRENTRY_MAX_SIZE    (sizeof(GSTCTLDIRENTRYEX) + RTPATH_MAX)
     538
    534539} /* namespace guestControl */
    535540
  • trunk/include/VBox/HostServices/GuestControlSvc.h

    r98665 r98709  
    966966    /** Additional file system attributes to lookup (GSTCTLFSOBJATTRADD). */
    967967    HGCMFunctionParameter add_attributes;
    968     /** Flags (GSTCTL_QUERYINFO_F_XXX). */
     968    /** Flags (GSTCTL_PATH_F_XXX). */
    969969    HGCMFunctionParameter flags;
    970970} HGCMMsgFsQueryInfo;
     
    10291029    /** Path of directory to open. */
    10301030    HGCMFunctionParameter path;
    1031     /** Filter string to use (wildcard style). */
     1031    /** Filter type to use when walking the directory (GSTCTLDIRFILTER). */
    10321032    HGCMFunctionParameter filter;
    1033     /** Filter type to use when walking the directory (GSTCTLDIRFILTER). */
    1034     HGCMFunctionParameter filter_type;
    10351033    /** Directory open flags (GSTCTLDIR_F_XXX). */
    10361034    HGCMFunctionParameter flags;
     
    10591057    /** Handle of directory listing to read the next entry for. */
    10601058    HGCMFunctionParameter handle;
    1061     /** Custom directory entry size (in bytes) to use. */
    1062     HGCMFunctionParameter entry_size;
     1059    /** Maximum directory entry size (in bytes) to use.
     1060     *  @sa GSTCTL_DIRENTRY_MAX_SIZE */
     1061    HGCMFunctionParameter max_entry_size;
    10631062    /** Additional directory attributes to use (GSTCTLFSOBJATTRADD). */
    10641063    HGCMFunctionParameter add_attributes;
    1065     /** Directory reading flags. */
     1064    /** Directory reading flags.
     1065     *  GSTCTL_PATH_F_ON_LINK or GSTCTL_PATH_F_FOLLOW_LINK. */
    10661066    HGCMFunctionParameter flags;
    10671067} HGCMMsgDirRead;
     
    17081708
    17091709/**
    1710  * General guest directory notification callback.
    1711  */
    1712 typedef struct CALLBACKDATA_DIR_NOTIFY
     1710 * General guest file notification callback.
     1711 */
     1712typedef struct CALLBACKDATA_FILE_NOTIFY
    17131713{
    17141714    /** Callback data header. */
     
    17221722        struct
    17231723        {
    1724             /** Pointer to directory information. */
    1725             PGSTCTLFSOBJINFO pObjInfo;
    1726         } info;
    1727         struct
    1728         {
    1729             /** Guest directory handle. */
    1730             uint32_t uHandle;
    1731         } open;
    1732         /** Note: Close does not have any additional data (yet). */
    1733         struct
    1734         {
    1735             /** Size (in bytes) of directory entry information. */
    1736             uint32_t          cbEntry;
    1737             /** Pointer to directory entry information. */
    1738             GSTCTLDIRENTRYEX *pEntry;
    1739         } read;
    1740     } u;
    1741 } CALLBACKDATA_DIR_NOTIFY, *PCALLBACKDATA_DIR_NOTIFY;
    1742 
    1743 /**
    1744  * General guest file notification callback.
    1745  */
    1746 typedef struct CALLBACKDATA_FILE_NOTIFY
    1747 {
    1748     /** Callback data header. */
    1749     CALLBACKDATA_HEADER hdr;
    1750     /** Notification type. */
    1751     uint32_t uType;
    1752     /** IPRT result of overall operation. */
    1753     uint32_t rc;
    1754     union
    1755     {
    1756         struct
    1757         {
    17581724            /** Guest file handle. */
    17591725            uint32_t uHandle;
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