Changeset 82478 in vbox for trunk/include/VBox
- Timestamp:
- Dec 6, 2019 11:57:37 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 135330
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/SharedClipboard-transfers.h
r82465 r82478 86 86 87 87 /** Specifies an invalid Shared Clipboard list handle. */ 88 #define SHCLLISTHANDLE_INVALID ((SHCLLISTHANDLE) ~0LL)88 #define SHCLLISTHANDLE_INVALID ((SHCLLISTHANDLE)UINT64_MAX) 89 89 90 90 /** A Shared Clipboard object handle. */ … … 94 94 95 95 /** Specifies an invalid Shared Clipboard object handle. */ 96 #define SHCLOBJHANDLE_INVALID ((SHCLOBJHANDLE) ~0LL)96 #define SHCLOBJHANDLE_INVALID ((SHCLOBJHANDLE)UINT64_MAX) 97 97 98 98 /** @} */ … … 101 101 * @{ 102 102 */ 103 104 103 /** No flags. Initialization value. */ 105 #define SHCL_OBJ_CF_NONE (0x00000000) 106 104 #define SHCL_OBJ_CF_NONE UINT32_C(0x00000000) 105 106 #if 0 /* These probably won't be needed either */ 107 107 /** Lookup only the object, do not return a handle. All other flags are ignored. */ 108 #define SHCL_OBJ_CF_LOOKUP (0x00000001) 109 108 #define SHCL_OBJ_CF_LOOKUP UINT32_C(0x00000001) 110 109 /** Create/open a directory. */ 111 #define SHCL_OBJ_CF_DIRECTORY (0x00000004) 110 #define SHCL_OBJ_CF_DIRECTORY UINT32_C(0x00000004) 111 #endif 112 112 113 113 /** Read/write requested access for the object. */ 114 #define SHCL_OBJ_CF_ACCESS_MASK_RW (0x00001000) 115 114 #define SHCL_OBJ_CF_ACCESS_MASK_RW UINT32_C(0x00001000) 116 115 /** No access requested. */ 117 #define SHCL_OBJ_CF_ACCESS_NONE (0x00000000)116 #define SHCL_OBJ_CF_ACCESS_NONE UINT32_C(0x00000000) 118 117 /** Read access requested. */ 119 #define SHCL_OBJ_CF_ACCESS_READ (0x00001000)118 #define SHCL_OBJ_CF_ACCESS_READ UINT32_C(0x00001000) 120 119 121 120 /** Requested share access for the object. */ 122 #define SHCL_OBJ_CF_ACCESS_MASK_DENY (0x0000C000) 123 121 #define SHCL_OBJ_CF_ACCESS_MASK_DENY UINT32_C(0x00008000) 124 122 /** Allow any access. */ 125 #define SHCL_OBJ_CF_ACCESS_DENYNONE (0x00000000) 126 /** Do not allow read. */ 127 #define SHCL_OBJ_CF_ACCESS_DENYREAD (0x00004000) 123 #define SHCL_OBJ_CF_ACCESS_DENYNONE UINT32_C(0x00000000) 128 124 /** Do not allow write. */ 129 #define SHCL_OBJ_CF_ACCESS_DENYWRITE (0x00008000) 130 /** Do not allow access. */ 131 #define SHCL_OBJ_CF_ACCESS_DENYALL (SHCL_OBJ_CF_ACCESS_DENYREAD | SHCL_OBJ_CF_ACCESS_DENYWRITE) 125 #define SHCL_OBJ_CF_ACCESS_DENYWRITE UINT32_C(0x00008000) 132 126 133 127 /** Requested access to attributes of the object. */ 134 #define SHCL_OBJ_CF_ACCESS_MASK_ATTR (0x00030000) 135 128 #define SHCL_OBJ_CF_ACCESS_MASK_ATTR UINT32_C(0x00010000) 136 129 /** No access requested. */ 137 #define SHCL_OBJ_CF_ACCESS_ATTR_NONE (0x00000000)130 #define SHCL_OBJ_CF_ACCESS_ATTR_NONE UINT32_C(0x00000000) 138 131 /** Read access requested. */ 139 #define SHCL_OBJ_CF_ACCESS_ATTR_READ (0x00010000) 140 132 #define SHCL_OBJ_CF_ACCESS_ATTR_READ UINT32_C(0x00010000) 133 134 /** Valid bits. */ 135 #define SHCL_OBJ_CF_VALID_MASK UINT32_C(0x00018000) 141 136 /** @} */ 142 137 143 /** Result of an open request.144 * Along with handle value the result code145 * identifies what has happened while146 * trying to open the object.147 */148 typedef enum _SHCLCREATERESULT149 {150 SHCL_CREATERESULT_NONE,151 /** Specified path does not exist. */152 SHCL_CREATERESULT_PATH_NOT_FOUND,153 /** Path to file exists, but the last component does not. */154 SHCL_CREATERESULT_FILE_NOT_FOUND,155 /** Blow the type up to 32-bit. */156 SHCL_CREATERESULT_32BIT_HACK = 0x7fffffff157 } SHCLCREATERESULT;158 AssertCompile(SHCL_CREATERESULT_NONE == 0);159 AssertCompileSize(SHCLCREATERESULT, 4);160 161 138 /** 162 139 * The available additional information in a SHCLFSOBJATTR object. 140 * @sa RTFSOBJATTRADD 163 141 */ 164 142 typedef enum _SHCLFSOBJATTRADD … … 191 169 /** 192 170 * Shared Clipboard filesystem object attributes. 193 */ 194 #pragma pack(1) 171 * 172 * @sa RTFSOBJATTR 173 */ 195 174 typedef struct _SHCLFSOBJATTR 196 175 { … … 263 242 RTFOFF cb; 264 243 } EASize; 244 245 /** Padding the structure to a multiple of 8 bytes. */ 246 uint64_t au64Padding[5]; 265 247 } u; 266 248 } SHCLFSOBJATTR; 267 #pragma pack() 268 AssertCompileSize(SHCLFSOBJATTR, 44); 249 AssertCompileSize(SHCLFSOBJATTR, 48); 269 250 /** Pointer to a Shared Clipboard filesystem object attributes structure. */ 270 251 typedef SHCLFSOBJATTR *PSHCLFSOBJATTR; … … 274 255 /** 275 256 * Shared Clipboard file system object information structure. 276 */ 277 #pragma pack(1) 257 * 258 * @sa RTFSOBJINFO 259 */ 278 260 typedef struct _SHCLFSOBJINFO 279 261 { … … 311 293 312 294 } SHCLFSOBJINFO; 313 #pragma pack() 314 AssertCompileSize(SHCLFSOBJINFO, 92); 295 AssertCompileSize(SHCLFSOBJINFO, 96); 315 296 /** Pointer to a Shared Clipboard filesystem object information structure. */ 316 297 typedef SHCLFSOBJINFO *PSHCLFSOBJINFO; … … 319 300 typedef const SHCLFSOBJINFO *PCSHCLFSOBJINFO; 320 301 321 #pragma pack(1)322 302 /** 323 303 * Structure for keeping object open/create parameters. … … 337 317 SHCLFSOBJINFO ObjInfo; 338 318 } SHCLOBJOPENCREATEPARMS, *PSHCLOBJOPENCREATEPARMS; 339 #pragma pack()340 319 341 320 /** … … 537 516 538 517 /** 539 * Class for maintaining a Shared Clipboard area 540 * on the host or guest. This will contain all received files & directories 541 * for a single Shared Clipboard operation. 518 * Class for maintaining a Shared Clipboard area on the host or guest. 519 * 520 * This will contain all received files & directories for a single Shared 521 * Clipboard operation. 542 522 * 543 523 * In case of a failed Shared Clipboard operation this class can also … … 632 612 SHCLTRANSFEROBJSTATE State; 633 613 } SHCLTRANSFEROBJ, *PSHCLTRANSFEROBJ; 634 635 /** Defines a transfer ID. */636 typedef uint16_t SHCLTRANSFERID;637 614 638 615 /** … … 743 720 * This is handed in to the provider implementation callbacks. 744 721 */ 745 722 typedef struct _SHCLPROVIDERCTX 746 723 { 747 724 /** Pointer to the related Shared Clipboard transfer. */ … … 752 729 753 730 /** @todo r=bird: These macros must go as they do no lend themselves to writing 754 * sane documentation. Use the DECLCALLBACK macro instead, as you731 * sane documentation. Use the DECLCALLBACKMEMBER macro instead, as you 755 732 * probably do not need the function and function pointer typedefs. 756 733 * … … 913 890 /** The node member for using this struct in a RTList. */ 914 891 RTLISTNODE Node; 915 /** Critical section for serializing access. */916 RTCRITSECT CritSect;917 892 /** The transfer's state (for SSM, later). */ 918 893 SHCLTRANSFERSTATE State; 894 /** Absolute path to root entries. */ 895 char *pszPathRootAbs; 919 896 /** Timeout (in ms) for waiting of events. Default is 30s. */ 920 897 RTMSINTERVAL uTimeoutMs; 921 /** Absolute path to root entries. */922 char *pszPathRootAbs;923 898 /** Maximum data chunk size (in bytes) to transfer. Default is 64K. */ 924 899 uint32_t cbMaxChunkSize; … … 961 936 /** Contains thread-related attributes. */ 962 937 SHCLTRANSFERTHREAD Thread; 938 /** Critical section for serializing access. */ 939 RTCRITSECT CritSect; 963 940 } SHCLTRANSFER, *PSHCLTRANSFER; 964 941
Note:
See TracChangeset
for help on using the changeset viewer.