Changeset 99085 in vbox for trunk/include
- Timestamp:
- Mar 21, 2023 12:15:00 PM (21 months ago)
- Location:
- trunk/include/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/GuestControl.h
r98824 r99085 432 432 /** GSTCTL_PATH_F_XXX flag valid mask. */ 433 433 #define GSTCTL_PATH_F_VALID_MASK UINT32_C(0x00000007) 434 /** @} */ 435 436 /** @name GSTCTL_DIRLIST_F_XXX - Flags for guest directory listings. 437 * @{ */ 438 /** No guest listing flags specified. */ 439 #define GSTCTL_DIRLIST_F_NONE UINT32_C(0) 440 /** GSTCTL_DIRLIST_F_XXX valid mask. */ 441 #define GSTCTL_DIRLIST_F_VALID_MASK UINT32_C(0x00000000) 434 442 /** @} */ 435 443 … … 553 561 554 562 /** The maximum size (in bytes) of an entry file name (at least RT_UOFFSETOF(GSTCTLDIRENTRYEX, szName[2]). */ 555 #define GSTCTL_DIRENTRY_MAX_SIZE 4096 556 563 #define GSTCTL_DIRENTRY_MAX_SIZE 4096 564 /** Maximum characters of the resolved user name. Including terminator. */ 565 #define GSTCTL_DIRENTRY_MAX_USER_NAME 255 566 /** Maximum characters of the resolved user groups list. Including terminator. */ 567 #define GSTCTL_DIRENTRY_MAX_USER_GROUPS _1K 568 /** The resolved user groups delimiter as a string. */ 569 #define GSTCTL_DIRENTRY_GROUPS_DELIMITER_STR "\r\n" 570 571 /** 572 * Guest directory entry header. 573 * 574 * This is needed for (un-)packing multiple directory entries with its resolved user name + groups 575 * with the HOST_MSG_DIR_LIST command. 576 * 577 * The order of the attributes also mark their packed order, so be careful when changing this! 578 * 579 * @since 7.1. 580 */ 581 #pragma pack(1) 582 typedef struct GSTCTLDIRENTRYLISTHDR 583 { 584 /** Size (in bytes) of the directory header). */ 585 uint32_t cbDirEntryEx; 586 /** Size (in bytes) of the resolved user name as a string 587 * Includes terminator. */ 588 uint32_t cbUser; 589 /** Size (in bytes) of the resolved user groups as a string. 590 * Delimited by GSTCTL_DIRENTRY_GROUPS_DELIMITER_STR. Includes terminator. */ 591 uint32_t cbGroups; 592 } GSTCTLDIRENTRYBLOCK; 593 /** Pointer to a guest directory header entry. */ 594 typedef GSTCTLDIRENTRYLISTHDR *PGSTCTLDIRENTRYLISTHDR; 595 #pragma pack() 557 596 } /* namespace guestControl */ 558 597 -
trunk/include/VBox/HostServices/GuestControlSvc.h
r98824 r99085 232 232 */ 233 233 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, 234 240 #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ 235 241 /** … … 302 308 RT_CASE_RET_STR(HOST_MSG_DIR_REWIND); 303 309 RT_CASE_RET_STR(HOST_MSG_DIR_CREATE); 310 RT_CASE_RET_STR(HOST_MSG_DIR_LIST); 304 311 #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ 305 312 RT_CASE_RET_STR(HOST_MSG_DIR_REMOVE); … … 729 736 /** Guest directory was rewind. */ 730 737 GUEST_DIR_NOTIFYTYPE_REWIND = 22, 738 /** Guest directory listing. */ 739 GUEST_DIR_NOTIFYTYPE_LIST = 23, 731 740 #endif 732 741 /** Information about an open guest directory. */ … … 1092 1101 HGCMFunctionParameter flags; 1093 1102 } HGCMMsgDirCreate; 1103 1104 /** 1105 * Lists the entries of a directory on the guest. 1106 */ 1107 typedef 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; 1094 1120 #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ 1095 1121 … … 1528 1554 { 1529 1555 /** 1530 * Parameters used for \a type GUEST_DIR_NOTIFYTYPE_OPEN.1556 * Parameters used for \a reply_hdr.type GUEST_DIR_NOTIFYTYPE_OPEN. 1531 1557 * 1532 1558 * @since 7.1 … … 1538 1564 } open; 1539 1565 /** 1540 * Parameters used for \a type GUEST_DIR_NOTIFYTYPE_READ.1566 * Parameters used for \a reply_hdr.type GUEST_DIR_NOTIFYTYPE_READ. 1541 1567 * 1542 1568 * @since 7.1 … … 1550 1576 /** Resolved group IDs as a string. 1551 1577 * 1552 * Multiple groups are delimited by "\r\n", whereas1578 * Multiple groups are delimited by GSTCTL_DIRENTRY_GROUPS_DELIMITER_STR, whereas 1553 1579 * the first group always is the primary group. */ 1554 1580 HGCMFunctionParameter groups; 1555 1581 } 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; 1556 1597 } u; 1557 1598 } HGCMReplyDirNotify; … … 1582 1623 /** Resolved group IDs as a string. 1583 1624 * 1584 * Multiple groups are delimited by "\r\n", whereas1625 * Multiple groups are delimited by GSTCTL_DIRENTRY_GROUPS_DELIMITER_STR, whereas 1585 1626 * the first group always is the primary group. */ 1586 1627 HGCMFunctionParameter groups; -
trunk/include/VBox/VBoxGuestLib.h
r98824 r99085 1122 1122 VBGLR3DECL(int) VbglR3GuestCtrlDirGetRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle); 1123 1123 VBGLR3DECL(int) VbglR3GuestCtrlDirGetRewind(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle); 1124 VBGLR3DECL(int) VbglR3GuestCtrlDirGetList(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, uint32_t *pcEntries, uint32_t *pfFlags); 1124 1125 /** @} */ 1125 1126 # endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ … … 1155 1156 VBGLR3DECL(int) VbglR3GuestCtrlDirCbRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, PGSTCTLDIRENTRYEX pEntry, uint32_t cbSize); 1156 1157 VBGLR3DECL(int) VbglR3GuestCtrlDirCbRewind(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc); 1158 VBGLR3DECL(int) VbglR3GuestCtrlDirCbList(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint32_t cEntries, void *pvBuf, uint32_t cbBuf); 1157 1159 /** @} */ 1158 1160 # endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */
Note:
See TracChangeset
for help on using the changeset viewer.