Changeset 99262 in vbox for trunk/include
- Timestamp:
- Apr 3, 2023 3:17:07 PM (20 months ago)
- Location:
- trunk/include/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/GuestControl.h
r99120 r99262 44 44 45 45 #include <iprt/time.h> 46 #include <iprt/path.h> 46 47 #include <iprt/types.h> 47 48 … … 266 267 INPUT_STS_OVERFLOW = 30 267 268 }; 269 270 /** @name Guest filesystem flags. 271 * 272 * @{ 273 */ 274 /** No guest file system flags set. */ 275 #define GSTCTLFSINFO_F_NONE UINT32_C(0) 276 /** If the filesystem is remote or not. */ 277 #define GSTCTLFSINFO_F_IS_REMOTE RT_BIT(0) 278 /** If the filesystem is case sensitive or not. */ 279 #define GSTCTLFSINFO_F_IS_CASE_SENSITIVE RT_BIT(1) 280 /** If the filesystem is mounted read only or not. */ 281 #define GSTCTLFSINFO_F_IS_READ_ONLY RT_BIT(2) 282 /** If the filesystem is compressed or not. */ 283 #define GSTCTLFSINFO_F_IS_COMPRESSED RT_BIT(3) 284 /** Valid mask. */ 285 #define GSTCTLFSINFO_F_VALID_MASK 0xF 286 /** @} */ 287 288 /** @name Guest filesystem feature flags. 289 * 290 * @{ 291 */ 292 /** No guest file system feature flags set. */ 293 #define GSTCTLFSINFO_FEATURE_F_NONE UINT32_C(0) 294 /** If the filesystem can handle Unicode or not. */ 295 #define GSTCTLFSINFO_FEATURE_F_UNICODE RT_BIT(0) 296 /** If the filesystem supports sparse files or not. */ 297 #define GSTCTLFSINFO_FEATURE_F_SPARSE_FILES RT_BIT(1) 298 /** If the filesystem features compression of individual files or not. */ 299 #define GSTCTLFSINFO_FEATURE_F_FILE_COMPRESSION RT_BIT(2) 300 /** Valid mask. */ 301 #define GSTCTLFSINFO_FEATURE_F_VALID_MASK 0x7 302 /** @} */ 303 304 /** Maximum length (in characters) of a guest file name. */ 305 #define GSTCTL_FS_NAME_MAX 255 306 /** Maximum length (in characters) of a guest file label. */ 307 #define GSTCTL_FS_LABEL_MAX 255 308 /** Maximum length (in characters) of a guest filesystem mount point. */ 309 #define GSTCTL_FS_MOUNTPOINT_MAX RTPATH_MAX 310 311 /** 312 * Guest filesystem information. 313 */ 314 #pragma pack(1) 315 typedef struct GSTCTLFSINFO 316 { 317 /** Remaining free space (in bytes) of the filesystem. */ 318 uint64_t cbFree; 319 /** Total space (in bytes) of the filesystem. */ 320 uint64_t cbTotalSize; 321 /** Block size (in bytes) of the filesystem. */ 322 uint32_t cbBlockSize; 323 /** Sector size (in bytes) of the filesystem. */ 324 uint32_t cbSectorSize; 325 /** Serial number of the filesystem. */ 326 uint32_t uSerialNumber; 327 /** Flags (of type GSTCTLFSINFO_F_XXX). */ 328 uint32_t fFlags; 329 /** Feature flags (of type GSTCTLFSINFO_FEATURE_F_XXX). */ 330 uint32_t fFeatures; 331 /** The maximum size (in characters) of a filesystem object name. */ 332 uint32_t cMaxComponent; 333 /** Name of the filesystem type. */ 334 char szName[GSTCTL_FS_NAME_MAX]; 335 /** Label of the filesystem. */ 336 char szLabel[GSTCTL_FS_LABEL_MAX]; 337 /** Size (in bytes) of \a szMountpoint. */ 338 uint16_t cbMountpoint; 339 /** Mount point of the filesystem. 340 * Will be dynamically allocated, based on \a cbMountpoint. */ 341 char szMountpoint[1]; 342 } GSTCTLFSINFO; 343 #pragma pack() 344 AssertCompileSize(GSTCTLFSINFO, 553); 345 /** Pointer to a guest filesystem structure. */ 346 typedef GSTCTLFSINFO *PGSTCTLFSINFO; 347 /** Pointer to a const guest filesystem structure. */ 348 typedef const GSTCTLFSINFO *PCGSTCTLFSINFO; 268 349 269 350 /** -
trunk/include/VBox/HostServices/GuestControlSvc.h
r99256 r99262 268 268 */ 269 269 HOST_MSG_FS_CREATE_TEMP = 335, 270 /** 271 * Retrieves information about a guest file system. 272 */ 273 HOST_MSG_FS_QUERY_INFO = 336, 270 274 #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ 271 275 /** Blow the type up to 32-bits. */ … … 318 322 RT_CASE_RET_STR(HOST_MSG_FS_OBJ_QUERY_INFO); 319 323 RT_CASE_RET_STR(HOST_MSG_FS_CREATE_TEMP); 324 RT_CASE_RET_STR(HOST_MSG_FS_QUERY_INFO); 320 325 #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ 321 326 RT_CASE_RET_STR(HOST_MSG_32BIT_HACK); … … 772 777 { 773 778 /** Unknown fs notification type; do not use. */ 774 GUEST_FS_NOTIFYTYPE_UNKNOWN = 0, 779 GUEST_FS_NOTIFYTYPE_UNKNOWN = 0, 780 /** Temporary directory creation notification from the guest. 781 * @since 7.1 */ 782 GUEST_FS_NOTIFYTYPE_CREATE_TEMP = 1, 783 /** File system object query information notification from the guest. 784 * @since 7.1 */ 785 GUEST_FS_NOTIFYTYPE_QUERY_OBJ_INFO = 2, 775 786 /** File system query information notification from the guest. 776 787 * @since 7.1 */ 777 GUEST_FS_NOTIFYTYPE_QUERY_INFO = 2, 778 /** Temporary directory creation notification from the guest. 779 * @since 7.1 */ 780 GUEST_FS_NOTIFYTYPE_CREATE_TEMP = 1 788 GUEST_FS_NOTIFYTYPE_QUERY_INFO = 3 781 789 }; 782 790 … … 968 976 HGCMFunctionParameter mode; 969 977 } HGCMMsgFsCreateTemp; 978 979 /** 980 * Queries information of a file system on the guest. 981 */ 982 typedef struct HGCMMsgFsQueryInfo 983 { 984 VBGLIOCHGCMCALL hdr; 985 /** Context ID. */ 986 HGCMFunctionParameter context; 987 /** Path to query file system information for. */ 988 HGCMFunctionParameter path; 989 } HGCMMsgFsQueryInfo; 970 990 971 991 /** … … 1618 1638 { 1619 1639 /** 1620 * Parameters used for \a type GUEST_FS_NOTIFYTYPE_QUERY_INFO. 1640 * Parameters used for \a type GUEST_FS_NOTIFYTYPE_CREATE_TEMP. 1641 * 1642 * @since 7.1 1643 */ 1644 struct 1645 { 1646 /** The create temporary file / directory when \a rc 1647 * indicates success. */ 1648 HGCMFunctionParameter path; 1649 } createtemp; 1650 /** 1651 * Parameters used for \a type GUEST_FS_NOTIFYTYPE_QUERY_OBJ_INFO. 1621 1652 * 1622 1653 * @since 7.1 … … 1633 1664 * the first group always is the primary group. */ 1634 1665 HGCMFunctionParameter groups; 1635 } query info;1666 } queryobjinfo; 1636 1667 /** 1637 * Parameters used for \a type GUEST_FS_NOTIFYTYPE_ CREATE_TEMP.1668 * Parameters used for \a type GUEST_FS_NOTIFYTYPE_QUERY_INFO. 1638 1669 * 1639 1670 * @since 7.1 … … 1641 1672 struct 1642 1673 { 1643 /** The create temporary file / directory when \a rc 1644 * indicates success. */ 1645 HGCMFunctionParameter path; 1646 } createtemp; 1674 /** File system object information (GSTCTLFSINFO). */ 1675 HGCMFunctionParameter fs_info; 1676 } queryinfo; 1647 1677 } u; 1648 1678 } HGCMReplyFsNotify; -
trunk/include/VBox/VBoxGuestLib.h
r99257 r99262 1098 1098 * @{ 1099 1099 */ 1100 VBGLR3DECL(int) VbglR3GuestCtrlFsGetCreateTemp(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszTemplate, uint32_t cbTemplate, char *pszPath, uint32_t cbPath, uint32_t *pfFlags, uint32_t *pfMode); 1101 VBGLR3DECL(int) VbglR3GuestCtrlFsGetQueryInfo(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszPath, uint32_t cbPath); 1102 /** @} */ 1103 1104 /** @name Guest Control file system object functions. 1105 * @{ 1106 */ 1100 1107 VBGLR3DECL(int) VbglR3GuestCtrlFsObjGetQueryInfo(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszPath, uint32_t cbPath, GSTCTLFSOBJATTRADD *penmAddAttrib, uint32_t *pfFlags); 1101 VBGLR3DECL(int) VbglR3GuestCtrlFsGetCreateTemp(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszTemplate, uint32_t cbTemplate, char *pszPath, uint32_t cbPath, uint32_t *pfFlags, uint32_t *pfMode);1102 1108 /** @} */ 1103 1109 # endif 1110 1104 1111 VBGLR3DECL(int) VbglR3GuestCtrlGetShutdown(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *pfAction); 1105 1112 /* Guest process execution. */ … … 1180 1187 * @{ 1181 1188 */ 1189 VBGLR3DECL(int) VbglR3GuestCtrlFsCbCreateTemp(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, const char *pszPath); 1190 VBGLR3DECL(int) VbglR3GuestCtrlFsCbQueryInfo(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, PGSTCTLFSINFO pFsInfo, uint32_t cbFsInfo); 1191 /** @} */ 1192 1193 /** @name Guest Control file system object callbacks. 1194 * @{ 1195 */ 1182 1196 VBGLR3DECL(int) VbglR3GuestCtrlFsObjCbQueryInfoEx(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, PGSTCTLFSOBJINFO pObjInfo, const char *pszUser, const char *pszGroups); 1183 1197 VBGLR3DECL(int) VbglR3GuestCtrlFsObjCbQueryInfo(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, PGSTCTLFSOBJINFO pObjInfo); 1184 VBGLR3DECL(int) VbglR3GuestCtrlFsCbCreateTemp(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, const char *pszPath);1185 1198 /** @} */ 1186 1199 # endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */
Note:
See TracChangeset
for help on using the changeset viewer.