Changeset 80662 in vbox
- Timestamp:
- Sep 9, 2019 8:43:14 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/SharedClipboard-uri.h
r80459 r80662 48 48 49 49 /** A Shared Clipboard list handle. */ 50 typedef uint64_t SH AREDCLIPBOARDLISTHANDLE;50 typedef uint64_t SHCLLISTHANDLE; 51 51 /** Pointer to a Shared Clipboard list handle. */ 52 typedef SH AREDCLIPBOARDLISTHANDLE *PSHAREDCLIPBOARDLISTHANDLE;52 typedef SHCLLISTHANDLE *PSHCLLISTHANDLE; 53 53 54 54 /** Specifies an invalid Shared Clipboard list handle. */ 55 #define SH AREDCLIPBOARDLISTHANDLE_INVALID ((SHAREDCLIPBOARDLISTHANDLE)~0LL)55 #define SHCLLISTHANDLE_INVALID ((SHCLLISTHANDLE)~0LL) 56 56 57 57 /** A Shared Clipboard object handle. */ 58 typedef uint64_t SH AREDCLIPBOARDOBJHANDLE;58 typedef uint64_t SHCLOBJHANDLE; 59 59 /** Pointer to a Shared Clipboard object handle. */ 60 typedef SH AREDCLIPBOARDOBJHANDLE *PSHAREDCLIPBOARDOBJHANDLE;60 typedef SHCLOBJHANDLE *PSHCLOBJHANDLE; 61 61 62 62 /** Specifies an invalid Shared Clipboard object handle. */ 63 #define SH AREDCLIPBOARDOBJHANDLE_INVALID ((SHAREDCLIPBOARDOBJHANDLE)~0LL)63 #define SHCLOBJHANDLE_INVALID ((SHCLOBJHANDLE)~0LL) 64 64 65 65 /** @} */ … … 70 70 71 71 /** No flags. Initialization value. */ 72 #define SH AREDCLIPBOARD_OBJ_CF_NONE (0x00000000)72 #define SHCL_OBJ_CF_NONE (0x00000000) 73 73 74 74 /** Lookup only the object, do not return a handle. All other flags are ignored. */ 75 #define SH AREDCLIPBOARD_OBJ_CF_LOOKUP (0x00000001)75 #define SHCL_OBJ_CF_LOOKUP (0x00000001) 76 76 77 77 /** Create/open a directory. */ 78 #define SH AREDCLIPBOARD_OBJ_CF_DIRECTORY (0x00000004)78 #define SHCL_OBJ_CF_DIRECTORY (0x00000004) 79 79 80 80 /** Open/create action to do if object exists … … 87 87 * FILE_EXISTS with NIL handle. 88 88 */ 89 #define SH AREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_EXISTS (0x000000F0)90 #define SH AREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW (0x00000F00)89 #define SHCL_OBJ_CF_ACT_MASK_IF_EXISTS (0x000000F0) 90 #define SHCL_OBJ_CF_ACT_MASK_IF_NEW (0x00000F00) 91 91 92 92 /** What to do if object exists. */ 93 #define SH AREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS (0x00000000)94 #define SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_EXISTS (0x00000010)95 #define SH AREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS (0x00000020)96 #define SH AREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS (0x00000030)93 #define SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS (0x00000000) 94 #define SHCL_OBJ_CF_ACT_FAIL_IF_EXISTS (0x00000010) 95 #define SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS (0x00000020) 96 #define SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS (0x00000030) 97 97 98 98 /** What to do if object does not exist. */ 99 #define SH AREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW (0x00000000)100 #define SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW (0x00000100)99 #define SHCL_OBJ_CF_ACT_CREATE_IF_NEW (0x00000000) 100 #define SHCL_OBJ_CF_ACT_FAIL_IF_NEW (0x00000100) 101 101 102 102 /** Read/write requested access for the object. */ 103 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_RW (0x00003000)103 #define SHCL_OBJ_CF_ACCESS_MASK_RW (0x00003000) 104 104 105 105 /** No access requested. */ 106 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_NONE (0x00000000)106 #define SHCL_OBJ_CF_ACCESS_NONE (0x00000000) 107 107 /** Read access requested. */ 108 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_READ (0x00001000)108 #define SHCL_OBJ_CF_ACCESS_READ (0x00001000) 109 109 /** Write access requested. */ 110 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_WRITE (0x00002000)110 #define SHCL_OBJ_CF_ACCESS_WRITE (0x00002000) 111 111 /** Read/Write access requested. */ 112 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_READWRITE (SHAREDCLIPBOARD_OBJ_CF_ACCESS_READ | SHAREDCLIPBOARD_OBJ_CF_ACCESS_WRITE)112 #define SHCL_OBJ_CF_ACCESS_READWRITE (SHCL_OBJ_CF_ACCESS_READ | SHCL_OBJ_CF_ACCESS_WRITE) 113 113 114 114 /** Requested share access for the object. */ 115 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_DENY (0x0000C000)115 #define SHCL_OBJ_CF_ACCESS_MASK_DENY (0x0000C000) 116 116 117 117 /** Allow any access. */ 118 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYNONE (0x00000000)118 #define SHCL_OBJ_CF_ACCESS_DENYNONE (0x00000000) 119 119 /** Do not allow read. */ 120 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYREAD (0x00004000)120 #define SHCL_OBJ_CF_ACCESS_DENYREAD (0x00004000) 121 121 /** Do not allow write. */ 122 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE (0x00008000)122 #define SHCL_OBJ_CF_ACCESS_DENYWRITE (0x00008000) 123 123 /** Do not allow access. */ 124 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYALL (SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYREAD | SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE)124 #define SHCL_OBJ_CF_ACCESS_DENYALL (SHCL_OBJ_CF_ACCESS_DENYREAD | SHCL_OBJ_CF_ACCESS_DENYWRITE) 125 125 126 126 /** Requested access to attributes of the object. */ 127 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_ATTR (0x00030000)127 #define SHCL_OBJ_CF_ACCESS_MASK_ATTR (0x00030000) 128 128 129 129 /** No access requested. */ 130 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE (0x00000000)130 #define SHCL_OBJ_CF_ACCESS_ATTR_NONE (0x00000000) 131 131 /** Read access requested. */ 132 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READ (0x00010000)132 #define SHCL_OBJ_CF_ACCESS_ATTR_READ (0x00010000) 133 133 /** Write access requested. */ 134 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_WRITE (0x00020000)134 #define SHCL_OBJ_CF_ACCESS_ATTR_WRITE (0x00020000) 135 135 /** Read/Write access requested. */ 136 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READWRITE (SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READ | SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_WRITE)137 138 /** The file is opened in append mode. Ignored if SH AREDCLIPBOARD_OBJ_CF_ACCESS_WRITE is not set. */139 #define SH AREDCLIPBOARD_OBJ_CF_ACCESS_APPEND (0x00040000)136 #define SHCL_OBJ_CF_ACCESS_ATTR_READWRITE (SHCL_OBJ_CF_ACCESS_ATTR_READ | SHCL_OBJ_CF_ACCESS_ATTR_WRITE) 137 138 /** The file is opened in append mode. Ignored if SHCL_OBJ_CF_ACCESS_WRITE is not set. */ 139 #define SHCL_OBJ_CF_ACCESS_APPEND (0x00040000) 140 140 141 141 /** @} */ … … 146 146 * trying to open the object. 147 147 */ 148 typedef enum _SH AREDCLIPBOARDCREATERESULT149 { 150 SH AREDCLIPBOARD_CREATERESULT_NONE,148 typedef enum _SHCLCREATERESULT 149 { 150 SHCL_CREATERESULT_NONE, 151 151 /** Specified path does not exist. */ 152 SH AREDCLIPBOARD_CREATERESULT_PATH_NOT_FOUND,152 SHCL_CREATERESULT_PATH_NOT_FOUND, 153 153 /** Path to file exists, but the last component does not. */ 154 SH AREDCLIPBOARD_CREATERESULT_FILE_NOT_FOUND,154 SHCL_CREATERESULT_FILE_NOT_FOUND, 155 155 /** File already exists and either has been opened or not. */ 156 SH AREDCLIPBOARD_CREATERESULT_FILE_EXISTS,156 SHCL_CREATERESULT_FILE_EXISTS, 157 157 /** New file was created. */ 158 SH AREDCLIPBOARD_CREATERESULT_FILE_CREATED,158 SHCL_CREATERESULT_FILE_CREATED, 159 159 /** Existing file was replaced or overwritten. */ 160 SH AREDCLIPBOARD_CREATERESULT_FILE_REPLACED,160 SHCL_CREATERESULT_FILE_REPLACED, 161 161 /** Blow the type up to 32-bit. */ 162 SH AREDCLIPBOARD_CREATERESULT_32BIT_HACK = 0x7fffffff163 } SH AREDCLIPBOARDCREATERESULT;164 AssertCompile(SH AREDCLIPBOARD_CREATERESULT_NONE == 0);165 AssertCompileSize(SH AREDCLIPBOARDCREATERESULT, 4);166 167 /** 168 * The available additional information in a SH AREDCLIPBOARDFSOBJATTR object.169 */ 170 typedef enum _SH AREDCLIPBOARDFSOBJATTRADD162 SHCL_CREATERESULT_32BIT_HACK = 0x7fffffff 163 } SHCLCREATERESULT; 164 AssertCompile(SHCL_CREATERESULT_NONE == 0); 165 AssertCompileSize(SHCLCREATERESULT, 4); 166 167 /** 168 * The available additional information in a SHCLFSOBJATTR object. 169 */ 170 typedef enum _SHCLFSOBJATTRADD 171 171 { 172 172 /** No additional information is available / requested. */ 173 SH AREDCLIPBOARDFSOBJATTRADD_NOTHING = 1,174 /** The additional unix attributes (SH AREDCLIPBOARDFSOBJATTR::u::Unix) are173 SHCLFSOBJATTRADD_NOTHING = 1, 174 /** The additional unix attributes (SHCLFSOBJATTR::u::Unix) are 175 175 * available / requested. */ 176 SH AREDCLIPBOARDFSOBJATTRADD_UNIX,177 /** The additional extended attribute size (SH AREDCLIPBOARDFSOBJATTR::u::EASize) is176 SHCLFSOBJATTRADD_UNIX, 177 /** The additional extended attribute size (SHCLFSOBJATTR::u::EASize) is 178 178 * available / requested. */ 179 SH AREDCLIPBOARDFSOBJATTRADD_EASIZE,179 SHCLFSOBJATTRADD_EASIZE, 180 180 /** The last valid item (inclusive). 181 * The valid range is SH AREDCLIPBOARDFSOBJATTRADD_NOTHING thru182 * SH AREDCLIPBOARDFSOBJATTRADD_LAST. */183 SH AREDCLIPBOARDFSOBJATTRADD_LAST = SHAREDCLIPBOARDFSOBJATTRADD_EASIZE,181 * The valid range is SHCLFSOBJATTRADD_NOTHING thru 182 * SHCLFSOBJATTRADD_LAST. */ 183 SHCLFSOBJATTRADD_LAST = SHCLFSOBJATTRADD_EASIZE, 184 184 185 185 /** The usual 32-bit hack. */ 186 SH AREDCLIPBOARDFSOBJATTRADD_32BIT_SIZE_HACK = 0x7fffffff187 } SH AREDCLIPBOARDFSOBJATTRADD;186 SHCLFSOBJATTRADD_32BIT_SIZE_HACK = 0x7fffffff 187 } SHCLFSOBJATTRADD; 188 188 189 189 … … 200 200 */ 201 201 #pragma pack(1) 202 typedef struct _SH AREDCLIPBOARDFSOBJATTR202 typedef struct _SHCLFSOBJATTR 203 203 { 204 204 /** Mode flags (st_mode). RTFS_UNIX_*, RTFS_TYPE_*, and RTFS_DOS_*. … … 206 206 * Fortuntately, these are depending on windows, dos and unix 207 207 * standard values, so this shouldn't be much of a pain. */ 208 RTFMODE fMode;208 RTFMODE fMode; 209 209 210 210 /** The additional attributes available. */ 211 SH AREDCLIPBOARDFSOBJATTRADDenmAdditional;211 SHCLFSOBJATTRADD enmAdditional; 212 212 213 213 /** … … 217 217 * data as it is provided by the underlying OS. 218 218 */ 219 union SH AREDCLIPBOARDFSOBJATTRUNION219 union SHCLFSOBJATTRUNION 220 220 { 221 221 /** Additional Unix Attributes 222 * These are available when SH AREDCLIPBOARDFSOBJATTRADD is set in fUnix.222 * These are available when SHCLFSOBJATTRADD is set in fUnix. 223 223 */ 224 struct SH AREDCLIPBOARDFSOBJATTRUNIX224 struct SHCLFSOBJATTRUNIX 225 225 { 226 226 /** The user owning the filesystem object (st_uid). … … 265 265 * Extended attribute size. 266 266 */ 267 struct SH AREDCLIPBOARDFSOBJATTREASIZE267 struct SHCLFSOBJATTREASIZE 268 268 { 269 269 /** Size of EAs. */ … … 271 271 } EASize; 272 272 } u; 273 } SH AREDCLIPBOARDFSOBJATTR;273 } SHCLFSOBJATTR; 274 274 #pragma pack() 275 AssertCompileSize(SH AREDCLIPBOARDFSOBJATTR, 44);275 AssertCompileSize(SHCLFSOBJATTR, 44); 276 276 /** Pointer to a shared folder filesystem object attributes structure. */ 277 typedef SH AREDCLIPBOARDFSOBJATTR *PSHAREDCLIPBOARDFSOBJATTR;277 typedef SHCLFSOBJATTR *PSHCLFSOBJATTR; 278 278 /** Pointer to a const shared folder filesystem object attributes structure. */ 279 typedef const SH AREDCLIPBOARDFSOBJATTR *PCSHAREDCLIPBOARDFSOBJATTR;279 typedef const SHCLFSOBJATTR *PCSHCLFSOBJATTR; 280 280 281 281 /** … … 283 283 */ 284 284 #pragma pack(1) 285 typedef struct _SH AREDCLIPBOARDFSOBJINFO285 typedef struct _SHCLFSOBJINFO 286 286 { 287 287 /** Logical size (st_size). … … 315 315 316 316 /** Attributes. */ 317 SH AREDCLIPBOARDFSOBJATTR Attr;318 319 } SH AREDCLIPBOARDFSOBJINFO;317 SHCLFSOBJATTR Attr; 318 319 } SHCLFSOBJINFO; 320 320 #pragma pack() 321 AssertCompileSize(SH AREDCLIPBOARDFSOBJINFO, 92);321 AssertCompileSize(SHCLFSOBJINFO, 92); 322 322 /** Pointer to a shared folder filesystem object information structure. */ 323 typedef SH AREDCLIPBOARDFSOBJINFO *PSHAREDCLIPBOARDFSOBJINFO;323 typedef SHCLFSOBJINFO *PSHCLFSOBJINFO; 324 324 /** Pointer to a const shared folder filesystem object information 325 325 * structure. */ 326 typedef const SH AREDCLIPBOARDFSOBJINFO *PCSHAREDCLIPBOARDFSOBJINFO;326 typedef const SHCLFSOBJINFO *PCSHCLFSOBJINFO; 327 327 328 328 #pragma pack(1) … … 330 330 * Structure for keeping object open/create parameters. 331 331 */ 332 typedef struct _ VBOXCLIPBOARDOBJOPENCREATEPARMS332 typedef struct _SHCLOBJOPENCREATEPARMS 333 333 { 334 334 /** Path to object to open / create. */ … … 336 336 /** Size (in bytes) of path to to object. */ 337 337 uint32_t cbPath; 338 /** SH AREDCLIPBOARD_OBJ_CF_* */338 /** SHCL_OBJ_CF_* */ 339 339 uint32_t fCreate; 340 340 /** … … 342 342 * returned actual attributes of opened/created object. 343 343 */ 344 SH AREDCLIPBOARDFSOBJINFO ObjInfo;345 } VBOXCLIPBOARDOBJOPENCREATEPARMS, *PVBOXCLIPBOARDOBJOPENCREATEPARMS;344 SHCLFSOBJINFO ObjInfo; 345 } SHCLOBJOPENCREATEPARMS, *PSHCLOBJOPENCREATEPARMS; 346 346 #pragma pack() 347 347 … … 349 349 * Structure for keeping a reply message. 350 350 */ 351 typedef struct _ VBOXCLIPBOARDREPLY352 { 353 /** Message type of type VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_XXX. */351 typedef struct _SHCLREPLY 352 { 353 /** Message type of type VBOX_SHCL_REPLYMSGTYPE_XXX. */ 354 354 uint32_t uType; 355 355 /** IPRT result of overall operation. Note: int vs. uint32! */ … … 359 359 struct 360 360 { 361 SH AREDCLIPBOARDLISTHANDLE uHandle;361 SHCLLISTHANDLE uHandle; 362 362 } ListOpen; 363 363 struct 364 364 { 365 SH AREDCLIPBOARDOBJHANDLE uHandle;365 SHCLOBJHANDLE uHandle; 366 366 } ObjOpen; 367 367 struct 368 368 { 369 SH AREDCLIPBOARDOBJHANDLE uHandle;369 SHCLOBJHANDLE uHandle; 370 370 } ObjClose; 371 371 } u; … … 374 374 /** Payload size (in bytes). */ 375 375 uint32_t cbPayload; 376 } VBOXCLIPBOARDREPLY, *PVBOXCLIPBOARDREPLY;377 378 struct _ VBOXCLIPBOARDLISTENTRY;379 typedef _ VBOXCLIPBOARDLISTENTRY VBOXCLIPBOARDLISTENTRY;376 } SHCLREPLY, *PSHCLREPLY; 377 378 struct _SHCLLISTENTRY; 379 typedef _SHCLLISTENTRY SHCLLISTENTRY; 380 380 381 381 /** Defines a single root list entry. Currently the same as a regular list entry. */ 382 typedef VBOXCLIPBOARDLISTENTRY VBOXCLIPBOARDROOTLISTENTRY;382 typedef SHCLLISTENTRY SHCLROOTLISTENTRY; 383 383 /** Defines a pointer to a single root list entry. Currently the same as a regular list entry pointer. */ 384 typedef VBOXCLIPBOARDROOTLISTENTRY *PVBOXCLIPBOARDROOTLISTENTRY;384 typedef SHCLROOTLISTENTRY *PSHCLROOTLISTENTRY; 385 385 386 386 /** 387 387 * Structure for keeping Shared Clipboard root list headers. 388 388 */ 389 typedef struct _ VBOXCLIPBOARDROOTLISTHDR389 typedef struct _SHCLROOTLISTHDR 390 390 { 391 391 /** Roots listing flags; unused at the moment. */ … … 393 393 /** Number of root list entries. */ 394 394 uint32_t cRoots; 395 } VBOXCLIPBOARDROOTLISTHDR, *PVBOXCLIPBOARDROOTLISTHDR;395 } SHCLROOTLISTHDR, *PSHCLROOTLISTHDR; 396 396 397 397 /** 398 398 * Structure for maintaining a Shared Clipboard root list. 399 399 */ 400 typedef struct _ VBOXCLIPBOARDROOTLIST400 typedef struct _SHCLROOTLIST 401 401 { 402 402 /** Root list header. */ 403 VBOXCLIPBOARDROOTLISTHDR Hdr;403 SHCLROOTLISTHDR Hdr; 404 404 /** Root list entries. */ 405 VBOXCLIPBOARDROOTLISTENTRY *paEntries;406 } VBOXCLIPBOARDROOTLIST, *PVBOXCLIPBOARDROOTLIST;405 SHCLROOTLISTENTRY *paEntries; 406 } SHCLROOTLIST, *PSHCLROOTLIST; 407 407 408 408 /** 409 409 * Structure for maintaining Shared Clipboard list open paramters. 410 410 */ 411 typedef struct _ VBOXCLIPBOARDLISTOPENPARMS412 { 413 /** Listing flags (see VBOX_SH AREDCLIPBOARD_LIST_FLAG_XXX). */411 typedef struct _SHCLLISTOPENPARMS 412 { 413 /** Listing flags (see VBOX_SHCL_LIST_FLAG_XXX). */ 414 414 uint32_t fList; 415 415 /** Size (in bytes) of the filter string. */ … … 421 421 /** Listing path (absolute). If empty or NULL the listing's root path will be opened. */ 422 422 char *pszPath; 423 } VBOXCLIPBOARDLISTOPENPARMS, *PVBOXCLIPBOARDLISTOPENPARMS;423 } SHCLLISTOPENPARMS, *PSHCLLISTOPENPARMS; 424 424 425 425 /** 426 426 * Structure for keeping a Shared Clipboard list header. 427 427 */ 428 typedef struct _ VBOXCLIPBOARDLISTHDR428 typedef struct _SHCLLISTHDR 429 429 { 430 430 /** Feature flag(s). Not being used atm. */ … … 434 434 /** Total size (in bytes) returned. */ 435 435 uint64_t cbTotalSize; 436 } VBOXCLIPBOARDLISTHDR, *PVBOXCLIPBOARDLISTHDR;436 } SHCLLISTHDR, *PSHCLLISTHDR; 437 437 438 438 /** 439 439 * Structure for a Shared Clipboard list entry. 440 440 */ 441 typedef struct _ VBOXCLIPBOARDLISTENTRY441 typedef struct _SHCLLISTENTRY 442 442 { 443 443 /** Entry name. */ … … 451 451 /** Data of the actual list entry. */ 452 452 void *pvInfo; 453 } VBOXCLIPBOARDLISTENTRY, *PVBOXCLIPBOARDLISTENTRY;453 } SHCLLISTENTRY, *PSHCLLISTENTRY; 454 454 455 455 /** Maximum length (in UTF-8 characters) of a list entry name. */ 456 #define VBOXCLIPBOARDLISTENTRY_MAX_NAME RTPATH_MAX /** @todo Improve this to be more dynamic. */456 #define SHCLLISTENTRY_MAX_NAME RTPATH_MAX /** @todo Improve this to be more dynamic. */ 457 457 458 458 /** 459 459 * Structure for maintaining a Shared Clipboard list. 460 460 */ 461 typedef struct _ VBOXCLIPBOARDLIST461 typedef struct _SHCLLIST 462 462 { 463 463 /** List header. */ 464 VBOXCLIPBOARDLISTHDR Hdr;464 SHCLLISTHDR Hdr; 465 465 /** List entries. */ 466 VBOXCLIPBOARDROOTLISTENTRY *paEntries;467 } VBOXCLIPBOARDLIST, *PVBOXCLIPBOARDLIST;466 SHCLROOTLISTENTRY *paEntries; 467 } SHCLLIST, *PSHCLLIST; 468 468 469 469 /** 470 470 * Structure for keeping a Shared Clipboard object data chunk. 471 471 */ 472 typedef struct _ VBOXCLIPBOARDOBJDATACHUNK472 typedef struct _SHCLOBJDATACHUNK 473 473 { 474 474 /** Handle of object this data chunk is related to. */ … … 478 478 /** Size (in bytes) of data chunk. */ 479 479 uint32_t cbData; 480 } VBOXCLIPBOARDOBJDATACHUNK, *PVBOXCLIPBOARDOBJDATACHUNK;480 } SHCLOBJDATACHUNK, *PSHCLOBJDATACHUNK; 481 481 482 482 /** 483 483 * Enumeration for specifying a clipboard area object type. 484 484 */ 485 typedef enum _SH AREDCLIPBOARDAREAOBJTYPE485 typedef enum _SHCLAREAOBJTYPE 486 486 { 487 487 /** Unknown object type; do not use. */ 488 SH AREDCLIPBOARDAREAOBJTYPE_UNKNOWN = 0,488 SHCLAREAOBJTYPE_UNKNOWN = 0, 489 489 /** Object is a directory. */ 490 SH AREDCLIPBOARDAREAOBJTYPE_DIR,490 SHCLAREAOBJTYPE_DIR, 491 491 /** Object is a file. */ 492 SH AREDCLIPBOARDAREAOBJTYPE_FILE,492 SHCLAREAOBJTYPE_FILE, 493 493 /** Object is a symbolic link. */ 494 SH AREDCLIPBOARDAREAOBJTYPE_SYMLINK,494 SHCLAREAOBJTYPE_SYMLINK, 495 495 /** The usual 32-bit hack. */ 496 SH AREDCLIPBOARDAREAOBJTYPE_32Bit_Hack = 0x7fffffff497 } SH AREDCLIPBOARDAREAOBJTYPE;496 SHCLAREAOBJTYPE_32Bit_Hack = 0x7fffffff 497 } SHCLAREAOBJTYPE; 498 498 499 499 /** Clipboard area ID. A valid area is >= 1. 500 500 * If 0 is specified, the last (most recent) area is meant. 501 501 * Set to UINT32_MAX if not initialized. */ 502 typedef uint32_t SH AREDCLIPBOARDAREAID;502 typedef uint32_t SHCLAREAID; 503 503 504 504 /** Defines a non-initialized (nil) clipboard area. */ 505 #define NIL_SH AREDCLIPBOARDAREAID UINT32_MAX505 #define NIL_SHCLAREAID UINT32_MAX 506 506 507 507 /** SharedClipboardArea open flags. */ 508 typedef uint32_t SH AREDCLIPBOARDAREAOPENFLAGS;508 typedef uint32_t SHCLAREAOPENFLAGS; 509 509 510 510 /** No clipboard area open flags specified. */ 511 #define SH AREDCLIPBOARDAREA_OPEN_FLAGS_NONE 0511 #define SHCLAREA_OPEN_FLAGS_NONE 0 512 512 /** The clipboard area must not exist yet. */ 513 #define SH AREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST RT_BIT(0)513 #define SHCLAREA_OPEN_FLAGS_MUST_NOT_EXIST RT_BIT(0) 514 514 /** Mask of all valid clipboard area open flags. */ 515 #define SH AREDCLIPBOARDAREA_OPEN_FLAGS_VALID_MASK 0x1515 #define SHCLAREA_OPEN_FLAGS_VALID_MASK 0x1 516 516 517 517 /** Defines a clipboard area object state. */ 518 typedef uint32_t SH AREDCLIPBOARDAREAOBJSTATE;518 typedef uint32_t SHCLAREAOBJSTATE; 519 519 520 520 /** No object state set. */ 521 #define SH AREDCLIPBOARDAREAOBJSTATE_NONE 0521 #define SHCLAREAOBJSTATE_NONE 0 522 522 /** The object is considered as being complete (e.g. serialized). */ 523 #define SH AREDCLIPBOARDAREAOBJSTATE_COMPLETE RT_BIT(0)523 #define SHCLAREAOBJSTATE_COMPLETE RT_BIT(0) 524 524 525 525 /** … … 529 529 * is too heavy for this purpose. 530 530 */ 531 typedef struct _SH AREDCLIPBOARDAREAOBJ532 { 533 SH AREDCLIPBOARDAREAOBJTYPE enmType;534 SH AREDCLIPBOARDAREAOBJSTATE fState;535 } SH AREDCLIPBOARDAREAOBJ, *PSHAREDCLIPBOARDAREAOBJ;531 typedef struct _SHCLAREAOBJ 532 { 533 SHCLAREAOBJTYPE enmType; 534 SHCLAREAOBJSTATE fState; 535 } SHCLAREAOBJ, *PSHCLAREAOBJ; 536 536 537 537 /** … … 548 548 549 549 SharedClipboardArea(void); 550 SharedClipboardArea(const char *pszPath, SH AREDCLIPBOARDAREAID uID = NIL_SHAREDCLIPBOARDAREAID,551 SH AREDCLIPBOARDAREAOPENFLAGS fFlags = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE);550 SharedClipboardArea(const char *pszPath, SHCLAREAID uID = NIL_SHCLAREAID, 551 SHCLAREAOPENFLAGS fFlags = SHCLAREA_OPEN_FLAGS_NONE); 552 552 virtual ~SharedClipboardArea(void); 553 553 … … 560 560 int Unlock(void); 561 561 562 int AddObject(const char *pszPath, const SH AREDCLIPBOARDAREAOBJ &Obj);563 int GetObject(const char *pszPath, PSH AREDCLIPBOARDAREAOBJ pObj);562 int AddObject(const char *pszPath, const SHCLAREAOBJ &Obj); 563 int GetObject(const char *pszPath, PSHCLAREAOBJ pObj); 564 564 565 565 int Close(void); 566 566 bool IsOpen(void) const; 567 int OpenEx(const char *pszPath, SH AREDCLIPBOARDAREAID uID = NIL_SHAREDCLIPBOARDAREAID,568 SH AREDCLIPBOARDAREAOPENFLAGS fFlags = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE);569 int OpenTemp(SH AREDCLIPBOARDAREAID uID = NIL_SHAREDCLIPBOARDAREAID,570 SH AREDCLIPBOARDAREAOPENFLAGS fFlags = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE);571 SH AREDCLIPBOARDAREAID GetID(void) const;567 int OpenEx(const char *pszPath, SHCLAREAID uID = NIL_SHCLAREAID, 568 SHCLAREAOPENFLAGS fFlags = SHCLAREA_OPEN_FLAGS_NONE); 569 int OpenTemp(SHCLAREAID uID = NIL_SHCLAREAID, 570 SHCLAREAOPENFLAGS fFlags = SHCLAREA_OPEN_FLAGS_NONE); 571 SHCLAREAID GetID(void) const; 572 572 const char *GetDirAbs(void) const; 573 573 uint32_t GetRefCount(void); … … 578 578 public: 579 579 580 static int PathConstruct(const char *pszBase, SH AREDCLIPBOARDAREAID uID, char *pszPath, size_t cbPath);580 static int PathConstruct(const char *pszBase, SHCLAREAID uID, char *pszPath, size_t cbPath); 581 581 582 582 protected: … … 588 588 protected: 589 589 590 typedef std::map<RTCString, SH AREDCLIPBOARDAREAOBJ> SharedClipboardAreaFsObjMap;590 typedef std::map<RTCString, SHCLAREAOBJ> SharedClipboardAreaFsObjMap; 591 591 592 592 /** Creation timestamp (in ms). */ … … 605 605 SharedClipboardAreaFsObjMap m_mapObj; 606 606 /** Associated clipboard area ID. */ 607 SH AREDCLIPBOARDAREAID m_uID;607 SHCLAREAID m_uID; 608 608 }; 609 609 … … 611 611 int SharedClipboardPathSanitize(char *pszPath, size_t cbPath); 612 612 613 P VBOXCLIPBOARDROOTLIST SharedClipboardURIRootListAlloc(void);614 void SharedClipboardURIRootListFree(P VBOXCLIPBOARDROOTLIST pRootList);615 616 P VBOXCLIPBOARDROOTLISTHDR SharedClipboardURIRootListHdrDup(PVBOXCLIPBOARDROOTLISTHDR pRoots);617 int SharedClipboardURIRootListHdrInit(P VBOXCLIPBOARDROOTLISTHDR pRoots);618 void SharedClipboardURIRootListHdrDestroy(P VBOXCLIPBOARDROOTLISTHDR pRoots);619 620 int SharedClipboardURIRootListEntryCopy(P VBOXCLIPBOARDROOTLISTENTRY pDst, PVBOXCLIPBOARDROOTLISTENTRY pSrc);621 P VBOXCLIPBOARDROOTLISTENTRY SharedClipboardURIRootListEntryDup(PVBOXCLIPBOARDROOTLISTENTRY pRootListEntry);622 void SharedClipboardURIRootListEntryDestroy(P VBOXCLIPBOARDROOTLISTENTRY pRootListEntry);623 624 int SharedClipboardURIListHdrAlloc(P VBOXCLIPBOARDLISTHDR *ppListHdr);625 void SharedClipboardURIListHdrFree(P VBOXCLIPBOARDLISTHDR pListHdr);626 P VBOXCLIPBOARDLISTHDR SharedClipboardURIListHdrDup(PVBOXCLIPBOARDLISTHDR pListHdr);627 int SharedClipboardURIListHdrInit(P VBOXCLIPBOARDLISTHDR pListHdr);628 void SharedClipboardURIListHdrDestroy(P VBOXCLIPBOARDLISTHDR pListHdr);629 void SharedClipboardURIListHdrFree(P VBOXCLIPBOARDLISTHDR pListHdr);630 void SharedClipboardURIListHdrReset(P VBOXCLIPBOARDLISTHDR pListHdr);631 bool SharedClipboardURIListHdrIsValid(P VBOXCLIPBOARDLISTHDR pListHdr);632 633 int SharedClipboardURIListOpenParmsCopy(P VBOXCLIPBOARDLISTOPENPARMS pDst, PVBOXCLIPBOARDLISTOPENPARMS pSrc);634 P VBOXCLIPBOARDLISTOPENPARMS SharedClipboardURIListOpenParmsDup(PVBOXCLIPBOARDLISTOPENPARMS pParms);635 int SharedClipboardURIListOpenParmsInit(P VBOXCLIPBOARDLISTOPENPARMS pParms);636 void SharedClipboardURIListOpenParmsDestroy(P VBOXCLIPBOARDLISTOPENPARMS pParms);637 638 int SharedClipboardURIListEntryAlloc(P VBOXCLIPBOARDLISTENTRY *ppListEntry);639 void SharedClipboardURIListEntryFree(P VBOXCLIPBOARDLISTENTRY pListEntry);640 int SharedClipboardURIListEntryCopy(P VBOXCLIPBOARDLISTENTRY pDst, PVBOXCLIPBOARDLISTENTRY pSrc);641 P VBOXCLIPBOARDLISTENTRY SharedClipboardURIListEntryDup(PVBOXCLIPBOARDLISTENTRY pListEntry);642 int SharedClipboardURIListEntryInit(P VBOXCLIPBOARDLISTENTRY pListEntry);643 void SharedClipboardURIListEntryDestroy(P VBOXCLIPBOARDLISTENTRY pListEntry);644 bool SharedClipboardURIListEntryIsValid(P VBOXCLIPBOARDLISTENTRY pListEntry);613 PSHCLROOTLIST SharedClipboardURIRootListAlloc(void); 614 void SharedClipboardURIRootListFree(PSHCLROOTLIST pRootList); 615 616 PSHCLROOTLISTHDR SharedClipboardURIRootListHdrDup(PSHCLROOTLISTHDR pRoots); 617 int SharedClipboardURIRootListHdrInit(PSHCLROOTLISTHDR pRoots); 618 void SharedClipboardURIRootListHdrDestroy(PSHCLROOTLISTHDR pRoots); 619 620 int SharedClipboardURIRootListEntryCopy(PSHCLROOTLISTENTRY pDst, PSHCLROOTLISTENTRY pSrc); 621 PSHCLROOTLISTENTRY SharedClipboardURIRootListEntryDup(PSHCLROOTLISTENTRY pRootListEntry); 622 void SharedClipboardURIRootListEntryDestroy(PSHCLROOTLISTENTRY pRootListEntry); 623 624 int SharedClipboardURIListHdrAlloc(PSHCLLISTHDR *ppListHdr); 625 void SharedClipboardURIListHdrFree(PSHCLLISTHDR pListHdr); 626 PSHCLLISTHDR SharedClipboardURIListHdrDup(PSHCLLISTHDR pListHdr); 627 int SharedClipboardURIListHdrInit(PSHCLLISTHDR pListHdr); 628 void SharedClipboardURIListHdrDestroy(PSHCLLISTHDR pListHdr); 629 void SharedClipboardURIListHdrFree(PSHCLLISTHDR pListHdr); 630 void SharedClipboardURIListHdrReset(PSHCLLISTHDR pListHdr); 631 bool SharedClipboardURIListHdrIsValid(PSHCLLISTHDR pListHdr); 632 633 int SharedClipboardURIListOpenParmsCopy(PSHCLLISTOPENPARMS pDst, PSHCLLISTOPENPARMS pSrc); 634 PSHCLLISTOPENPARMS SharedClipboardURIListOpenParmsDup(PSHCLLISTOPENPARMS pParms); 635 int SharedClipboardURIListOpenParmsInit(PSHCLLISTOPENPARMS pParms); 636 void SharedClipboardURIListOpenParmsDestroy(PSHCLLISTOPENPARMS pParms); 637 638 int SharedClipboardURIListEntryAlloc(PSHCLLISTENTRY *ppListEntry); 639 void SharedClipboardURIListEntryFree(PSHCLLISTENTRY pListEntry); 640 int SharedClipboardURIListEntryCopy(PSHCLLISTENTRY pDst, PSHCLLISTENTRY pSrc); 641 PSHCLLISTENTRY SharedClipboardURIListEntryDup(PSHCLLISTENTRY pListEntry); 642 int SharedClipboardURIListEntryInit(PSHCLLISTENTRY pListEntry); 643 void SharedClipboardURIListEntryDestroy(PSHCLLISTENTRY pListEntry); 644 bool SharedClipboardURIListEntryIsValid(PSHCLLISTENTRY pListEntry); 645 645 646 646 /** 647 647 * Enumeration specifying an URI transfer direction. 648 648 */ 649 typedef enum _SH AREDCLIPBOARDURITRANSFERDIR649 typedef enum _SHCLURITRANSFERDIR 650 650 { 651 651 /** Unknown transfer directory. */ 652 SH AREDCLIPBOARDURITRANSFERDIR_UNKNOWN = 0,652 SHCLURITRANSFERDIR_UNKNOWN = 0, 653 653 /** Read transfer (from source). */ 654 SH AREDCLIPBOARDURITRANSFERDIR_READ,654 SHCLURITRANSFERDIR_READ, 655 655 /** Write transfer (to target). */ 656 SH AREDCLIPBOARDURITRANSFERDIR_WRITE,656 SHCLURITRANSFERDIR_WRITE, 657 657 /** The usual 32-bit hack. */ 658 SH AREDCLIPBOARDURITRANSFERDIR_32BIT_HACK = 0x7fffffff659 } SH AREDCLIPBOARDURITRANSFERDIR;660 661 struct _SH AREDCLIPBOARDURITRANSFER;662 typedef struct _SH AREDCLIPBOARDURITRANSFER SHAREDCLIPBOARDURITRANSFER;658 SHCLURITRANSFERDIR_32BIT_HACK = 0x7fffffff 659 } SHCLURITRANSFERDIR; 660 661 struct _SHCLURITRANSFER; 662 typedef struct _SHCLURITRANSFER SHCLURITRANSFER; 663 663 664 664 /** 665 665 * Structure for handling a single URI object context. 666 666 */ 667 typedef struct _SH AREDCLIPBOARDCLIENTURIOBJCTX668 { 669 SH AREDCLIPBOARDURITRANSFER *pTransfer;670 SH AREDCLIPBOARDOBJHANDLE uHandle;671 } SH AREDCLIPBOARDCLIENTURIOBJCTX, *PSHAREDCLIPBOARDCLIENTURIOBJCTX;672 673 typedef struct _SH AREDCLIPBOARDURITRANSFEROBJSTATE667 typedef struct _SHCLCLIENTURIOBJCTX 668 { 669 SHCLURITRANSFER *pTransfer; 670 SHCLOBJHANDLE uHandle; 671 } SHCLCLIENTURIOBJCTX, *PSHCLCLIENTURIOBJCTX; 672 673 typedef struct _SHCLURITRANSFEROBJSTATE 674 674 { 675 675 uint64_t cbProcessed; 676 } SH AREDCLIPBOARDURITRANSFEROBJSTATE, *PSHAREDCLIPBOARDURITRANSFEROBJSTATE;677 678 typedef struct _SH AREDCLIPBOARDURITRANSFEROBJ679 { 680 SH AREDCLIPBOARDOBJHANDLE uHandle;676 } SHCLURITRANSFEROBJSTATE, *PSHCLURITRANSFEROBJSTATE; 677 678 typedef struct _SHCLURITRANSFEROBJ 679 { 680 SHCLOBJHANDLE uHandle; 681 681 char *pszPathAbs; 682 SH AREDCLIPBOARDFSOBJINFO objInfo;683 SH AREDCLIPBOARDSOURCE enmSource;684 SH AREDCLIPBOARDURITRANSFEROBJSTATE State;685 } SH AREDCLIPBOARDURITRANSFEROBJ, *PSHAREDCLIPBOARDURITRANSFEROBJ;682 SHCLFSOBJINFO objInfo; 683 SHCLSOURCE enmSource; 684 SHCLURITRANSFEROBJSTATE State; 685 } SHCLURITRANSFEROBJ, *PSHCLURITRANSFEROBJ; 686 686 687 687 /** No status set. */ 688 #define SH AREDCLIPBOARDURITRANSFERSTATUS_NONE 0688 #define SHCLURITRANSFERSTATUS_NONE 0 689 689 /** The transfer has been announced but is not running yet. */ 690 #define SH AREDCLIPBOARDURITRANSFERSTATUS_READY 1690 #define SHCLURITRANSFERSTATUS_READY 1 691 691 /** The transfer is active and running. */ 692 #define SH AREDCLIPBOARDURITRANSFERSTATUS_RUNNING 2692 #define SHCLURITRANSFERSTATUS_RUNNING 2 693 693 /** The transfer has been completed. */ 694 #define SH AREDCLIPBOARDURITRANSFERSTATUS_COMPLETED 3694 #define SHCLURITRANSFERSTATUS_COMPLETED 3 695 695 /** The transfer has been canceled. */ 696 #define SH AREDCLIPBOARDURITRANSFERSTATUS_CANCELED 4696 #define SHCLURITRANSFERSTATUS_CANCELED 4 697 697 /** The transfer ran into an unrecoverable error. */ 698 #define SH AREDCLIPBOARDURITRANSFERSTATUS_ERROR 5698 #define SHCLURITRANSFERSTATUS_ERROR 5 699 699 700 700 /** Defines a transfer status. */ 701 typedef uint32_t SH AREDCLIPBOARDURITRANSFERSTATUS;701 typedef uint32_t SHCLURITRANSFERSTATUS; 702 702 703 703 /** 704 704 * Enumeration for specifying a Shared Clipboard object type. 705 705 */ 706 typedef enum _SH AREDCLIPBOARDURIOBJTYPE706 typedef enum _SHCLURIOBJTYPE 707 707 { 708 708 /** Invalid object type. */ 709 SH AREDCLIPBOARDURIOBJTYPE_INVALID = 0,709 SHCLURIOBJTYPE_INVALID = 0, 710 710 /** Object is a directory. */ 711 SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY,711 SHCLURIOBJTYPE_DIRECTORY, 712 712 /** Object is a file. */ 713 SH AREDCLIPBOARDURIOBJTYPE_FILE,713 SHCLURIOBJTYPE_FILE, 714 714 /** Object is a symbolic link. */ 715 SH AREDCLIPBOARDURIOBJTYPE_SYMLINK,715 SHCLURIOBJTYPE_SYMLINK, 716 716 /** The usual 32-bit hack. */ 717 SH AREDCLIPBOARDURIOBJTYPE_32BIT_SIZE_HACK = 0x7fffffff718 } SH AREDCLIPBOARDURIOBJTYPE;717 SHCLURIOBJTYPE_32BIT_SIZE_HACK = 0x7fffffff 718 } SHCLURIOBJTYPE; 719 719 720 720 /** … … 722 722 * This is using to map own (local) handles to the underlying file system. 723 723 */ 724 typedef struct _SH AREDCLIPBOARDURILISTHANDLEINFO724 typedef struct _SHCLURILISTHANDLEINFO 725 725 { 726 726 /** The list node. */ 727 727 RTLISTNODE Node; 728 728 /** The list's handle. */ 729 SH AREDCLIPBOARDLISTHANDLE hList;729 SHCLLISTHANDLE hList; 730 730 /** Type of list handle. */ 731 SH AREDCLIPBOARDURIOBJTYPE enmType;731 SHCLURIOBJTYPE enmType; 732 732 /** Absolute local path of the list object. */ 733 733 char *pszPathLocalAbs; … … 744 744 } Local; 745 745 } u; 746 } SH AREDCLIPBOARDURILISTHANDLEINFO, *PSHAREDCLIPBOARDURILISTHANDLEINFO;746 } SHCLURILISTHANDLEINFO, *PSHCLURILISTHANDLEINFO; 747 747 748 748 /** … … 750 750 * This is using to map own (local) handles to the underlying file system. 751 751 */ 752 typedef struct _SH AREDCLIPBOARDURIOBJHANDLEINFO752 typedef struct _SHCLURIOBJHANDLEINFO 753 753 { 754 754 /** The list node. */ 755 755 RTLISTNODE Node; 756 756 /** The object's handle. */ 757 SH AREDCLIPBOARDOBJHANDLE hObj;757 SHCLOBJHANDLE hObj; 758 758 /** Type of object handle. */ 759 SH AREDCLIPBOARDURIOBJTYPE enmType;759 SHCLURIOBJTYPE enmType; 760 760 /** Absolute local path of the object. */ 761 761 char *pszPathLocalAbs; … … 772 772 } Local; 773 773 } u; 774 } SH AREDCLIPBOARDURIOBJHANDLEINFO, *PSHAREDCLIPBOARDURIOBJHANDLEINFO;774 } SHCLURIOBJHANDLEINFO, *PSHCLURIOBJHANDLEINFO; 775 775 776 776 /** 777 777 * Structure for keeping a single root list entry. 778 778 */ 779 typedef struct _SH AREDCLIPBOARDURILISTROOT779 typedef struct _SHCLURILISTROOT 780 780 { 781 781 /** The list node. */ … … 783 783 /** Absolute path of entry. */ 784 784 char *pszPathAbs; 785 } SH AREDCLIPBOARDURILISTROOT, *PSHAREDCLIPBOARDURILISTROOT;785 } SHCLURILISTROOT, *PSHCLURILISTROOT; 786 786 787 787 /** … … 789 789 * Everything in here will be part of a saved state (later). 790 790 */ 791 typedef struct _SH AREDCLIPBOARDURITRANSFERSTATE791 typedef struct _SHCLURITRANSFERSTATE 792 792 { 793 793 /** The transfer's (local) ID. */ 794 794 uint16_t uID; 795 795 /** The transfer's current status. */ 796 SH AREDCLIPBOARDURITRANSFERSTATUS enmStatus;796 SHCLURITRANSFERSTATUS enmStatus; 797 797 /** The transfer's direction. */ 798 SH AREDCLIPBOARDURITRANSFERDIR enmDir;798 SHCLURITRANSFERDIR enmDir; 799 799 /** The transfer's source. */ 800 SH AREDCLIPBOARDSOURCE enmSource;801 } SH AREDCLIPBOARDURITRANSFERSTATE, *PSHAREDCLIPBOARDURITRANSFERSTATE;802 803 struct _SH AREDCLIPBOARDURITRANSFER;804 typedef struct _SH AREDCLIPBOARDURITRANSFER *PSHAREDCLIPBOARDURITRANSFER;800 SHCLSOURCE enmSource; 801 } SHCLURITRANSFERSTATE, *PSHCLURITRANSFERSTATE; 802 803 struct _SHCLURITRANSFER; 804 typedef struct _SHCLURITRANSFER *PSHCLURITRANSFER; 805 805 806 806 /** … … 808 808 * This is handed in to the provider implementation callbacks. 809 809 */ 810 typedef struct _SH AREDCLIPBOARDPROVIDERCTX810 typedef struct _SHCLPROVIDERCTX 811 811 { 812 812 /** Pointer to the related URI transfer. */ 813 PSH AREDCLIPBOARDURITRANSFER pTransfer;813 PSHCLURITRANSFER pTransfer; 814 814 /** User-defined data pointer. Can be NULL if not needed. */ 815 815 void *pvUser; 816 } SH AREDCLIPBOARDPROVIDERCTX, *PSHAREDCLIPBOARDPROVIDERCTX;816 } SHCLPROVIDERCTX, *PSHCLPROVIDERCTX; 817 817 818 818 /** Defines an URI clipboard provider function declaration with additional parameters. */ 819 #define SH AREDCLIPBOARDPROVIDERFUNCDECL(a_Name, ...) \820 typedef DECLCALLBACK(int) RT_CONCAT(FNSH AREDCLIPBOARDPROVIDER, a_Name)(PSHAREDCLIPBOARDPROVIDERCTX, __VA_ARGS__); \821 typedef RT_CONCAT(FNSH AREDCLIPBOARDPROVIDER, a_Name) RT_CONCAT(*PFNSHAREDCLIPBOARDPROVIDER, a_Name);819 #define SHCLPROVIDERFUNCDECL(a_Name, ...) \ 820 typedef DECLCALLBACK(int) RT_CONCAT(FNSHCLPROVIDER, a_Name)(PSHCLPROVIDERCTX, __VA_ARGS__); \ 821 typedef RT_CONCAT(FNSHCLPROVIDER, a_Name) RT_CONCAT(*PFNSHCLPROVIDER, a_Name); 822 822 823 823 /** Defines an URI clipboard provider function declaration with additional parameters. */ 824 #define SH AREDCLIPBOARDPROVIDERFUNCDECLRET(a_Ret, a_Name, ...) \825 typedef DECLCALLBACK(a_Ret) RT_CONCAT(FNSH AREDCLIPBOARDPROVIDER, a_Name)(PSHAREDCLIPBOARDPROVIDERCTX, __VA_ARGS__); \826 typedef RT_CONCAT(FNSH AREDCLIPBOARDPROVIDER, a_Name) RT_CONCAT(*PFNSHAREDCLIPBOARDPROVIDER, a_Name);824 #define SHCLPROVIDERFUNCDECLRET(a_Ret, a_Name, ...) \ 825 typedef DECLCALLBACK(a_Ret) RT_CONCAT(FNSHCLPROVIDER, a_Name)(PSHCLPROVIDERCTX, __VA_ARGS__); \ 826 typedef RT_CONCAT(FNSHCLPROVIDER, a_Name) RT_CONCAT(*PFNSHCLPROVIDER, a_Name); 827 827 828 828 /** Defines an URI clipboard provider function declaration (no additional parameters). */ 829 #define SH AREDCLIPBOARDPROVIDERFUNCDECLVOID(a_Name) \830 typedef DECLCALLBACK(int) RT_CONCAT(FNSH AREDCLIPBOARDPROVIDER, a_Name)(PSHAREDCLIPBOARDPROVIDERCTX); \831 typedef RT_CONCAT(FNSH AREDCLIPBOARDPROVIDER, a_Name) RT_CONCAT(*PFNSHAREDCLIPBOARDPROVIDER, a_Name);829 #define SHCLPROVIDERFUNCDECLVOID(a_Name) \ 830 typedef DECLCALLBACK(int) RT_CONCAT(FNSHCLPROVIDER, a_Name)(PSHCLPROVIDERCTX); \ 831 typedef RT_CONCAT(FNSHCLPROVIDER, a_Name) RT_CONCAT(*PFNSHCLPROVIDER, a_Name); 832 832 833 833 /** Declares a URI clipboard provider function member. */ 834 #define SH AREDCLIPBOARDPROVIDERFUNCMEMBER(a_Name, a_Member) \835 RT_CONCAT(PFNSH AREDCLIPBOARDPROVIDER, a_Name) a_Member;836 837 SH AREDCLIPBOARDPROVIDERFUNCDECLVOID(TRANSFEROPEN)838 SH AREDCLIPBOARDPROVIDERFUNCDECLVOID(TRANSFERCLOSE)839 SH AREDCLIPBOARDPROVIDERFUNCDECL(GETROOTS, PVBOXCLIPBOARDROOTLIST *ppRootList)840 SH AREDCLIPBOARDPROVIDERFUNCDECL(LISTOPEN, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms, PSHAREDCLIPBOARDLISTHANDLE phList)841 SH AREDCLIPBOARDPROVIDERFUNCDECL(LISTCLOSE, SHAREDCLIPBOARDLISTHANDLE hList)842 SH AREDCLIPBOARDPROVIDERFUNCDECL(LISTHDRREAD, SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)843 SH AREDCLIPBOARDPROVIDERFUNCDECL(LISTHDRWRITE, SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)844 SH AREDCLIPBOARDPROVIDERFUNCDECL(LISTENTRYREAD, SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pEntry)845 SH AREDCLIPBOARDPROVIDERFUNCDECL(LISTENTRYWRITE, SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pEntry)846 SH AREDCLIPBOARDPROVIDERFUNCDECL(OBJOPEN, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms, PSHAREDCLIPBOARDOBJHANDLE phObj)847 SH AREDCLIPBOARDPROVIDERFUNCDECL(OBJCLOSE, SHAREDCLIPBOARDOBJHANDLE hObj)848 SH AREDCLIPBOARDPROVIDERFUNCDECL(OBJREAD, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead)849 SH AREDCLIPBOARDPROVIDERFUNCDECL(OBJWRITE, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten)834 #define SHCLPROVIDERFUNCMEMBER(a_Name, a_Member) \ 835 RT_CONCAT(PFNSHCLPROVIDER, a_Name) a_Member; 836 837 SHCLPROVIDERFUNCDECLVOID(TRANSFEROPEN) 838 SHCLPROVIDERFUNCDECLVOID(TRANSFERCLOSE) 839 SHCLPROVIDERFUNCDECL(GETROOTS, PSHCLROOTLIST *ppRootList) 840 SHCLPROVIDERFUNCDECL(LISTOPEN, PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList) 841 SHCLPROVIDERFUNCDECL(LISTCLOSE, SHCLLISTHANDLE hList) 842 SHCLPROVIDERFUNCDECL(LISTHDRREAD, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr) 843 SHCLPROVIDERFUNCDECL(LISTHDRWRITE, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr) 844 SHCLPROVIDERFUNCDECL(LISTENTRYREAD, SHCLLISTHANDLE hList, PSHCLLISTENTRY pEntry) 845 SHCLPROVIDERFUNCDECL(LISTENTRYWRITE, SHCLLISTHANDLE hList, PSHCLLISTENTRY pEntry) 846 SHCLPROVIDERFUNCDECL(OBJOPEN, PSHCLOBJOPENCREATEPARMS pCreateParms, PSHCLOBJHANDLE phObj) 847 SHCLPROVIDERFUNCDECL(OBJCLOSE, SHCLOBJHANDLE hObj) 848 SHCLPROVIDERFUNCDECL(OBJREAD, SHCLOBJHANDLE hObj, void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead) 849 SHCLPROVIDERFUNCDECL(OBJWRITE, SHCLOBJHANDLE hObj, void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten) 850 850 851 851 /** 852 852 * Shared Clipboard URI provider interface table. 853 853 */ 854 typedef struct _SH AREDCLIPBOARDPROVIDERINTERFACE855 { 856 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(TRANSFEROPEN, pfnTransferOpen)857 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(TRANSFERCLOSE, pfnTransferClose)858 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(GETROOTS, pfnGetRoots)859 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(LISTOPEN, pfnListOpen)860 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(LISTCLOSE, pfnListClose)861 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(LISTHDRREAD, pfnListHdrRead)862 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(LISTHDRWRITE, pfnListHdrWrite)863 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(LISTENTRYREAD, pfnListEntryRead)864 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(LISTENTRYWRITE, pfnListEntryWrite)865 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(OBJOPEN, pfnObjOpen)866 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(OBJCLOSE, pfnObjClose)867 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(OBJREAD, pfnObjRead)868 SH AREDCLIPBOARDPROVIDERFUNCMEMBER(OBJWRITE, pfnObjWrite)869 } SH AREDCLIPBOARDPROVIDERINTERFACE, *PSHAREDCLIPBOARDPROVIDERINTERFACE;854 typedef struct _SHCLPROVIDERINTERFACE 855 { 856 SHCLPROVIDERFUNCMEMBER(TRANSFEROPEN, pfnTransferOpen) 857 SHCLPROVIDERFUNCMEMBER(TRANSFERCLOSE, pfnTransferClose) 858 SHCLPROVIDERFUNCMEMBER(GETROOTS, pfnGetRoots) 859 SHCLPROVIDERFUNCMEMBER(LISTOPEN, pfnListOpen) 860 SHCLPROVIDERFUNCMEMBER(LISTCLOSE, pfnListClose) 861 SHCLPROVIDERFUNCMEMBER(LISTHDRREAD, pfnListHdrRead) 862 SHCLPROVIDERFUNCMEMBER(LISTHDRWRITE, pfnListHdrWrite) 863 SHCLPROVIDERFUNCMEMBER(LISTENTRYREAD, pfnListEntryRead) 864 SHCLPROVIDERFUNCMEMBER(LISTENTRYWRITE, pfnListEntryWrite) 865 SHCLPROVIDERFUNCMEMBER(OBJOPEN, pfnObjOpen) 866 SHCLPROVIDERFUNCMEMBER(OBJCLOSE, pfnObjClose) 867 SHCLPROVIDERFUNCMEMBER(OBJREAD, pfnObjRead) 868 SHCLPROVIDERFUNCMEMBER(OBJWRITE, pfnObjWrite) 869 } SHCLPROVIDERINTERFACE, *PSHCLPROVIDERINTERFACE; 870 870 871 871 /** 872 872 * Structure for the Shared Clipboard provider creation context. 873 873 */ 874 typedef struct _SH AREDCLIPBOARDPROVIDERCREATIONCTX874 typedef struct _SHCLPROVIDERCREATIONCTX 875 875 { 876 876 /** Specifies what the source of the provider is. */ 877 SH AREDCLIPBOARDSOURCE enmSource;877 SHCLSOURCE enmSource; 878 878 /** The provider interface table. */ 879 SH AREDCLIPBOARDPROVIDERINTERFACE Interface;879 SHCLPROVIDERINTERFACE Interface; 880 880 /** Provider callback data. */ 881 881 void *pvUser; 882 } SH AREDCLIPBOARDPROVIDERCREATIONCTX, *PSHAREDCLIPBOARDPROVIDERCREATIONCTX;883 884 struct _SH AREDCLIPBOARDURITRANSFER;885 typedef _SH AREDCLIPBOARDURITRANSFER *PSHAREDCLIPBOARDURITRANSFER;882 } SHCLPROVIDERCREATIONCTX, *PSHCLPROVIDERCREATIONCTX; 883 884 struct _SHCLURITRANSFER; 885 typedef _SHCLURITRANSFER *PSHCLURITRANSFER; 886 886 887 887 /** 888 888 * Structure for storing URI transfer callback data. 889 889 */ 890 typedef struct _SH AREDCLIPBOARDURITRANSFERCALLBACKDATA890 typedef struct _SHCLURITRANSFERCALLBACKDATA 891 891 { 892 892 /** Pointer to related URI transfer. */ 893 PSH AREDCLIPBOARDURITRANSFER pTransfer;893 PSHCLURITRANSFER pTransfer; 894 894 /** Saved user pointer. */ 895 895 void *pvUser; 896 } SH AREDCLIPBOARDURITRANSFERCALLBACKDATA, *PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA;897 898 #define SH AREDCLIPBOARDTRANSFERCALLBACKDECLVOID(a_Name) \899 typedef DECLCALLBACK(void) RT_CONCAT(FNSH AREDCLIPBOARDCALLBACK, a_Name)(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData); \900 typedef RT_CONCAT(FNSH AREDCLIPBOARDCALLBACK, a_Name) RT_CONCAT(*PFNSHAREDCLIPBOARDCALLBACK, a_Name);901 902 #define SH AREDCLIPBOARDTRANSFERCALLBACKDECL(a_Name, ...) \903 typedef DECLCALLBACK(void) RT_CONCAT(FNSH AREDCLIPBOARDCALLBACK, a_Name)(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData, __VA_ARGS__); \904 typedef RT_CONCAT(FNSH AREDCLIPBOARDCALLBACK, a_Name) RT_CONCAT(*PFNSHAREDCLIPBOARDCALLBACK, a_Name);905 906 #define SH AREDCLIPBOARDTRANSFERCALLBACKMEMBER(a_Name, a_Member) \907 RT_CONCAT(PFNSH AREDCLIPBOARDCALLBACK, a_Name) a_Member;908 909 SH AREDCLIPBOARDTRANSFERCALLBACKDECLVOID(TRANSFERPREPARE)910 SH AREDCLIPBOARDTRANSFERCALLBACKDECLVOID(TRANSFERSTARTED)911 SH AREDCLIPBOARDTRANSFERCALLBACKDECLVOID(LISTHEADERCOMPLETE)912 SH AREDCLIPBOARDTRANSFERCALLBACKDECLVOID(LISTENTRYCOMPLETE)913 SH AREDCLIPBOARDTRANSFERCALLBACKDECL (TRANSFERCOMPLETE, int rc)914 SH AREDCLIPBOARDTRANSFERCALLBACKDECLVOID(TRANSFERCANCELED)915 SH AREDCLIPBOARDTRANSFERCALLBACKDECL (TRANSFERERROR, int rc)896 } SHCLURITRANSFERCALLBACKDATA, *PSHCLURITRANSFERCALLBACKDATA; 897 898 #define SHCLTRANSFERCALLBACKDECLVOID(a_Name) \ 899 typedef DECLCALLBACK(void) RT_CONCAT(FNSHCLCALLBACK, a_Name)(PSHCLURITRANSFERCALLBACKDATA pData); \ 900 typedef RT_CONCAT(FNSHCLCALLBACK, a_Name) RT_CONCAT(*PFNSHCLCALLBACK, a_Name); 901 902 #define SHCLTRANSFERCALLBACKDECL(a_Name, ...) \ 903 typedef DECLCALLBACK(void) RT_CONCAT(FNSHCLCALLBACK, a_Name)(PSHCLURITRANSFERCALLBACKDATA pData, __VA_ARGS__); \ 904 typedef RT_CONCAT(FNSHCLCALLBACK, a_Name) RT_CONCAT(*PFNSHCLCALLBACK, a_Name); 905 906 #define SHCLTRANSFERCALLBACKMEMBER(a_Name, a_Member) \ 907 RT_CONCAT(PFNSHCLCALLBACK, a_Name) a_Member; 908 909 SHCLTRANSFERCALLBACKDECLVOID(TRANSFERPREPARE) 910 SHCLTRANSFERCALLBACKDECLVOID(TRANSFERSTARTED) 911 SHCLTRANSFERCALLBACKDECLVOID(LISTHEADERCOMPLETE) 912 SHCLTRANSFERCALLBACKDECLVOID(LISTENTRYCOMPLETE) 913 SHCLTRANSFERCALLBACKDECL (TRANSFERCOMPLETE, int rc) 914 SHCLTRANSFERCALLBACKDECLVOID(TRANSFERCANCELED) 915 SHCLTRANSFERCALLBACKDECL (TRANSFERERROR, int rc) 916 916 917 917 /** … … 919 919 * All callbacks are optional and therefore can be NULL. 920 920 */ 921 typedef struct _SH AREDCLIPBOARDURITRANSFERCALLBACKS921 typedef struct _SHCLURITRANSFERCALLBACKS 922 922 { 923 923 /** Saved user pointer. */ 924 924 void *pvUser; 925 925 /** Function pointer, called when the transfer is going to be prepared. */ 926 SH AREDCLIPBOARDTRANSFERCALLBACKMEMBER(TRANSFERPREPARE, pfnTransferPrepare)926 SHCLTRANSFERCALLBACKMEMBER(TRANSFERPREPARE, pfnTransferPrepare) 927 927 /** Function pointer, called when the transfer has been started. */ 928 SH AREDCLIPBOARDTRANSFERCALLBACKMEMBER(TRANSFERSTARTED, pfnTransferStarted)928 SHCLTRANSFERCALLBACKMEMBER(TRANSFERSTARTED, pfnTransferStarted) 929 929 /** Function pointer, called when reading / writing the list header is complete. */ 930 SH AREDCLIPBOARDTRANSFERCALLBACKMEMBER(LISTHEADERCOMPLETE, pfnListHeaderComplete)930 SHCLTRANSFERCALLBACKMEMBER(LISTHEADERCOMPLETE, pfnListHeaderComplete) 931 931 /** Function pointer, called when reading / writing a list entry is complete. */ 932 SH AREDCLIPBOARDTRANSFERCALLBACKMEMBER(LISTENTRYCOMPLETE, pfnListEntryComplete)932 SHCLTRANSFERCALLBACKMEMBER(LISTENTRYCOMPLETE, pfnListEntryComplete) 933 933 /** Function pointer, called when the transfer is complete. */ 934 SH AREDCLIPBOARDTRANSFERCALLBACKMEMBER(TRANSFERCOMPLETE, pfnTransferComplete)934 SHCLTRANSFERCALLBACKMEMBER(TRANSFERCOMPLETE, pfnTransferComplete) 935 935 /** Function pointer, called when the transfer has been canceled. */ 936 SH AREDCLIPBOARDTRANSFERCALLBACKMEMBER(TRANSFERCANCELED, pfnTransferCanceled)936 SHCLTRANSFERCALLBACKMEMBER(TRANSFERCANCELED, pfnTransferCanceled) 937 937 /** Function pointer, called when transfer resulted in an unrecoverable error. */ 938 SH AREDCLIPBOARDTRANSFERCALLBACKMEMBER(TRANSFERERROR, pfnTransferError)939 } SH AREDCLIPBOARDURITRANSFERCALLBACKS, *PSHAREDCLIPBOARDURITRANSFERCALLBACKS;938 SHCLTRANSFERCALLBACKMEMBER(TRANSFERERROR, pfnTransferError) 939 } SHCLURITRANSFERCALLBACKS, *PSHCLURITRANSFERCALLBACKS; 940 940 941 941 /** 942 942 * Structure for thread-related members for a single URI transfer. 943 943 */ 944 typedef struct _SH AREDCLIPBOARDURITRANSFERTHREAD944 typedef struct _SHCLURITRANSFERTHREAD 945 945 { 946 946 /** Thread handle for the reading / writing thread. … … 953 953 /** Thread cancelled flag / indicator. */ 954 954 volatile bool fCancelled; 955 } SH AREDCLIPBOARDURITRANSFERTHREAD, *PSHAREDCLIPBOARDURITRANSFERTHREAD;955 } SHCLURITRANSFERTHREAD, *PSHCLURITRANSFERTHREAD; 956 956 957 957 /** … … 960 960 ** @todo Not yet thread safe. 961 961 */ 962 typedef struct _SH AREDCLIPBOARDURITRANSFER962 typedef struct _SHCLURITRANSFER 963 963 { 964 964 /** The node member for using this struct in a RTList. */ … … 967 967 RTCRITSECT CritSect; 968 968 /** The transfer's state (for SSM, later). */ 969 SH AREDCLIPBOARDURITRANSFERSTATE State;969 SHCLURITRANSFERSTATE State; 970 970 /** Timeout (in ms) for waiting of events. Default is 30s. */ 971 971 RTMSINTERVAL uTimeoutMs; … … 975 975 uint32_t cbMaxChunkSize; 976 976 /** The transfer's own event source. */ 977 SH AREDCLIPBOARDEVENTSOURCE Events;977 SHCLEVENTSOURCE Events; 978 978 /** Next upcoming list handle. */ 979 SH AREDCLIPBOARDLISTHANDLE uListHandleNext;979 SHCLLISTHANDLE uListHandleNext; 980 980 /** List of all list handles elated to this transfer. */ 981 981 RTLISTANCHOR lstList; … … 985 985 RTLISTANCHOR lstRoots; 986 986 /** Next upcoming object handle. */ 987 SH AREDCLIPBOARDOBJHANDLE uObjHandleNext;987 SHCLOBJHANDLE uObjHandleNext; 988 988 /** Map of all objects handles related to this transfer. */ 989 989 RTLISTANCHOR lstObj; … … 992 992 * On the host this area ID gets shared (maintained / locked) across all VMs via VBoxSVC. */ 993 993 SharedClipboardArea *pArea; 994 SH AREDCLIPBOARDPROVIDERCTX ProviderCtx;994 SHCLPROVIDERCTX ProviderCtx; 995 995 /** The transfer's provider interface. */ 996 SH AREDCLIPBOARDPROVIDERINTERFACE ProviderIface;996 SHCLPROVIDERINTERFACE ProviderIface; 997 997 /** The transfer's (optional) callback table. */ 998 SH AREDCLIPBOARDURITRANSFERCALLBACKS Callbacks;998 SHCLURITRANSFERCALLBACKS Callbacks; 999 999 /** Opaque pointer to implementation-specific parameters. */ 1000 1000 void *pvUser; … … 1002 1002 size_t cbUser; 1003 1003 /** Contains thread-related attributes. */ 1004 SH AREDCLIPBOARDURITRANSFERTHREAD Thread;1005 } SH AREDCLIPBOARDURITRANSFER, *PSHAREDCLIPBOARDURITRANSFER;1004 SHCLURITRANSFERTHREAD Thread; 1005 } SHCLURITRANSFER, *PSHCLURITRANSFER; 1006 1006 1007 1007 /** 1008 1008 * Structure for keeping URI clipboard information around. 1009 1009 */ 1010 typedef struct _SH AREDCLIPBOARDURICTX1010 typedef struct _SHCLURICTX 1011 1011 { 1012 1012 /** Critical section for serializing access. */ … … 1022 1022 /** Number of total transfers (in list). */ 1023 1023 uint32_t cTransfers; 1024 } SH AREDCLIPBOARDURICTX, *PSHAREDCLIPBOARDURICTX;1025 1026 int SharedClipboardURIObjCtxInit(PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx);1027 void SharedClipboardURIObjCtxDestroy(PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx);1028 bool SharedClipboardURIObjCtxIsValid(PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx);1029 1030 int SharedClipboardURIObjectOpenParmsInit(P VBOXCLIPBOARDOBJOPENCREATEPARMS pParms);1031 int SharedClipboardURIObjectOpenParmsCopy(P VBOXCLIPBOARDOBJOPENCREATEPARMS pParmsDst, PVBOXCLIPBOARDOBJOPENCREATEPARMS pParmsSrc);1032 void SharedClipboardURIObjectOpenParmsDestroy(P VBOXCLIPBOARDOBJOPENCREATEPARMS pParms);1033 1034 int SharedClipboardURIObjectOpen(PSH AREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDOBJOPENCREATEPARMS pOpenCreateParms,1035 PSH AREDCLIPBOARDOBJHANDLE phObj);1036 int SharedClipboardURIObjectClose(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDOBJHANDLE hObj);1037 int SharedClipboardURIObjectRead(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead, uint32_t fFlags);1038 int SharedClipboardURIObjectWrite(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten, uint32_t fFlags);1039 1040 P VBOXCLIPBOARDOBJDATACHUNK SharedClipboardURIObjectDataChunkDup(PVBOXCLIPBOARDOBJDATACHUNK pDataChunk);1041 void SharedClipboardURIObjectDataChunkDestroy(P VBOXCLIPBOARDOBJDATACHUNK pDataChunk);1042 void SharedClipboardURIObjectDataChunkFree(P VBOXCLIPBOARDOBJDATACHUNK pDataChunk);1043 1044 int SharedClipboardURITransferCreate(SH AREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,1045 PSH AREDCLIPBOARDURITRANSFER *ppTransfer);1046 int SharedClipboardURITransferDestroy(PSH AREDCLIPBOARDURITRANSFER pTransfer);1047 1048 int SharedClipboardURITransferOpen(PSH AREDCLIPBOARDURITRANSFER pTransfer);1049 int SharedClipboardURITransferClose(PSH AREDCLIPBOARDURITRANSFER pTransfer);1050 1051 int SharedClipboardURITransferListOpen(PSH AREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms,1052 PSH AREDCLIPBOARDLISTHANDLE phList);1053 int SharedClipboardURITransferListClose(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList);1054 int SharedClipboardURITransferListGetHeader(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,1055 P VBOXCLIPBOARDLISTHDR pHdr);1056 PSH AREDCLIPBOARDURITRANSFEROBJ SharedClipboardURITransferListGetObj(PSHAREDCLIPBOARDURITRANSFER pTransfer,1057 SH AREDCLIPBOARDLISTHANDLE hList, uint64_t uIdx);1058 int SharedClipboardURITransferListRead(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,1059 P VBOXCLIPBOARDLISTENTRY pEntry);1060 int SharedClipboardURITransferListWrite(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,1061 P VBOXCLIPBOARDLISTENTRY pEntry);1062 bool SharedClipboardURITransferListHandleIsValid(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList);1063 1064 int SharedClipboardURITransferPrepare(PSH AREDCLIPBOARDURITRANSFER pTransfer);1065 int SharedClipboardURITransferSetInterface(PSH AREDCLIPBOARDURITRANSFER pTransfer,1066 PSH AREDCLIPBOARDPROVIDERCREATIONCTX pCreationCtx);1067 int SharedClipboardURILTransferSetRoots(PSH AREDCLIPBOARDURITRANSFER pTransfer, const char *pszRoots, size_t cbRoots);1068 void SharedClipboardURITransferReset(PSH AREDCLIPBOARDURITRANSFER pTransfer);1069 SharedClipboardArea *SharedClipboardURITransferGetArea(PSH AREDCLIPBOARDURITRANSFER pTransfer);1070 1071 uint32_t SharedClipboardURILTransferRootsCount(PSH AREDCLIPBOARDURITRANSFER pTransfer);1072 int SharedClipboardURILTransferRootsEntry(PSH AREDCLIPBOARDURITRANSFER pTransfer, uint64_t uIndex, PVBOXCLIPBOARDROOTLISTENTRY pEntry);1073 int SharedClipboardURILTransferRootsAsList(PSH AREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDROOTLIST *ppRootList);1074 1075 SH AREDCLIPBOARDSOURCE SharedClipboardURITransferGetSource(PSHAREDCLIPBOARDURITRANSFER pTransfer);1076 SH AREDCLIPBOARDURITRANSFERSTATUS SharedClipboardURITransferGetStatus(PSHAREDCLIPBOARDURITRANSFER pTransfer);1077 int SharedClipboardURITransferHandleReply(PSH AREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDREPLY pReply);1078 int SharedClipboardURITransferRun(PSH AREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser);1079 void SharedClipboardURITransferSetCallbacks(PSH AREDCLIPBOARDURITRANSFER pTransfer,1080 PSH AREDCLIPBOARDURITRANSFERCALLBACKS pCallbacks);1081 1082 int SharedClipboardURITransferRead(PSH AREDCLIPBOARDURITRANSFER pTransfer);1083 int SharedClipboardURITransferReadObjects(PSH AREDCLIPBOARDURITRANSFER pTransfer);1084 1085 int SharedClipboardURITransferWrite(PSH AREDCLIPBOARDURITRANSFER pTransfer);1086 int SharedClipboardURITransferWriteObjects(PSH AREDCLIPBOARDURITRANSFER pTransfer);1087 1088 int SharedClipboardURICtxInit(PSH AREDCLIPBOARDURICTX pURI);1089 void SharedClipboardURICtxDestroy(PSH AREDCLIPBOARDURICTX pURI);1090 void SharedClipboardURICtxReset(PSH AREDCLIPBOARDURICTX pURI);1091 PSH AREDCLIPBOARDURITRANSFER SharedClipboardURICtxGetTransfer(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx);1092 uint32_t SharedClipboardURICtxGetRunningTransfers(PSH AREDCLIPBOARDURICTX pURI);1093 uint32_t SharedClipboardURICtxGetTotalTransfers(PSH AREDCLIPBOARDURICTX pURI);1094 void SharedClipboardURICtxTransfersCleanup(PSH AREDCLIPBOARDURICTX pURI);1095 bool SharedClipboardURICtxTransfersMaximumReached(PSH AREDCLIPBOARDURICTX pURI);1096 int SharedClipboardURICtxTransferAdd(PSH AREDCLIPBOARDURICTX pURI, PSHAREDCLIPBOARDURITRANSFER pTransfer);1097 int SharedClipboardURICtxTransferRemove(PSH AREDCLIPBOARDURICTX pURI, PSHAREDCLIPBOARDURITRANSFER pTransfer);1098 1099 void SharedClipboardFsObjFromIPRT(PSH AREDCLIPBOARDFSOBJINFO pDst, PCRTFSOBJINFO pSrc);1024 } SHCLURICTX, *PSHCLURICTX; 1025 1026 int SharedClipboardURIObjCtxInit(PSHCLCLIENTURIOBJCTX pObjCtx); 1027 void SharedClipboardURIObjCtxDestroy(PSHCLCLIENTURIOBJCTX pObjCtx); 1028 bool SharedClipboardURIObjCtxIsValid(PSHCLCLIENTURIOBJCTX pObjCtx); 1029 1030 int SharedClipboardURIObjectOpenParmsInit(PSHCLOBJOPENCREATEPARMS pParms); 1031 int SharedClipboardURIObjectOpenParmsCopy(PSHCLOBJOPENCREATEPARMS pParmsDst, PSHCLOBJOPENCREATEPARMS pParmsSrc); 1032 void SharedClipboardURIObjectOpenParmsDestroy(PSHCLOBJOPENCREATEPARMS pParms); 1033 1034 int SharedClipboardURIObjectOpen(PSHCLURITRANSFER pTransfer, PSHCLOBJOPENCREATEPARMS pOpenCreateParms, 1035 PSHCLOBJHANDLE phObj); 1036 int SharedClipboardURIObjectClose(PSHCLURITRANSFER pTransfer, SHCLOBJHANDLE hObj); 1037 int SharedClipboardURIObjectRead(PSHCLURITRANSFER pTransfer, SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead, uint32_t fFlags); 1038 int SharedClipboardURIObjectWrite(PSHCLURITRANSFER pTransfer, SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten, uint32_t fFlags); 1039 1040 PSHCLOBJDATACHUNK SharedClipboardURIObjectDataChunkDup(PSHCLOBJDATACHUNK pDataChunk); 1041 void SharedClipboardURIObjectDataChunkDestroy(PSHCLOBJDATACHUNK pDataChunk); 1042 void SharedClipboardURIObjectDataChunkFree(PSHCLOBJDATACHUNK pDataChunk); 1043 1044 int SharedClipboardURITransferCreate(SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource, 1045 PSHCLURITRANSFER *ppTransfer); 1046 int SharedClipboardURITransferDestroy(PSHCLURITRANSFER pTransfer); 1047 1048 int SharedClipboardURITransferOpen(PSHCLURITRANSFER pTransfer); 1049 int SharedClipboardURITransferClose(PSHCLURITRANSFER pTransfer); 1050 1051 int SharedClipboardURITransferListOpen(PSHCLURITRANSFER pTransfer, PSHCLLISTOPENPARMS pOpenParms, 1052 PSHCLLISTHANDLE phList); 1053 int SharedClipboardURITransferListClose(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList); 1054 int SharedClipboardURITransferListGetHeader(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList, 1055 PSHCLLISTHDR pHdr); 1056 PSHCLURITRANSFEROBJ SharedClipboardURITransferListGetObj(PSHCLURITRANSFER pTransfer, 1057 SHCLLISTHANDLE hList, uint64_t uIdx); 1058 int SharedClipboardURITransferListRead(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList, 1059 PSHCLLISTENTRY pEntry); 1060 int SharedClipboardURITransferListWrite(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList, 1061 PSHCLLISTENTRY pEntry); 1062 bool SharedClipboardURITransferListHandleIsValid(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList); 1063 1064 int SharedClipboardURITransferPrepare(PSHCLURITRANSFER pTransfer); 1065 int SharedClipboardURITransferSetInterface(PSHCLURITRANSFER pTransfer, 1066 PSHCLPROVIDERCREATIONCTX pCreationCtx); 1067 int SharedClipboardURILTransferSetRoots(PSHCLURITRANSFER pTransfer, const char *pszRoots, size_t cbRoots); 1068 void SharedClipboardURITransferReset(PSHCLURITRANSFER pTransfer); 1069 SharedClipboardArea *SharedClipboardURITransferGetArea(PSHCLURITRANSFER pTransfer); 1070 1071 uint32_t SharedClipboardURILTransferRootsCount(PSHCLURITRANSFER pTransfer); 1072 int SharedClipboardURILTransferRootsEntry(PSHCLURITRANSFER pTransfer, uint64_t uIndex, PSHCLROOTLISTENTRY pEntry); 1073 int SharedClipboardURILTransferRootsAsList(PSHCLURITRANSFER pTransfer, PSHCLROOTLIST *ppRootList); 1074 1075 SHCLSOURCE SharedClipboardURITransferGetSource(PSHCLURITRANSFER pTransfer); 1076 SHCLURITRANSFERSTATUS SharedClipboardURITransferGetStatus(PSHCLURITRANSFER pTransfer); 1077 int SharedClipboardURITransferHandleReply(PSHCLURITRANSFER pTransfer, PSHCLREPLY pReply); 1078 int SharedClipboardURITransferRun(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser); 1079 void SharedClipboardURITransferSetCallbacks(PSHCLURITRANSFER pTransfer, 1080 PSHCLURITRANSFERCALLBACKS pCallbacks); 1081 1082 int SharedClipboardURITransferRead(PSHCLURITRANSFER pTransfer); 1083 int SharedClipboardURITransferReadObjects(PSHCLURITRANSFER pTransfer); 1084 1085 int SharedClipboardURITransferWrite(PSHCLURITRANSFER pTransfer); 1086 int SharedClipboardURITransferWriteObjects(PSHCLURITRANSFER pTransfer); 1087 1088 int SharedClipboardURICtxInit(PSHCLURICTX pURI); 1089 void SharedClipboardURICtxDestroy(PSHCLURICTX pURI); 1090 void SharedClipboardURICtxReset(PSHCLURICTX pURI); 1091 PSHCLURITRANSFER SharedClipboardURICtxGetTransfer(PSHCLURICTX pURI, uint32_t uIdx); 1092 uint32_t SharedClipboardURICtxGetRunningTransfers(PSHCLURICTX pURI); 1093 uint32_t SharedClipboardURICtxGetTotalTransfers(PSHCLURICTX pURI); 1094 void SharedClipboardURICtxTransfersCleanup(PSHCLURICTX pURI); 1095 bool SharedClipboardURICtxTransfersMaximumReached(PSHCLURICTX pURI); 1096 int SharedClipboardURICtxTransferAdd(PSHCLURICTX pURI, PSHCLURITRANSFER pTransfer); 1097 int SharedClipboardURICtxTransferRemove(PSHCLURICTX pURI, PSHCLURITRANSFER pTransfer); 1098 1099 void SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO pDst, PCRTFSOBJINFO pSrc); 1100 1100 1101 1101 bool SharedClipboardMIMEHasFileURLs(const char *pcszFormat, size_t cchFormatMax); -
trunk/include/VBox/GuestHost/SharedClipboard-win.h
r80444 r80662 83 83 * If the new API is not available, those function pointer are NULL. 84 84 */ 85 typedef struct _ VBOXCLIPBOARDWINAPINEW85 typedef struct _SHCLWINAPINEW 86 86 { 87 87 PFNADDCLIPBOARDFORMATLISTENER pfnAddClipboardFormatListener; 88 88 PFNREMOVECLIPBOARDFORMATLISTENER pfnRemoveClipboardFormatListener; 89 } VBOXCLIPBOARDWINAPINEW, *PVBOXCLIPBOARDWINAPINEW;89 } SHCLWINAPINEW, *PSHCLWINAPINEW; 90 90 91 91 /** 92 92 * Structure for keeping variables which are needed to drive the old clipboard API. 93 93 */ 94 typedef struct _ VBOXCLIPBOARDWINAPIOLD94 typedef struct _SHCLWINAPIOLD 95 95 { 96 96 /** Timer ID for the refresh timer. */ … … 98 98 /** Whether "pinging" the clipboard chain currently is in progress or not. */ 99 99 bool fCBChainPingInProcess; 100 } VBOXCLIPBOARDWINAPIOLD, *PVBOXCLIPBOARDWINAPIOLD;100 } SHCLWINAPIOLD, *PSHCLWINAPIOLD; 101 101 102 102 /** 103 103 * Structure for maintaining a Shared Clipboard context on Windows platforms. 104 104 */ 105 typedef struct _ VBOXCLIPBOARDWINCTX105 typedef struct _SHCLWINCTX 106 106 { 107 107 /** Window handle of our (invisible) clipbaord window. */ … … 112 112 HWND hWndClipboardOwnerUs; 113 113 /** Structure for maintaining the new clipboard API. */ 114 VBOXCLIPBOARDWINAPINEW newAPI;114 SHCLWINAPINEW newAPI; 115 115 /** Structure for maintaining the old clipboard API. */ 116 VBOXCLIPBOARDWINAPIOLD oldAPI;117 } VBOXCLIPBOARDWINCTX, *PVBOXCLIPBOARDWINCTX;116 SHCLWINAPIOLD oldAPI; 117 } SHCLWINCTX, *PSHCLWINCTX; 118 118 119 119 int VBoxClipboardWinOpen(HWND hWnd); … … 121 121 int VBoxClipboardWinClear(void); 122 122 123 int VBoxClipboardWinCheckAndInitNewAPI(P VBOXCLIPBOARDWINAPINEW pAPI);124 bool VBoxClipboardWinIsNewAPI(P VBOXCLIPBOARDWINAPINEW pAPI);125 126 int VBoxClipboardWinChainAdd(P VBOXCLIPBOARDWINCTX pCtx);127 int VBoxClipboardWinChainRemove(P VBOXCLIPBOARDWINCTX pCtx);123 int VBoxClipboardWinCheckAndInitNewAPI(PSHCLWINAPINEW pAPI); 124 bool VBoxClipboardWinIsNewAPI(PSHCLWINAPINEW pAPI); 125 126 int VBoxClipboardWinChainAdd(PSHCLWINCTX pCtx); 127 int VBoxClipboardWinChainRemove(PSHCLWINCTX pCtx); 128 128 VOID CALLBACK VBoxClipboardWinChainPingProc(HWND hWnd, UINT uMsg, ULONG_PTR dwData, LRESULT lResult); 129 LRESULT VBoxClipboardWinChainPassToNext(P VBOXCLIPBOARDWINCTX pWinCtx, UINT msg, WPARAM wParam, LPARAM lParam);130 131 VBOXCLIPBOARDFORMAT VBoxClipboardWinClipboardFormatToVBox(UINT uFormat);132 int VBoxClipboardWinGetFormats(P VBOXCLIPBOARDWINCTX pCtx, PSHAREDCLIPBOARDFORMATDATA pFormats);129 LRESULT VBoxClipboardWinChainPassToNext(PSHCLWINCTX pWinCtx, UINT msg, WPARAM wParam, LPARAM lParam); 130 131 SHCLFORMAT VBoxClipboardWinClipboardFormatToVBox(UINT uFormat); 132 int VBoxClipboardWinGetFormats(PSHCLWINCTX pCtx, PSHCLFORMATDATA pFormats); 133 133 134 134 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST … … 141 141 int VBoxClipboardWinConvertMIMEToCFHTML(const char *pszSource, size_t cb, char **ppszOutput, uint32_t *pcbOutput); 142 142 143 LRESULT VBoxClipboardWinHandleWMChangeCBChain(P VBOXCLIPBOARDWINCTX pWinCtx, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);144 int VBoxClipboardWinHandleWMDestroy(P VBOXCLIPBOARDWINCTX pWinCtx);145 int VBoxClipboardWinHandleWMRenderAllFormats(P VBOXCLIPBOARDWINCTX pWinCtx, HWND hWnd);146 int VBoxClipboardWinHandleWMTimer(P VBOXCLIPBOARDWINCTX pWinCtx);147 148 int VBoxClipboardWinAnnounceFormats(P VBOXCLIPBOARDWINCTX pWinCtx, VBOXCLIPBOARDFORMATS fFormats);143 LRESULT VBoxClipboardWinHandleWMChangeCBChain(PSHCLWINCTX pWinCtx, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 144 int VBoxClipboardWinHandleWMDestroy(PSHCLWINCTX pWinCtx); 145 int VBoxClipboardWinHandleWMRenderAllFormats(PSHCLWINCTX pWinCtx, HWND hWnd); 146 int VBoxClipboardWinHandleWMTimer(PSHCLWINCTX pWinCtx); 147 148 int VBoxClipboardWinAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats); 149 149 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 150 int VBoxClipboardWinURITransferCreate(P VBOXCLIPBOARDWINCTX pWinCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer);151 void VBoxClipboardWinURITransferDestroy(P VBOXCLIPBOARDWINCTX pWinCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer);150 int VBoxClipboardWinURITransferCreate(PSHCLWINCTX pWinCtx, PSHCLURITRANSFER pTransfer); 151 void VBoxClipboardWinURITransferDestroy(PSHCLWINCTX pWinCtx, PSHCLURITRANSFER pTransfer); 152 152 #endif 153 153 … … 170 170 public: 171 171 172 VBoxClipboardWinDataObject(PSH AREDCLIPBOARDURITRANSFER pTransfer,172 VBoxClipboardWinDataObject(PSHCLURITRANSFER pTransfer, 173 173 LPFORMATETC pFormatEtc = NULL, LPSTGMEDIUM pStgMed = NULL, ULONG cFormats = 0); 174 174 virtual ~VBoxClipboardWinDataObject(void); … … 218 218 static int Thread(RTTHREAD hThread, void *pvUser); 219 219 220 int readDir(PSH AREDCLIPBOARDURITRANSFER pTransfer, const Utf8Str &strPath);220 int readDir(PSHCLURITRANSFER pTransfer, const Utf8Str &strPath); 221 221 222 222 int copyToHGlobal(const void *pvData, size_t cbData, UINT fFlags, HGLOBAL *phGlobal); 223 int createFileGroupDescriptorFromTransfer(PSH AREDCLIPBOARDURITRANSFER pTransfer,223 int createFileGroupDescriptorFromTransfer(PSHCLURITRANSFER pTransfer, 224 224 bool fUnicode, HGLOBAL *phGlobal); 225 225 … … 237 237 Utf8Str strPath; 238 238 /** Related (cached) object information. */ 239 SH AREDCLIPBOARDFSOBJINFO objInfo;239 SHCLFSOBJINFO objInfo; 240 240 }; 241 241 … … 248 248 LPFORMATETC m_pFormatEtc; 249 249 LPSTGMEDIUM m_pStgMedium; 250 PSH AREDCLIPBOARDURITRANSFER m_pTransfer;250 PSHCLURITRANSFER m_pTransfer; 251 251 IStream *m_pStream; 252 252 ULONG m_uObjIdx; … … 303 303 public: 304 304 305 VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSH AREDCLIPBOARDURITRANSFER pTransfer,306 const Utf8Str &strPath, PSH AREDCLIPBOARDFSOBJINFO pObjInfo);305 VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSHCLURITRANSFER pTransfer, 306 const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo); 307 307 virtual ~VBoxClipboardWinStreamImpl(void); 308 308 … … 329 329 public: /* Own methods. */ 330 330 331 static HRESULT Create(VBoxClipboardWinDataObject *pParent, PSH AREDCLIPBOARDURITRANSFER pTransfer, const Utf8Str &strPath,332 PSH AREDCLIPBOARDFSOBJINFO pObjInfo, IStream **ppStream);331 static HRESULT Create(VBoxClipboardWinDataObject *pParent, PSHCLURITRANSFER pTransfer, const Utf8Str &strPath, 332 PSHCLFSOBJINFO pObjInfo, IStream **ppStream); 333 333 private: 334 334 … … 338 338 LONG m_lRefCount; 339 339 /** Pointer to the associated URI transfer. */ 340 PSH AREDCLIPBOARDURITRANSFER m_pURITransfer;340 PSHCLURITRANSFER m_pURITransfer; 341 341 /** The object handle to use. */ 342 SH AREDCLIPBOARDOBJHANDLE m_hObj;342 SHCLOBJHANDLE m_hObj; 343 343 /** Object path. */ 344 344 Utf8Str m_strPath; 345 345 /** (Cached) object information. */ 346 SH AREDCLIPBOARDFSOBJINFO m_objInfo;346 SHCLFSOBJINFO m_objInfo; 347 347 /** Number of bytes already processed. */ 348 348 uint64_t m_cbProcessed; … … 353 353 /** 354 354 * Class for Windows-specifics for maintaining a single URI transfer. 355 * Set as pvUser / cbUser in SH AREDCLIPBOARDURICTX.355 * Set as pvUser / cbUser in SHCLURICTX. 356 356 */ 357 357 class SharedClipboardWinURITransferCtx -
trunk/include/VBox/GuestHost/SharedClipboard.h
r80623 r80662 35 35 36 36 /** A single Shared Clipboard format. */ 37 typedef uint32_t VBOXCLIPBOARDFORMAT;37 typedef uint32_t SHCLFORMAT; 38 38 /** Pointer to a single Shared Clipboard format. */ 39 typedef VBOXCLIPBOARDFORMAT *PVBOXCLIPBOARDFORMAT;39 typedef SHCLFORMAT *PSHCLFORMAT; 40 40 41 41 /** Bit map of Shared Clipboard formats. */ 42 typedef uint32_t VBOXCLIPBOARDFORMATS;42 typedef uint32_t SHCLFORMATS; 43 43 /** Pointer to a bit map of Shared Clipboard formats. */ 44 typedef VBOXCLIPBOARDFORMATS *PVBOXCLIPBOARDFORMATS;44 typedef SHCLFORMATS *PSHCLFORMATS; 45 45 46 46 /** … … 63 63 * Structure for keeping a generic Shared Clipboard data block. 64 64 */ 65 typedef struct _SH AREDCLIPBOARDDATABLOCK65 typedef struct _SHCLDATABLOCK 66 66 { 67 67 /** Clipboard format this data block represents. */ 68 VBOXCLIPBOARDFORMAT uFormat;68 SHCLFORMAT uFormat; 69 69 /** Pointer to actual data block. */ 70 70 void *pvData; 71 71 /** Size (in bytes) of actual data block. */ 72 72 uint32_t cbData; 73 } SH AREDCLIPBOARDDATABLOCK, *PSHAREDCLIPBOARDDATABLOCK;73 } SHCLDATABLOCK, *PSHCLDATABLOCK; 74 74 75 75 /** 76 76 * Structure for keeping a Shared Clipboard data read request. 77 77 */ 78 typedef struct _SH AREDCLIPBOARDDATAREQ78 typedef struct _SHCLDATAREQ 79 79 { 80 80 /** In which format the data needs to be sent. */ 81 VBOXCLIPBOARDFORMAT uFmt;81 SHCLFORMAT uFmt; 82 82 /** Read flags; currently unused. */ 83 83 uint32_t fFlags; 84 84 /** Maximum data (in byte) can be sent. */ 85 85 uint32_t cbSize; 86 } SH AREDCLIPBOARDDATAREQ, *PSHAREDCLIPBOARDDATAREQ;86 } SHCLDATAREQ, *PSHCLDATAREQ; 87 87 88 88 /** 89 89 * Structure for keeping Shared Clipboard formats specifications. 90 90 */ 91 typedef struct _SH AREDCLIPBOARDFORMATDATA91 typedef struct _SHCLFORMATDATA 92 92 { 93 93 /** Available format(s) as bit map. */ 94 VBOXCLIPBOARDFORMATS uFormats;94 SHCLFORMATS uFormats; 95 95 /** Formats flags. Currently unused. */ 96 96 uint32_t fFlags; 97 } SH AREDCLIPBOARDFORMATDATA, *PSHAREDCLIPBOARDFORMATDATA;97 } SHCLFORMATDATA, *PSHCLFORMATDATA; 98 98 99 99 /** 100 100 * Structure for an (optional) Shared Clipboard event payload. 101 101 */ 102 typedef struct _SH AREDCLIPBOARDEVENTPAYLOAD102 typedef struct _SHCLEVENTPAYLOAD 103 103 { 104 104 /** Payload ID; currently unused. */ … … 108 108 /** Size (in bytes) of actual payload data. */ 109 109 uint32_t cbData; 110 } SH AREDCLIPBOARDEVENTPAYLOAD, *PSHAREDCLIPBOARDEVENTPAYLOAD;110 } SHCLEVENTPAYLOAD, *PSHCLEVENTPAYLOAD; 111 111 112 112 /** Defines an event source ID. */ 113 typedef uint16_t VBOXCLIPBOARDEVENTSOURCEID;113 typedef uint16_t SHCLEVENTSOURCEID; 114 114 /** Defines a pointer to a event source ID. */ 115 typedef VBOXCLIPBOARDEVENTSOURCEID *PVBOXCLIPBOARDEVENTSOURCEID;115 typedef SHCLEVENTSOURCEID *PSHCLEVENTSOURCEID; 116 116 117 117 /** Defines an event ID. */ 118 typedef uint16_t VBOXCLIPBOARDEVENTID;118 typedef uint16_t SHCLEVENTID; 119 119 /** Defines a pointer to a event source ID. */ 120 typedef VBOXCLIPBOARDEVENTID *PVBOXCLIPBOARDEVENTID;120 typedef SHCLEVENTID *PSHCLEVENTID; 121 121 122 122 /** Maximum number of concurrent Shared Clipboard transfers a VM can have. … … 131 131 * Structure for maintaining a Shared Clipboard event. 132 132 */ 133 typedef struct _SH AREDCLIPBOARDEVENT133 typedef struct _SHCLEVENT 134 134 { 135 135 /** List node. */ 136 136 RTLISTNODE Node; 137 137 /** The event's ID, for self-reference. */ 138 VBOXCLIPBOARDEVENTID uID;138 SHCLEVENTID uID; 139 139 /** Event semaphore for signalling the event. */ 140 140 RTSEMEVENT hEventSem; 141 141 /** Payload to this event. Optional and can be NULL. */ 142 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;143 } SH AREDCLIPBOARDEVENT, *PSHAREDCLIPBOARDEVENT;142 PSHCLEVENTPAYLOAD pPayload; 143 } SHCLEVENT, *PSHCLEVENT; 144 144 145 145 /** … … 149 149 * it can be used in different contexts. 150 150 */ 151 typedef struct _SH AREDCLIPBOARDEVENTSOURCE151 typedef struct _SHCLEVENTSOURCE 152 152 { 153 153 /** The event source' ID. */ 154 VBOXCLIPBOARDEVENTSOURCEID uID;154 SHCLEVENTSOURCEID uID; 155 155 /** Next upcoming event ID. */ 156 VBOXCLIPBOARDEVENTID uEventIDNext;157 /** List of events (PSH AREDCLIPBOARDEVENT). */156 SHCLEVENTID uEventIDNext; 157 /** List of events (PSHCLEVENT). */ 158 158 RTLISTANCHOR lstEvents; 159 } SH AREDCLIPBOARDEVENTSOURCE, *PSHAREDCLIPBOARDEVENTSOURCE;159 } SHCLEVENTSOURCE, *PSHCLEVENTSOURCE; 160 160 161 161 int SharedClipboardPayloadAlloc(uint32_t uID, const void *pvData, uint32_t cbData, 162 PSH AREDCLIPBOARDEVENTPAYLOAD *ppPayload);163 void SharedClipboardPayloadFree(PSH AREDCLIPBOARDEVENTPAYLOAD pPayload);164 165 int SharedClipboardEventSourceCreate(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTSOURCEID uID);166 void SharedClipboardEventSourceDestroy(PSH AREDCLIPBOARDEVENTSOURCE pSource);167 168 VBOXCLIPBOARDEVENTID SharedClipboardEventIDGenerate(PSHAREDCLIPBOARDEVENTSOURCE pSource);169 VBOXCLIPBOARDEVENTID SharedClipboardEventGetLast(PSHAREDCLIPBOARDEVENTSOURCE pSource);170 int SharedClipboardEventRegister(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID);171 int SharedClipboardEventUnregister(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID);172 int SharedClipboardEventWait(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID, RTMSINTERVAL uTimeoutMs,173 PSH AREDCLIPBOARDEVENTPAYLOAD* ppPayload);174 int SharedClipboardEventSignal(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID, PSHAREDCLIPBOARDEVENTPAYLOAD pPayload);175 void SharedClipboardEventPayloadDetach(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID);162 PSHCLEVENTPAYLOAD *ppPayload); 163 void SharedClipboardPayloadFree(PSHCLEVENTPAYLOAD pPayload); 164 165 int SharedClipboardEventSourceCreate(PSHCLEVENTSOURCE pSource, SHCLEVENTSOURCEID uID); 166 void SharedClipboardEventSourceDestroy(PSHCLEVENTSOURCE pSource); 167 168 SHCLEVENTID SharedClipboardEventIDGenerate(PSHCLEVENTSOURCE pSource); 169 SHCLEVENTID SharedClipboardEventGetLast(PSHCLEVENTSOURCE pSource); 170 int SharedClipboardEventRegister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID); 171 int SharedClipboardEventUnregister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID); 172 int SharedClipboardEventWait(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, RTMSINTERVAL uTimeoutMs, 173 PSHCLEVENTPAYLOAD* ppPayload); 174 int SharedClipboardEventSignal(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, PSHCLEVENTPAYLOAD pPayload); 175 void SharedClipboardEventPayloadDetach(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID); 176 176 177 177 /** 178 178 * Enumeration to specify the Shared Clipboard URI source type. 179 179 */ 180 typedef enum SH AREDCLIPBOARDSOURCE180 typedef enum SHCLSOURCE 181 181 { 182 182 /** Invalid source type. */ 183 SH AREDCLIPBOARDSOURCE_INVALID = 0,183 SHCLSOURCE_INVALID = 0, 184 184 /** Source is local. */ 185 SH AREDCLIPBOARDSOURCE_LOCAL,185 SHCLSOURCE_LOCAL, 186 186 /** Source is remote. */ 187 SH AREDCLIPBOARDSOURCE_REMOTE,187 SHCLSOURCE_REMOTE, 188 188 /** The usual 32-bit hack. */ 189 SH AREDCLIPBOARDSOURCE_32Bit_Hack = 0x7fffffff190 } SH AREDCLIPBOARDSOURCE;189 SHCLSOURCE_32Bit_Hack = 0x7fffffff 190 } SHCLSOURCE; 191 191 192 192 /** Opaque data structure for the X11/VBox frontend/glue code. */ 193 struct _ VBOXCLIPBOARDCONTEXT;194 typedef struct _ VBOXCLIPBOARDCONTEXT VBOXCLIPBOARDCONTEXT;195 typedef struct _ VBOXCLIPBOARDCONTEXT *PVBOXCLIPBOARDCONTEXT;193 struct _SHCLCONTEXT; 194 typedef struct _SHCLCONTEXT SHCLCONTEXT; 195 typedef struct _SHCLCONTEXT *PSHCLCONTEXT; 196 196 197 197 /** Opaque data structure for the X11/VBox backend code. */ … … 205 205 206 206 /* APIs exported by the X11 backend */ 207 extern CLIPBACKEND *ClipConstructX11( VBOXCLIPBOARDCONTEXT *pFrontend, bool fHeadless);207 extern CLIPBACKEND *ClipConstructX11(SHCLCONTEXT *pFrontend, bool fHeadless); 208 208 extern void ClipDestructX11(CLIPBACKEND *pBackend); 209 209 extern int ClipStartX11(CLIPBACKEND *pBackend, bool grab); 210 210 extern int ClipStopX11(CLIPBACKEND *pBackend); 211 extern int ClipAnnounceFormatToX11(CLIPBACKEND *pBackend, VBOXCLIPBOARDFORMATS vboxFormats);212 extern int ClipRequestDataFromX11(CLIPBACKEND *pBackend, VBOXCLIPBOARDFORMATS vboxFormat, CLIPREADCBREQ *pReq);211 extern int ClipAnnounceFormatToX11(CLIPBACKEND *pBackend, SHCLFORMATS vboxFormats); 212 extern int ClipRequestDataFromX11(CLIPBACKEND *pBackend, SHCLFORMATS vboxFormat, CLIPREADCBREQ *pReq); 213 213 214 214 /* APIs exported by the X11/VBox frontend */ 215 extern int ClipRequestDataForX11( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb);216 extern void ClipReportX11Formats( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats);217 extern void ClipRequestFromX11CompleteCallback( VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb);215 extern int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb); 216 extern void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats); 217 extern void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb); 218 218 #endif /* !VBOX_INCLUDED_GuestHost_SharedClipboard_h */ 219 219 -
trunk/include/VBox/GuestHost/clipboard-helper.h
r80285 r80662 189 189 * @param u32Format Clipboard format to use for dumping. 190 190 */ 191 void VBoxClipboardDbgDumpData(const void *pv, size_t cb, VBOXCLIPBOARDFORMAT u32Format);191 void VBoxClipboardDbgDumpData(const void *pv, size_t cb, SHCLFORMAT u32Format); 192 192 #endif /* LOG_ENABLED */ 193 193 -
trunk/include/VBox/HostServices/VBoxClipboardExt.h
r80558 r80662 40 40 #define VBOX_CLIPBOARD_EXT_FN_DATA_WRITE (3) 41 41 /** Registers a new clipboard area. 42 * Uses the VBOXCLIPBOARDEXTAREAPARMS struct. */42 * Uses the SHCLEXTAREAPARMS struct. */ 43 43 #define VBOX_CLIPBOARD_EXT_FN_AREA_REGISTER (4) 44 44 /** Unregisters an existing clipboard area. 45 * Uses the VBOXCLIPBOARDEXTAREAPARMS struct. */45 * Uses the SHCLEXTAREAPARMS struct. */ 46 46 #define VBOX_CLIPBOARD_EXT_FN_AREA_UNREGISTER (5) 47 47 /** Attaches to an existing clipboard area. 48 * Uses the VBOXCLIPBOARDEXTAREAPARMS struct. */48 * Uses the SHCLEXTAREAPARMS struct. */ 49 49 #define VBOX_CLIPBOARD_EXT_FN_AREA_ATTACH (6) 50 50 /** Detaches from an existing clipboard area. 51 * Uses the VBOXCLIPBOARDEXTAREAPARMS struct. */51 * Uses the SHCLEXTAREAPARMS struct. */ 52 52 #define VBOX_CLIPBOARD_EXT_FN_AREA_DETACH (7) 53 53 … … 55 55 typedef VRDPCLIPBOARDEXTCALLBACK *PFNVRDPCLIPBOARDEXTCALLBACK; 56 56 57 typedef struct _ VBOXCLIPBOARDEXTPARMS57 typedef struct _SHCLEXTPARMS 58 58 { 59 59 uint32_t uFormat; … … 64 64 } u; 65 65 uint32_t cbData; 66 } VBOXCLIPBOARDEXTPARMS;66 } SHCLEXTPARMS; 67 67 68 68 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 69 typedef uint32_t VBOXCLIPBOARDEXTAREAREGISTETRFLAGS;69 typedef uint32_t SHCLEXTAREAREGISTETRFLAGS; 70 70 /** No clipboard register area flags specified. */ 71 #define VBOXCLIPBOARDEXTAREA_REGISTER_FLAGS_NONE 071 #define SHCLEXTAREA_REGISTER_FLAGS_NONE 0 72 72 73 typedef uint32_t VBOXCLIPBOARDEXTAREAATTACHFLAGS;73 typedef uint32_t SHCLEXTAREAATTACHFLAGS; 74 74 /** No clipboard attach area flags specified. */ 75 #define VBOXCLIPBOARDEXTAREA_ATTACH_FLAGS_NONE 075 #define SHCLEXTAREA_ATTACH_FLAGS_NONE 0 76 76 77 77 /** 78 78 * Structure for keeping clipboard area callback parameters. 79 79 */ 80 typedef struct _ VBOXCLIPBOARDEXTAREAPARMS80 typedef struct _SHCLEXTAREAPARMS 81 81 { 82 82 /** The clipboard area's ID the callback is for. */ 83 SH AREDCLIPBOARDAREAID uID;83 SHCLAREAID uID; 84 84 union 85 85 { … … 89 89 uint32_t cbData; 90 90 /** Area register flags; not used yet and must be set to 0. */ 91 VBOXCLIPBOARDEXTAREAREGISTETRFLAGS fFlags;91 SHCLEXTAREAREGISTETRFLAGS fFlags; 92 92 } fn_register; 93 93 struct 94 94 { 95 95 /** Area attach flags; not used yet and must be set to 0. */ 96 VBOXCLIPBOARDEXTAREAATTACHFLAGS fFlags;96 SHCLEXTAREAATTACHFLAGS fFlags; 97 97 } fn_attach; 98 98 } u; 99 } VBOXCLIPBOARDEXTAREAPARMS, *PVBOXCLIPBOARDEXTAREAPARMS;99 } SHCLEXTAREAPARMS, *PSHCLEXTAREAPARMS; 100 100 #endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ 101 101 -
trunk/include/VBox/HostServices/VBoxClipboardSvc.h
r80637 r80662 389 389 390 390 /** @todo might be necessary for future. */ 391 #define VBOX_SH AREDCLIPBOARD_LIST_FLAG_NONE 0392 #define VBOX_SH AREDCLIPBOARD_LIST_FLAG_RETURN_ONE RT_BIT(0)393 #define VBOX_SH AREDCLIPBOARD_LIST_FLAG_RESTART RT_BIT(1)394 395 #define VBOX_SH AREDCLIPBOARD_LISTHDR_FLAG_NONE 0391 #define VBOX_SHCL_LIST_FLAG_NONE 0 392 #define VBOX_SHCL_LIST_FLAG_RETURN_ONE RT_BIT(0) 393 #define VBOX_SHCL_LIST_FLAG_RESTART RT_BIT(1) 394 395 #define VBOX_SHCL_LISTHDR_FLAG_NONE 0 396 396 397 397 /** No additional information provided. */ 398 #define VBOX_SH AREDCLIPBOARD_INFO_FLAG_NONE 0399 /** Get object information of type SH AREDCLIPBOARDFSOBJINFO. */400 #define VBOX_SH AREDCLIPBOARD_INFO_FLAG_FSOBJINFO RT_BIT(0)398 #define VBOX_SHCL_INFO_FLAG_NONE 0 399 /** Get object information of type SHCLFSOBJINFO. */ 400 #define VBOX_SHCL_INFO_FLAG_FSOBJINFO RT_BIT(0) 401 401 402 402 /** … … 409 409 /** uint32_t, in: Context ID. */ 410 410 HGCMFunctionParameter uContext; 411 /** uint32_t, in: Transfer status of type SH AREDCLIPBOARDURITRANSFERSTATUS. */411 /** uint32_t, in: Transfer status of type SHCLURITRANSFERSTATUS. */ 412 412 HGCMFunctionParameter uStatus; 413 413 /** uint32_t, in: Size of payload of this status, based on the status type. */ … … 419 419 #define VBOX_SHARED_CLIPBOARD_CPARMS_STATUS 4 420 420 421 #define VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_INVALID 0422 #define VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN 1423 #define VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_CLOSE 2424 #define VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN 3425 #define VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE 4421 #define VBOX_SHCL_REPLYMSGTYPE_INVALID 0 422 #define VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN 1 423 #define VBOX_SHCL_REPLYMSGTYPE_LIST_CLOSE 2 424 #define VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN 3 425 #define VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE 4 426 426 427 427 /** … … 434 434 /** uint32_t, out: Context ID. */ 435 435 HGCMFunctionParameter uContext; 436 /** uint32_t, out: Message type of type VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_XXX. */436 /** uint32_t, out: Message type of type VBOX_SHCL_REPLYMSGTYPE_XXX. */ 437 437 HGCMFunctionParameter enmType; 438 438 /** uint32_t, out: IPRT result of overall operation. */ … … 499 499 /** uint32_t, in: Context ID. */ 500 500 HGCMFunctionParameter uContext; 501 /** uint32_t, in: VBOX_SH AREDCLIPBOARD_INFO_FLAG_XXX. */501 /** uint32_t, in: VBOX_SHCL_INFO_FLAG_XXX. */ 502 502 HGCMFunctionParameter fInfo; 503 503 /** uint32_t, in: Index of root list entry to get (zero-based). */ … … 531 531 /** uint32_t, out: Bytes to be used for information/How many bytes were used. */ 532 532 HGCMFunctionParameter cbInfo; 533 /** pointer, in/out: Information to be set/get (SH AREDCLIPBOARDFSOBJINFO only currently).534 * Do not forget to set the SH AREDCLIPBOARDFSOBJINFO::Attr::enmAdditional for Get operation as well. */533 /** pointer, in/out: Information to be set/get (SHCLFSOBJINFO only currently). 534 * Do not forget to set the SHCLFSOBJINFO::Attr::enmAdditional for Get operation as well. */ 535 535 HGCMFunctionParameter pvInfo; 536 536 } VBoxClipboardRootListEntryMsg; … … 547 547 /** uint32_t, in: Context ID. */ 548 548 HGCMFunctionParameter uContext; 549 /** uint32_t, in: Listing flags (see VBOX_SH AREDCLIPBOARD_LIST_FLAG_XXX). */549 /** uint32_t, in: Listing flags (see VBOX_SHCL_LIST_FLAG_XXX). */ 550 550 HGCMFunctionParameter fList; 551 551 /** uint32_t, in: Size (in bytes) of the filter string. */ … … 584 584 /** uint64_t, in: List handle. */ 585 585 HGCMFunctionParameter uHandle; 586 /** uint32_t, in: Flags of type VBOX_SH AREDCLIPBOARD_LISTHDR_FLAG_XXX. */586 /** uint32_t, in: Flags of type VBOX_SHCL_LISTHDR_FLAG_XXX. */ 587 587 HGCMFunctionParameter fFlags; 588 588 } VBoxClipboardListHdrReqParms; … … 608 608 609 609 VBoxClipboardListHdrReqParms ReqParms; 610 /** uint32_t, in/out: Feature flags (see VBOX_SH AREDCLIPBOARD_FEATURE_FLAG_XXX). */610 /** uint32_t, in/out: Feature flags (see VBOX_SHCL_FEATURE_FLAG_XXX). */ 611 611 HGCMFunctionParameter fFeatures; 612 612 /** uint64_t, in/out: Number of total objects to transfer. */ … … 624 624 /** uint64_t, in: List handle. */ 625 625 HGCMFunctionParameter uHandle; 626 /** uint32_t, in: VBOX_SH AREDCLIPBOARD_INFO_FLAG_XXX. */626 /** uint32_t, in: VBOX_SHCL_INFO_FLAG_XXX. */ 627 627 HGCMFunctionParameter fInfo; 628 628 } VBoxClipboardListEntryReqParms; … … 653 653 /** uint32_t, out: Bytes to be used for information/How many bytes were used. */ 654 654 HGCMFunctionParameter cbInfo; 655 /** pointer, in/out: Information to be set/get (SH AREDCLIPBOARDFSOBJINFO only currently).656 * Do not forget to set the SH AREDCLIPBOARDFSOBJINFO::Attr::enmAdditional for Get operation as well. */655 /** pointer, in/out: Information to be set/get (SHCLFSOBJINFO only currently). 656 * Do not forget to set the SHCLFSOBJINFO::Attr::enmAdditional for Get operation as well. */ 657 657 HGCMFunctionParameter pvInfo; 658 658 } VBoxClipboardListEntryMsg; … … 672 672 /** pointer, in/out: Absoulte path of object to open/create. */ 673 673 HGCMFunctionParameter szPath; 674 /** uint32_t in/out: Open / Create flags of type SH AREDCLIPBOARD_OBJ_CF_. */674 /** uint32_t in/out: Open / Create flags of type SHCL_OBJ_CF_. */ 675 675 HGCMFunctionParameter fCreate; 676 676 } VBoxClipboardObjOpenMsg; … … 684 684 /** uint32_t, in/out: Context ID. */ 685 685 HGCMFunctionParameter uContext; 686 /** uint64_t, in: SH AREDCLIPBOARDOBJHANDLE of object to close. */686 /** uint64_t, in: SHCLOBJHANDLE of object to close. */ 687 687 HGCMFunctionParameter uHandle; 688 688 } VBoxClipboardObjCloseMsg; … … 694 694 /** uint32_t, in: Context ID. */ 695 695 HGCMFunctionParameter uContext; 696 /** uint64_t, in: SH AREDCLIPBOARDOBJHANDLE of object to write to. */696 /** uint64_t, in: SHCLOBJHANDLE of object to write to. */ 697 697 HGCMFunctionParameter uHandle; 698 698 /** uint32_t, in: How many bytes to read. */ … … 724 724 /** uint32_t, in/out: Context ID. */ 725 725 HGCMFunctionParameter uContext; 726 /** uint64_t, in/out: SH AREDCLIPBOARDOBJHANDLE of object to write to. */726 /** uint64_t, in/out: SHCLOBJHANDLE of object to write to. */ 727 727 HGCMFunctionParameter uHandle; 728 728 /** uint32_t, in/out: Size (in bytes) of current data chunk. */ … … 760 760 #pragma pack() 761 761 762 typedef struct _ VBOXCLIPBOARDFILEDATA762 typedef struct _SHCLFILEDATA 763 763 { 764 764 /** Current file data chunk. */ … … 770 770 /** Size (in bytes) of current data chunk. */ 771 771 uint32_t cbChecksum; 772 } VBOXCLIPBOARDFILEDATA, *PVBOXCLIPBOARDFILEDATA;773 774 typedef struct _ VBOXCLIPBOARDERRORDATA772 } SHCLFILEDATA, *PSHCLFILEDATA; 773 774 typedef struct _SHCLERRORDATA 775 775 { 776 776 int32_t rc; 777 } VBOXCLIPBOARDERRORDATA, *PVBOXCLIPBOARDERRORDATA;777 } SHCLERRORDATA, *PSHCLERRORDATA; 778 778 779 779 bool VBoxSvcClipboardGetHeadless(void); -
trunk/include/VBox/VBoxGuestLib.h
r80444 r80662 639 639 { 640 640 /** Reports available formats from the host. */ 641 SH AREDCLIPBOARDFORMATDATA ReportFormats;641 SHCLFORMATDATA ReportFormats; 642 642 /** Requests data to be read from the guest. */ 643 SH AREDCLIPBOARDDATAREQ ReadData;643 SHCLDATAREQ ReadData; 644 644 } u; 645 645 } VBGLR3CLIPBOARDEVENT, *PVBGLR3CLIPBOARDEVENT; … … 651 651 VBGLR3DECL(int) VbglR3ClipboardReadData(HGCMCLIENTID idClient, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcb); 652 652 VBGLR3DECL(int) VbglR3ClipboardWriteData(HGCMCLIENTID idClient, uint32_t fFormat, void *pv, uint32_t cb); 653 VBGLR3DECL(int) VbglR3ClipboardWriteDataEx(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDDATABLOCK pData);654 VBGLR3DECL(int) VbglR3ClipboardFormatsSend(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDFORMATDATA pFormats);653 VBGLR3DECL(int) VbglR3ClipboardWriteDataEx(PVBGLR3SHCLCMDCTX pCtx, PSHCLDATABLOCK pData); 654 VBGLR3DECL(int) VbglR3ClipboardFormatsSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLFORMATDATA pFormats); 655 655 VBGLR3DECL(int) VbglR3ClipboardReportFormats(HGCMCLIENTID idClient, uint32_t fFormats); 656 656 … … 664 664 # ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 665 665 VBGLR3DECL(int) VbglR3ClipboardTransferEvent(PVBGLR3SHCLCMDCTX pCtx, uint32_t uMsg, uint32_t cParms, 666 PSH AREDCLIPBOARDURITRANSFER pTransfer);667 VBGLR3DECL(int) VbglR3ClipboardTransferSendStatus(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDURITRANSFER pTransfer,668 SH AREDCLIPBOARDURITRANSFERSTATUS uStatus);669 670 VBGLR3DECL(int) VbglR3ClipboardRootListRead(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDROOTLIST *ppRootList);666 PSHCLURITRANSFER pTransfer); 667 VBGLR3DECL(int) VbglR3ClipboardTransferSendStatus(PVBGLR3SHCLCMDCTX pCtx, PSHCLURITRANSFER pTransfer, 668 SHCLURITRANSFERSTATUS uStatus); 669 670 VBGLR3DECL(int) VbglR3ClipboardRootListRead(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLIST *ppRootList); 671 671 672 672 VBGLR3DECL(int) VbglR3ClipboardRootListHdrReadReq(PVBGLR3SHCLCMDCTX pCtx, uint32_t *pfRoots); 673 VBGLR3DECL(int) VbglR3ClipboardRootListHdrReadReply(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDROOTLIST pRootList);674 VBGLR3DECL(int) VbglR3ClipboardRootsWrite(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDROOTLISTHDR pRoots);675 676 VBGLR3DECL(int) VbglR3ClipboardListOpenSend(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDLISTOPENPARMS pOpenParms, PSHAREDCLIPBOARDLISTHANDLE phList);677 VBGLR3DECL(int) VbglR3ClipboardListOpenRecv(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDLISTOPENPARMS pOpenParms);678 VBGLR3DECL(int) VbglR3ClipboardListOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SH AREDCLIPBOARDLISTHANDLE hList);679 680 VBGLR3DECL(int) VbglR3ClipboardListCloseSend(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDLISTHANDLE hList);681 VBGLR3DECL(int) VbglR3ClipboardListCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDLISTHANDLE phList);682 683 VBGLR3DECL(int) VbglR3ClipboardListHdrWrite(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr);684 VBGLR3DECL(int) VbglR3ClipboardListEntryWrite(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pListEntry);685 686 VBGLR3DECL(int) VbglR3ClipboardObjOpenRecv(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms);687 VBGLR3DECL(int) VbglR3ClipboardObjOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SH AREDCLIPBOARDOBJHANDLE hObj);688 VBGLR3DECL(int) VbglR3ClipboardObjOpenSend(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms,689 PSH AREDCLIPBOARDOBJHANDLE phObj);690 691 VBGLR3DECL(int) VbglR3ClipboardObjCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDOBJHANDLE phObj);692 VBGLR3DECL(int) VbglR3ClipboardObjCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SH AREDCLIPBOARDOBJHANDLE hObj);693 VBGLR3DECL(int) VbglR3ClipboardObjCloseSend(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDOBJHANDLE hObj);694 695 VBGLR3DECL(int) VbglR3ClipboardObjReadRecv(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDOBJHANDLE phObj, uint32_t pcbToRead,673 VBGLR3DECL(int) VbglR3ClipboardRootListHdrReadReply(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLIST pRootList); 674 VBGLR3DECL(int) VbglR3ClipboardRootsWrite(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLISTHDR pRoots); 675 676 VBGLR3DECL(int) VbglR3ClipboardListOpenSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList); 677 VBGLR3DECL(int) VbglR3ClipboardListOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTOPENPARMS pOpenParms); 678 VBGLR3DECL(int) VbglR3ClipboardListOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLLISTHANDLE hList); 679 680 VBGLR3DECL(int) VbglR3ClipboardListCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList); 681 VBGLR3DECL(int) VbglR3ClipboardListCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTHANDLE phList); 682 683 VBGLR3DECL(int) VbglR3ClipboardListHdrWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr); 684 VBGLR3DECL(int) VbglR3ClipboardListEntryWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry); 685 686 VBGLR3DECL(int) VbglR3ClipboardObjOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms); 687 VBGLR3DECL(int) VbglR3ClipboardObjOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLOBJHANDLE hObj); 688 VBGLR3DECL(int) VbglR3ClipboardObjOpenSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms, 689 PSHCLOBJHANDLE phObj); 690 691 VBGLR3DECL(int) VbglR3ClipboardObjCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJHANDLE phObj); 692 VBGLR3DECL(int) VbglR3ClipboardObjCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLOBJHANDLE hObj); 693 VBGLR3DECL(int) VbglR3ClipboardObjCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj); 694 695 VBGLR3DECL(int) VbglR3ClipboardObjReadRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJHANDLE phObj, uint32_t pcbToRead, 696 696 uint32_t *pfFlags); 697 VBGLR3DECL(int) VbglR3ClipboardObjRead(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf,697 VBGLR3DECL(int) VbglR3ClipboardObjRead(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, 698 698 uint32_t *pcbRead); 699 VBGLR3DECL(int) VbglR3ClipboardObjWrite(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf,699 VBGLR3DECL(int) VbglR3ClipboardObjWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, 700 700 uint32_t *pcbWritten); 701 701 # endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r80623 r80662 52 52 *********************************************************************************************************************************/ 53 53 54 typedef struct _ VBOXCLIPBOARDCONTEXT54 typedef struct _SHCLCONTEXT 55 55 { 56 56 /** Pointer to the VBoxClient service environment. */ … … 59 59 VBGLR3SHCLCMDCTX CmdCtx; 60 60 /** Windows-specific context data. */ 61 VBOXCLIPBOARDWINCTX Win;61 SHCLWINCTX Win; 62 62 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 63 63 /** URI transfer data. */ 64 SH AREDCLIPBOARDURICTX URI;64 SHCLURICTX URI; 65 65 #endif 66 } VBOXCLIPBOARDCONTEXT, *PVBOXCLIPBOARDCONTEXT;66 } SHCLCONTEXT, *PSHCLCONTEXT; 67 67 68 68 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 69 typedef struct _ VBOXCLIPBOARDURIREADTHREADCTX70 { 71 P VBOXCLIPBOARDCONTEXT pClipboardCtx;72 PSH AREDCLIPBOARDURITRANSFER pTransfer;73 } VBOXCLIPBOARDURIREADTHREADCTX, *PVBOXCLIPBOARDURIREADTHREADCTX;74 75 typedef struct _ VBOXCLIPBOARDURIWRITETHREADCTX76 { 77 P VBOXCLIPBOARDCONTEXT pClipboardCtx;78 PSH AREDCLIPBOARDURITRANSFER pTransfer;79 } VBOXCLIPBOARDURIWRITETHREADCTX, *PVBOXCLIPBOARDURIWRITETHREADCTX;69 typedef struct _SHCLURIREADTHREADCTX 70 { 71 PSHCLCONTEXT pClipboardCtx; 72 PSHCLURITRANSFER pTransfer; 73 } SHCLURIREADTHREADCTX, *PSHCLURIREADTHREADCTX; 74 75 typedef struct _SHCLURIWRITETHREADCTX 76 { 77 PSHCLCONTEXT pClipboardCtx; 78 PSHCLURITRANSFER pTransfer; 79 } SHCLURIWRITETHREADCTX, *PSHCLURIWRITETHREADCTX; 80 80 #endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ 81 81 … … 85 85 *********************************************************************************************************************************/ 86 86 /** Static clipboard context (since it is the single instance). Directly used in the windows proc. */ 87 static VBOXCLIPBOARDCONTEXT g_Ctx = { NULL };87 static SHCLCONTEXT g_Ctx = { NULL }; 88 88 /** Static window class name. */ 89 89 static char s_szClipWndClassName[] = VBOX_CLIPBOARD_WNDCLASS_NAME; … … 94 94 *********************************************************************************************************************************/ 95 95 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 96 static DECLCALLBACK(void) vboxClipboardURITransferCompleteCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc);97 static DECLCALLBACK(void) vboxClipboardURITransferErrorCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc);96 static DECLCALLBACK(void) vboxClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc); 97 static DECLCALLBACK(void) vboxClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc); 98 98 #endif 99 99 … … 106 106 LogFlowFuncEnter(); 107 107 108 P VBOXCLIPBOARDURIWRITETHREADCTX pCtx = (PVBOXCLIPBOARDURIWRITETHREADCTX)pvUser;108 PSHCLURIWRITETHREADCTX pCtx = (PSHCLURIWRITETHREADCTX)pvUser; 109 109 AssertPtr(pCtx); 110 110 111 PSH AREDCLIPBOARDURITRANSFER pTransfer = pCtx->pTransfer;111 PSHCLURITRANSFER pTransfer = pCtx->pTransfer; 112 112 AssertPtr(pTransfer); 113 113 … … 120 120 if (RT_SUCCESS(rc)) 121 121 { 122 rc = VbglR3ClipboardTransferSendStatus(&cmdCtx, pTransfer, SH AREDCLIPBOARDURITRANSFERSTATUS_RUNNING);122 rc = VbglR3ClipboardTransferSendStatus(&cmdCtx, pTransfer, SHCLURITRANSFERSTATUS_RUNNING); 123 123 if (RT_SUCCESS(rc)) 124 124 { … … 158 158 } 159 159 160 static DECLCALLBACK(void) vboxClipboardURITransferCompleteCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc)160 static DECLCALLBACK(void) vboxClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc) 161 161 { 162 162 RT_NOREF(rc); … … 166 166 LogRel2(("Shared Clipboard: Transfer to destination complete\n")); 167 167 168 PSH AREDCLIPBOARDURICTX pCtx = (PSHAREDCLIPBOARDURICTX)pData->pvUser;168 PSHCLURICTX pCtx = (PSHCLURICTX)pData->pvUser; 169 169 AssertPtr(pCtx); 170 170 171 PSH AREDCLIPBOARDURITRANSFER pTransfer = pData->pTransfer;171 PSHCLURITRANSFER pTransfer = pData->pTransfer; 172 172 AssertPtr(pTransfer); 173 173 … … 182 182 } 183 183 184 static DECLCALLBACK(void) vboxClipboardURITransferErrorCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc)184 static DECLCALLBACK(void) vboxClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc) 185 185 { 186 186 RT_NOREF(rc); … … 190 190 LogRel(("Shared Clipboard: Transfer to destination failed with %Rrc\n", rc)); 191 191 192 PSH AREDCLIPBOARDURICTX pCtx = (PSHAREDCLIPBOARDURICTX)pData->pvUser;192 PSHCLURICTX pCtx = (PSHCLURICTX)pData->pvUser; 193 193 AssertPtr(pCtx); 194 194 195 PSH AREDCLIPBOARDURITRANSFER pTransfer = pData->pTransfer;195 PSHCLURITRANSFER pTransfer = pData->pTransfer; 196 196 AssertPtr(pTransfer); 197 197 … … 206 206 } 207 207 208 static int vboxClipboardURITransferOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx)208 static int vboxClipboardURITransferOpen(PSHCLPROVIDERCTX pCtx) 209 209 { 210 210 RT_NOREF(pCtx); … … 214 214 } 215 215 216 static int vboxClipboardURITransferClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx)216 static int vboxClipboardURITransferClose(PSHCLPROVIDERCTX pCtx) 217 217 { 218 218 RT_NOREF(pCtx); … … 222 222 } 223 223 224 static int vboxClipboardURIListOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms,225 PSH AREDCLIPBOARDLISTHANDLE phList)224 static int vboxClipboardURIListOpen(PSHCLPROVIDERCTX pCtx, PSHCLLISTOPENPARMS pOpenParms, 225 PSHCLLISTHANDLE phList) 226 226 { 227 227 RT_NOREF(pCtx, pOpenParms, phList); … … 229 229 LogFlowFuncEnter(); 230 230 231 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;231 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 232 232 AssertPtr(pThisCtx); 233 233 … … 240 240 } 241 241 242 static int vboxClipboardURIListClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList)242 static int vboxClipboardURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList) 243 243 { 244 244 RT_NOREF(pCtx, hList); … … 246 246 LogFlowFuncEnter(); 247 247 248 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;248 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 249 249 AssertPtr(pThisCtx); 250 250 … … 257 257 } 258 258 259 static int vboxClipboardURIGetRoots(PSH AREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDROOTLIST *ppRootList)259 static int vboxClipboardURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList) 260 260 { 261 261 LogFlowFuncEnter(); 262 262 263 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;263 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 264 264 AssertPtr(pThisCtx); 265 265 … … 270 270 } 271 271 272 static int vboxClipboardURIListHdrRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,273 P VBOXCLIPBOARDLISTHDR pListHdr)272 static int vboxClipboardURIListHdrRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 273 PSHCLLISTHDR pListHdr) 274 274 { 275 275 RT_NOREF(hList); … … 277 277 LogFlowFuncEnter(); 278 278 279 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;279 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 280 280 AssertPtr(pThisCtx); 281 281 … … 298 298 299 299 /* 300 static int vboxClipboardURIListHdrWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,301 P VBOXCLIPBOARDLISTHDR pListHdr)300 static int vboxClipboardURIListHdrWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 301 PSHCLLISTHDR pListHdr) 302 302 { 303 303 LogFlowFuncEnter(); 304 304 305 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;305 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 306 306 AssertPtr(pThisCtx); 307 307 … … 312 312 }*/ 313 313 314 static int vboxClipboardURIListEntryRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,315 P VBOXCLIPBOARDLISTENTRY pListEntry)314 static int vboxClipboardURIListEntryRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 315 PSHCLLISTENTRY pListEntry) 316 316 { 317 317 RT_NOREF(hList); … … 319 319 LogFlowFuncEnter(); 320 320 321 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;321 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 322 322 AssertPtr(pThisCtx); 323 323 … … 332 332 333 333 /* 334 static int vboxClipboardURIListEntryWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,335 P VBOXCLIPBOARDLISTENTRY pListEntry)334 static int vboxClipboardURIListEntryWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 335 PSHCLLISTENTRY pListEntry) 336 336 { 337 337 LogFlowFuncEnter(); 338 338 339 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;339 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 340 340 AssertPtr(pThisCtx); 341 341 … … 347 347 */ 348 348 349 static int vboxClipboardURIObjOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx,350 P VBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms, PSHAREDCLIPBOARDOBJHANDLE phObj)349 static int vboxClipboardURIObjOpen(PSHCLPROVIDERCTX pCtx, 350 PSHCLOBJOPENCREATEPARMS pCreateParms, PSHCLOBJHANDLE phObj) 351 351 { 352 352 LogFlowFuncEnter(); 353 353 354 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;354 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 355 355 AssertPtr(pThisCtx); 356 356 … … 361 361 } 362 362 363 static int vboxClipboardURIObjClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj)363 static int vboxClipboardURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj) 364 364 { 365 365 LogFlowFuncEnter(); 366 366 367 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;367 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 368 368 AssertPtr(pThisCtx); 369 369 … … 374 374 } 375 375 376 static int vboxClipboardURIObjRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,376 static int vboxClipboardURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 377 377 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead) 378 378 { … … 381 381 LogFlowFuncEnter(); 382 382 383 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;383 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 384 384 AssertPtr(pThisCtx); 385 385 … … 390 390 } 391 391 392 static int vboxClipboardURIObjWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,392 static int vboxClipboardURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 393 393 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten) 394 394 { … … 397 397 LogFlowFuncEnter(); 398 398 399 P VBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;399 PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser; 400 400 AssertPtr(pThisCtx); 401 401 … … 407 407 #endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ 408 408 409 static LRESULT vboxClipboardWinProcessMsg(P VBOXCLIPBOARDCONTEXT pCtx, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)409 static LRESULT vboxClipboardWinProcessMsg(PSHCLCONTEXT pCtx, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) 410 410 { 411 411 AssertPtr(pCtx); 412 412 413 const P VBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;413 const PSHCLWINCTX pWinCtx = &pCtx->Win; 414 414 415 415 LRESULT lresultRc = 0; … … 427 427 /* Clipboard was updated by another application. 428 428 * Report available formats to the host. */ 429 SH AREDCLIPBOARDFORMATDATA Formats;429 SHCLFORMATDATA Formats; 430 430 int rc = VBoxClipboardWinGetFormats(&pCtx->Win, &Formats); 431 431 if (RT_SUCCESS(rc)) … … 454 454 /* Clipboard was updated by another application. */ 455 455 /* WM_DRAWCLIPBOARD always expects a return code of 0, so don't change "rc" here. */ 456 SH AREDCLIPBOARDFORMATDATA Formats;456 SHCLFORMATDATA Formats; 457 457 int rc = VBoxClipboardWinGetFormats(pWinCtx, &Formats); 458 458 if (RT_SUCCESS(rc)) … … 485 485 const UINT cfFormat = (UINT)wParam; 486 486 487 const VBOXCLIPBOARDFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat);487 const SHCLFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat); 488 488 489 489 LogFunc(("WM_RENDERFORMAT: cfFormat=%u -> fFormat=0x%x\n", cfFormat, fFormat)); … … 647 647 Assert(pEvent->enmType == VBGLR3CLIPBOARDEVENTTYPE_REPORT_FORMATS); 648 648 649 const VBOXCLIPBOARDFORMATS fFormats = pEvent->u.ReportFormats.uFormats;649 const SHCLFORMATS fFormats = pEvent->u.ReportFormats.uFormats; 650 650 651 651 if (fFormats != VBOX_SHARED_CLIPBOARD_FMT_NONE) /* Could arrive with some older GA versions. */ … … 661 661 LogFunc(("VBOX_SHARED_CLIPBOARD_FMT_URI_LIST\n")); 662 662 663 PSH AREDCLIPBOARDURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pCtx->URI,663 PSHCLURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pCtx->URI, 664 664 0 /* uIdx */); 665 665 if (pTransfer) … … 698 698 Assert(pEvent->enmType == VBGLR3CLIPBOARDEVENTTYPE_READ_DATA); 699 699 700 const VBOXCLIPBOARDFORMAT uFormat = (uint32_t)pEvent->u.ReadData.uFmt;700 const SHCLFORMAT uFormat = (uint32_t)pEvent->u.ReadData.uFmt; 701 701 702 702 HANDLE hClip = NULL; … … 715 715 if (lp != NULL) 716 716 { 717 SH AREDCLIPBOARDDATABLOCK dataBlock = { uFormat, lp, (uint32_t)GlobalSize(hClip) };717 SHCLDATABLOCK dataBlock = { uFormat, lp, (uint32_t)GlobalSize(hClip) }; 718 718 719 719 rc = VbglR3ClipboardWriteDataEx(&pEvent->cmdCtx, &dataBlock); … … 735 735 if (uniString != NULL) 736 736 { 737 SH AREDCLIPBOARDDATABLOCK dataBlock = { uFormat, uniString, ((uint32_t)lstrlenW(uniString) + 1) * 2 };737 SHCLDATABLOCK dataBlock = { uFormat, uniString, ((uint32_t)lstrlenW(uniString) + 1) * 2 }; 738 738 739 739 rc = VbglR3ClipboardWriteDataEx(&pEvent->cmdCtx, &dataBlock); … … 759 759 if (lp != NULL) 760 760 { 761 SH AREDCLIPBOARDDATABLOCK dataBlock = { uFormat, lp, (uint32_t)GlobalSize(hClip) };761 SHCLDATABLOCK dataBlock = { uFormat, lp, (uint32_t)GlobalSize(hClip) }; 762 762 763 763 rc = VbglR3ClipboardWriteDataEx(&pEvent->cmdCtx, &dataBlock); … … 780 780 if (RT_SUCCESS(rc)) 781 781 { 782 PSH AREDCLIPBOARDURITRANSFER pTransfer;783 rc = SharedClipboardURITransferCreate(SH AREDCLIPBOARDURITRANSFERDIR_WRITE,784 SH AREDCLIPBOARDSOURCE_LOCAL,782 PSHCLURITRANSFER pTransfer; 783 rc = SharedClipboardURITransferCreate(SHCLURITRANSFERDIR_WRITE, 784 SHCLSOURCE_LOCAL, 785 785 &pTransfer); 786 786 if (RT_SUCCESS(rc)) … … 809 809 if (RT_SUCCESS(rc)) 810 810 { 811 P VBOXCLIPBOARDURIWRITETHREADCTX pThreadCtx812 = (P VBOXCLIPBOARDURIWRITETHREADCTX)RTMemAllocZ(sizeof(VBOXCLIPBOARDURIWRITETHREADCTX));811 PSHCLURIWRITETHREADCTX pThreadCtx 812 = (PSHCLURIWRITETHREADCTX)RTMemAllocZ(sizeof(SHCLURIWRITETHREADCTX)); 813 813 if (pThreadCtx) 814 814 { … … 874 874 if (RT_SUCCESS(rc)) 875 875 { 876 PSH AREDCLIPBOARDURITRANSFER pTransfer;877 rc = SharedClipboardURITransferCreate(SH AREDCLIPBOARDURITRANSFERDIR_WRITE,878 SH AREDCLIPBOARDSOURCE_LOCAL,876 PSHCLURITRANSFER pTransfer; 877 rc = SharedClipboardURITransferCreate(SHCLURITRANSFERDIR_WRITE, 878 SHCLSOURCE_LOCAL, 879 879 &pTransfer); 880 880 if (RT_SUCCESS(rc)) … … 903 903 if (RT_SUCCESS(rc)) 904 904 { 905 P VBOXCLIPBOARDURIWRITETHREADCTX pThreadCtx906 = (P VBOXCLIPBOARDURIWRITETHREADCTX)RTMemAllocZ(sizeof(VBOXCLIPBOARDURIWRITETHREADCTX));905 PSHCLURIWRITETHREADCTX pThreadCtx 906 = (PSHCLURIWRITETHREADCTX)RTMemAllocZ(sizeof(SHCLURIWRITETHREADCTX)); 907 907 if (pThreadCtx) 908 908 { … … 949 949 SharedClipboardURICtxGetRunningTransfers(&pCtx->URI))); 950 950 951 PSH AREDCLIPBOARDURITRANSFER pTransfer;952 int rc = SharedClipboardURITransferCreate(SH AREDCLIPBOARDURITRANSFERDIR_READ,953 SH AREDCLIPBOARDSOURCE_LOCAL,951 PSHCLURITRANSFER pTransfer; 952 int rc = SharedClipboardURITransferCreate(SHCLURITRANSFERDIR_READ, 953 SHCLSOURCE_LOCAL, 954 954 &pTransfer); 955 955 if (RT_SUCCESS(rc)) 956 956 { 957 SH AREDCLIPBOARDURITRANSFERCALLBACKS TransferCallbacks;957 SHCLURITRANSFERCALLBACKS TransferCallbacks; 958 958 RT_ZERO(TransferCallbacks); 959 959 … … 964 964 SharedClipboardURITransferSetCallbacks(pTransfer, &TransferCallbacks); 965 965 966 SH AREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;966 SHCLPROVIDERCREATIONCTX creationCtx; 967 967 RT_ZERO(creationCtx); 968 968 969 creationCtx.enmSource = SH AREDCLIPBOARDSOURCE_REMOTE;969 creationCtx.enmSource = SHCLSOURCE_REMOTE; 970 970 971 971 creationCtx.Interface.pfnGetRoots = vboxClipboardURIGetRoots; … … 1029 1029 static LRESULT CALLBACK vboxClipboardWinWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 1030 1030 1031 static int vboxClipboardCreateWindow(P VBOXCLIPBOARDCONTEXT pCtx)1031 static int vboxClipboardCreateWindow(PSHCLCONTEXT pCtx) 1032 1032 { 1033 1033 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 1058 1058 if (RT_SUCCESS(rc)) 1059 1059 { 1060 const P VBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;1060 const PSHCLWINCTX pWinCtx = &pCtx->Win; 1061 1061 1062 1062 /* Create the window. */ … … 1084 1084 } 1085 1085 1086 static void vboxClipboardDestroy(P VBOXCLIPBOARDCONTEXT pCtx)1086 static void vboxClipboardDestroy(PSHCLCONTEXT pCtx) 1087 1087 { 1088 1088 AssertPtrReturnVoid(pCtx); 1089 1089 1090 const P VBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;1090 const PSHCLWINCTX pWinCtx = &pCtx->Win; 1091 1091 1092 1092 if (pWinCtx->hWnd) … … 1101 1101 static LRESULT CALLBACK vboxClipboardWinWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 1102 1102 { 1103 P VBOXCLIPBOARDCONTEXT pCtx = &g_Ctx; /** @todo r=andy Make pCtx available through SetWindowLongPtr() / GWL_USERDATA. */1103 PSHCLCONTEXT pCtx = &g_Ctx; /** @todo r=andy Make pCtx available through SetWindowLongPtr() / GWL_USERDATA. */ 1104 1104 AssertPtr(pCtx); 1105 1105 … … 1112 1112 LogFlowFuncEnter(); 1113 1113 1114 P VBOXCLIPBOARDCONTEXT pCtx = &g_Ctx; /* Only one instance for now. */1114 PSHCLCONTEXT pCtx = &g_Ctx; /* Only one instance for now. */ 1115 1115 AssertPtr(pCtx); 1116 1116 … … 1182 1182 RTThreadUserSignal(RTThreadSelf()); 1183 1183 1184 const P VBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)pInstance;1184 const PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pInstance; 1185 1185 AssertPtr(pCtx); 1186 1186 1187 const P VBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;1187 const PSHCLWINCTX pWinCtx = &pCtx->Win; 1188 1188 1189 1189 int rc; … … 1324 1324 LogFunc(("Stopping pInstance=%p\n", pInstance)); 1325 1325 1326 P VBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)pInstance;1326 PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pInstance; 1327 1327 AssertPtr(pCtx); 1328 1328 … … 1338 1338 AssertPtrReturnVoid(pInstance); 1339 1339 1340 P VBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)pInstance;1340 PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pInstance; 1341 1341 AssertPtr(pCtx); 1342 1342 -
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibClipboard.cpp
r80623 r80662 155 155 156 156 157 VBGLR3DECL(int) VbglR3ClipboardFormatsWriteRecv(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDFORMATDATA pFormats)157 VBGLR3DECL(int) VbglR3ClipboardFormatsWriteRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLFORMATDATA pFormats) 158 158 { 159 159 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 188 188 189 189 190 VBGLR3DECL(int) VbglR3ClipboardReadDataRecv(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDDATAREQ pDataReq)190 VBGLR3DECL(int) VbglR3ClipboardReadDataRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLDATAREQ pDataReq) 191 191 { 192 192 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 366 366 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 367 367 VBGLR3DECL(int) VbglR3ClipboardTransferSendStatus(PVBGLR3SHCLCMDCTX pCtx, 368 PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDURITRANSFERSTATUS uStatus)368 PSHCLURITRANSFER pTransfer, SHCLURITRANSFERSTATUS uStatus) 369 369 { 370 370 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 388 388 } 389 389 390 static int vbglR3ClipboardRootListHdrRead(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDROOTLISTHDR pRootListHdr)390 static int vbglR3ClipboardRootListHdrRead(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLISTHDR pRootListHdr) 391 391 { 392 392 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 416 416 } 417 417 418 static int vbglR3ClipboardRootListEntryRead(PVBGLR3SHCLCMDCTX pCtx, uint32_t uIndex, P VBOXCLIPBOARDROOTLISTENTRY pRootListEntry)418 static int vbglR3ClipboardRootListEntryRead(PVBGLR3SHCLCMDCTX pCtx, uint32_t uIndex, PSHCLROOTLISTENTRY pRootListEntry) 419 419 { 420 420 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 452 452 } 453 453 454 VBGLR3DECL(int) VbglR3ClipboardRootListRead(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDROOTLIST *ppRootList)454 VBGLR3DECL(int) VbglR3ClipboardRootListRead(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLIST *ppRootList) 455 455 { 456 456 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 459 459 int rc; 460 460 461 P VBOXCLIPBOARDROOTLIST pRootList = SharedClipboardURIRootListAlloc();461 PSHCLROOTLIST pRootList = SharedClipboardURIRootListAlloc(); 462 462 if (pRootList) 463 463 { 464 VBOXCLIPBOARDROOTLISTHDR srcRootListHdr;464 SHCLROOTLISTHDR srcRootListHdr; 465 465 rc = vbglR3ClipboardRootListHdrRead(pCtx, &srcRootListHdr); 466 466 if (RT_SUCCESS(rc)) … … 472 472 { 473 473 pRootList->paEntries = 474 (P VBOXCLIPBOARDROOTLISTENTRY)RTMemAllocZ(srcRootListHdr.cRoots * sizeof(VBOXCLIPBOARDROOTLISTENTRY));474 (PSHCLROOTLISTENTRY)RTMemAllocZ(srcRootListHdr.cRoots * sizeof(SHCLROOTLISTENTRY)); 475 475 if (pRootList->paEntries) 476 476 { … … 527 527 } 528 528 529 VBGLR3DECL(int) VbglR3ClipboardRootListHdrReadReply(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDROOTLISTHDR pRootListHdr)529 VBGLR3DECL(int) VbglR3ClipboardRootListHdrReadReply(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLISTHDR pRootListHdr) 530 530 { 531 531 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 579 579 } 580 580 581 VBGLR3DECL(int) VbglR3ClipboardRootListEntryReadReply(PVBGLR3SHCLCMDCTX pCtx, uint32_t uIndex, P VBOXCLIPBOARDROOTLISTENTRY pEntry)581 VBGLR3DECL(int) VbglR3ClipboardRootListEntryReadReply(PVBGLR3SHCLCMDCTX pCtx, uint32_t uIndex, PSHCLROOTLISTENTRY pEntry) 582 582 { 583 583 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 604 604 } 605 605 606 VBGLR3DECL(int) VbglR3ClipboardListOpenSend(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDLISTOPENPARMS pOpenParms,607 PSH AREDCLIPBOARDLISTHANDLE phList)606 VBGLR3DECL(int) VbglR3ClipboardListOpenSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTOPENPARMS pOpenParms, 607 PSHCLLISTHANDLE phList) 608 608 { 609 609 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 634 634 } 635 635 636 VBGLR3DECL(int) VbglR3ClipboardListOpenRecv(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDLISTOPENPARMS pOpenParms)636 VBGLR3DECL(int) VbglR3ClipboardListOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTOPENPARMS pOpenParms) 637 637 { 638 638 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 669 669 } 670 670 671 VBGLR3DECL(int) VbglR3ClipboardListOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SH AREDCLIPBOARDLISTHANDLE hList)671 VBGLR3DECL(int) VbglR3ClipboardListOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLLISTHANDLE hList) 672 672 { 673 673 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 680 680 681 681 Msg.uContext.SetUInt32(pCtx->uContextID); 682 Msg.enmType.SetUInt32(VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN);682 Msg.enmType.SetUInt32(VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN); 683 683 Msg.rc.SetUInt32((uint32_t)rcReply); /** int vs. uint32_t */ 684 684 Msg.cbPayload.SetUInt32(0); … … 693 693 } 694 694 695 VBGLR3DECL(int) VbglR3ClipboardListCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDLISTHANDLE phList)695 VBGLR3DECL(int) VbglR3ClipboardListCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTHANDLE phList) 696 696 { 697 697 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 719 719 } 720 720 721 VBGLR3DECL(int) VbglR3ClipboardListCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SH AREDCLIPBOARDLISTHANDLE hList)721 VBGLR3DECL(int) VbglR3ClipboardListCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLLISTHANDLE hList) 722 722 { 723 723 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 730 730 731 731 Msg.uContext.SetUInt32(pCtx->uContextID); 732 Msg.enmType.SetUInt32(VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_CLOSE);732 Msg.enmType.SetUInt32(VBOX_SHCL_REPLYMSGTYPE_LIST_CLOSE); 733 733 Msg.rc.SetUInt32((uint32_t)rcReply); /** int vs. uint32_t */ 734 734 Msg.cbPayload.SetUInt32(0); … … 743 743 } 744 744 745 VBGLR3DECL(int) VbglR3ClipboardListCloseSend(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDLISTHANDLE hList)745 VBGLR3DECL(int) VbglR3ClipboardListCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList) 746 746 { 747 747 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 763 763 764 764 765 VBGLR3DECL(int) VbglR3ClipboardListHdrRead(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDLISTHANDLE hList, uint32_t fFlags,766 P VBOXCLIPBOARDLISTHDR pListHdr)765 VBGLR3DECL(int) VbglR3ClipboardListHdrRead(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList, uint32_t fFlags, 766 PSHCLLISTHDR pListHdr) 767 767 { 768 768 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 798 798 } 799 799 800 VBGLR3DECL(int) VbglR3ClipboardListHdrReadRecvReq(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDLISTHANDLE phList, uint32_t *pfFlags)800 VBGLR3DECL(int) VbglR3ClipboardListHdrReadRecvReq(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTHANDLE phList, uint32_t *pfFlags) 801 801 { 802 802 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 828 828 } 829 829 830 VBGLR3DECL(int) VbglR3ClipboardListHdrWrite(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDLISTHANDLE hList,831 P VBOXCLIPBOARDLISTHDR pListHdr)830 VBGLR3DECL(int) VbglR3ClipboardListHdrWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList, 831 PSHCLLISTHDR pListHdr) 832 832 { 833 833 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 855 855 } 856 856 857 VBGLR3DECL(int) VbglR3ClipboardListEntryRead(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDLISTHANDLE hList,858 P VBOXCLIPBOARDLISTENTRY pListEntry)857 VBGLR3DECL(int) VbglR3ClipboardListEntryRead(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList, 858 PSHCLLISTENTRY pListEntry) 859 859 { 860 860 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 885 885 } 886 886 887 VBGLR3DECL(int) VbglR3ClipboardListEntryReadRecvReq(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDLISTHANDLE phList, uint32_t *pfInfo)887 VBGLR3DECL(int) VbglR3ClipboardListEntryReadRecvReq(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTHANDLE phList, uint32_t *pfInfo) 888 888 { 889 889 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 915 915 } 916 916 917 VBGLR3DECL(int) VbglR3ClipboardListEntryWrite(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDLISTHANDLE hList,918 P VBOXCLIPBOARDLISTENTRY pListEntry)917 VBGLR3DECL(int) VbglR3ClipboardListEntryWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList, 918 PSHCLLISTENTRY pListEntry) 919 919 { 920 920 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 941 941 } 942 942 943 VBGLR3DECL(int) VbglR3ClipboardObjOpenRecv(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms)943 VBGLR3DECL(int) VbglR3ClipboardObjOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms) 944 944 { 945 945 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 972 972 } 973 973 974 VBGLR3DECL(int) VbglR3ClipboardObjOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SH AREDCLIPBOARDOBJHANDLE hObj)974 VBGLR3DECL(int) VbglR3ClipboardObjOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLOBJHANDLE hObj) 975 975 { 976 976 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 983 983 984 984 Msg.uContext.SetUInt32(pCtx->uContextID); 985 Msg.enmType.SetUInt32(VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN);985 Msg.enmType.SetUInt32(VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN); 986 986 Msg.rc.SetUInt32((uint32_t)rcReply); /** int vs. uint32_t */ 987 987 Msg.cbPayload.SetUInt32(0); … … 996 996 } 997 997 998 VBGLR3DECL(int) VbglR3ClipboardObjOpenSend(PVBGLR3SHCLCMDCTX pCtx, P VBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms,999 PSH AREDCLIPBOARDOBJHANDLE phObj)998 VBGLR3DECL(int) VbglR3ClipboardObjOpenSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms, 999 PSHCLOBJHANDLE phObj) 1000 1000 { 1001 1001 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 1025 1025 } 1026 1026 1027 VBGLR3DECL(int) VbglR3ClipboardObjCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDOBJHANDLE phObj)1027 VBGLR3DECL(int) VbglR3ClipboardObjCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJHANDLE phObj) 1028 1028 { 1029 1029 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 1051 1051 } 1052 1052 1053 VBGLR3DECL(int) VbglR3ClipboardObjCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SH AREDCLIPBOARDOBJHANDLE hObj)1053 VBGLR3DECL(int) VbglR3ClipboardObjCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLOBJHANDLE hObj) 1054 1054 { 1055 1055 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 1062 1062 1063 1063 Msg.uContext.SetUInt32(pCtx->uContextID); 1064 Msg.enmType.SetUInt32(VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE);1064 Msg.enmType.SetUInt32(VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE); 1065 1065 Msg.rc.SetUInt32((uint32_t)rcReply); /** int vs. uint32_t */ 1066 1066 Msg.cbPayload.SetUInt32(0); … … 1075 1075 } 1076 1076 1077 VBGLR3DECL(int) VbglR3ClipboardObjCloseSend(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDOBJHANDLE hObj)1077 VBGLR3DECL(int) VbglR3ClipboardObjCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj) 1078 1078 { 1079 1079 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 1094 1094 } 1095 1095 1096 VBGLR3DECL(int) VbglR3ClipboardObjReadRecv(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDOBJHANDLE phObj, uint32_t *pcbToRead,1096 VBGLR3DECL(int) VbglR3ClipboardObjReadRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJHANDLE phObj, uint32_t *pcbToRead, 1097 1097 uint32_t *pfFlags) 1098 1098 { … … 1129 1129 } 1130 1130 1131 VBGLR3DECL(int) VbglR3ClipboardObjRead(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDOBJHANDLE hObj,1131 VBGLR3DECL(int) VbglR3ClipboardObjRead(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj, 1132 1132 void *pvData, uint32_t cbData, uint32_t *pcbRead) 1133 1133 { … … 1166 1166 } 1167 1167 1168 VBGLR3DECL(int) VbglR3ClipboardObjWrite(PVBGLR3SHCLCMDCTX pCtx, SH AREDCLIPBOARDOBJHANDLE hObj,1168 VBGLR3DECL(int) VbglR3ClipboardObjWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj, 1169 1169 void *pvData, uint32_t cbData, uint32_t *pcbWritten) 1170 1170 { … … 1201 1201 1202 1202 VBGLR3DECL(int) VbglR3ClipboardTransferEvent(PVBGLR3SHCLCMDCTX pCtx, uint32_t uMsg, uint32_t cParms, 1203 PSH AREDCLIPBOARDURITRANSFER pTransfer)1203 PSHCLURITRANSFER pTransfer) 1204 1204 { 1205 1205 RT_NOREF(cParms); … … 1220 1220 if (RT_SUCCESS(rc)) 1221 1221 { 1222 VBOXCLIPBOARDROOTLISTHDR rootListHdr;1222 SHCLROOTLISTHDR rootListHdr; 1223 1223 RT_ZERO(rootListHdr); 1224 1224 … … 1239 1239 if (RT_SUCCESS(rc)) 1240 1240 { 1241 VBOXCLIPBOARDROOTLISTENTRY rootListEntry;1241 SHCLROOTLISTENTRY rootListEntry; 1242 1242 rc = SharedClipboardURILTransferRootsEntry(pTransfer, uIndex, &rootListEntry); 1243 1243 if (RT_SUCCESS(rc)) … … 1249 1249 case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_OPEN: 1250 1250 { 1251 VBOXCLIPBOARDLISTOPENPARMS openParmsList;1251 SHCLLISTOPENPARMS openParmsList; 1252 1252 rc = SharedClipboardURIListOpenParmsInit(&openParmsList); 1253 1253 if (RT_SUCCESS(rc)) … … 1258 1258 LogFlowFunc(("pszPath=%s\n", openParmsList.pszPath)); 1259 1259 1260 SH AREDCLIPBOARDLISTHANDLE hList = SHAREDCLIPBOARDLISTHANDLE_INVALID;1260 SHCLLISTHANDLE hList = SHCLLISTHANDLE_INVALID; 1261 1261 rc = SharedClipboardURITransferListOpen(pTransfer, &openParmsList, &hList); 1262 1262 … … 1274 1274 case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_CLOSE: 1275 1275 { 1276 SH AREDCLIPBOARDLISTHANDLE hList;1276 SHCLLISTHANDLE hList; 1277 1277 rc = VbglR3ClipboardListCloseRecv(pCtx, &hList); 1278 1278 if (RT_SUCCESS(rc)) … … 1292 1292 /** @todo Handle filter + list features. */ 1293 1293 1294 SH AREDCLIPBOARDLISTHANDLE hList = SHAREDCLIPBOARDLISTHANDLE_INVALID;1294 SHCLLISTHANDLE hList = SHCLLISTHANDLE_INVALID; 1295 1295 uint32_t fFlags = 0; 1296 1296 rc = VbglR3ClipboardListHdrReadRecvReq(pCtx, &hList, &fFlags); 1297 1297 if (RT_SUCCESS(rc)) 1298 1298 { 1299 VBOXCLIPBOARDLISTHDR hdrList;1299 SHCLLISTHDR hdrList; 1300 1300 rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList); 1301 1301 if (RT_SUCCESS(rc)) … … 1315 1315 LogFlowFunc(("VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_HDR_WRITE\n")); 1316 1316 1317 VBOXCLIPBOARDLISTHDR hdrList;1317 SHCLLISTHDR hdrList; 1318 1318 rc = SharedClipboardURIListHdrInit(&hdrList); 1319 1319 if (RT_SUCCESS(rc)) … … 1329 1329 LogFlowFunc(("VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_ENTRY_READ\n")); 1330 1330 1331 VBOXCLIPBOARDLISTENTRY entryList;1331 SHCLLISTENTRY entryList; 1332 1332 rc = SharedClipboardURIListEntryInit(&entryList); 1333 1333 if (RT_SUCCESS(rc)) 1334 1334 { 1335 SH AREDCLIPBOARDLISTHANDLE hList;1335 SHCLLISTHANDLE hList; 1336 1336 uint32_t fInfo; 1337 1337 rc = VbglR3ClipboardListEntryReadRecvReq(pCtx, &hList, &fInfo); … … 1341 1341 if (RT_SUCCESS(rc)) 1342 1342 { 1343 PSH AREDCLIPBOARDFSOBJINFO pObjInfo = (PSHAREDCLIPBOARDFSOBJINFO)entryList.pvInfo;1344 Assert(entryList.cbInfo == sizeof(SH AREDCLIPBOARDFSOBJINFO));1343 PSHCLFSOBJINFO pObjInfo = (PSHCLFSOBJINFO)entryList.pvInfo; 1344 Assert(entryList.cbInfo == sizeof(SHCLFSOBJINFO)); 1345 1345 1346 1346 RT_NOREF(pObjInfo); … … 1369 1369 case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_OPEN: 1370 1370 { 1371 VBOXCLIPBOARDOBJOPENCREATEPARMS openParms;1371 SHCLOBJOPENCREATEPARMS openParms; 1372 1372 rc = SharedClipboardURIObjectOpenParmsInit(&openParms); 1373 1373 if (RT_SUCCESS(rc)) … … 1376 1376 if (RT_SUCCESS(rc)) 1377 1377 { 1378 SH AREDCLIPBOARDOBJHANDLE hObj;1378 SHCLOBJHANDLE hObj; 1379 1379 rc = SharedClipboardURIObjectOpen(pTransfer, &openParms, &hObj); 1380 1380 … … 1392 1392 case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_CLOSE: 1393 1393 { 1394 SH AREDCLIPBOARDOBJHANDLE hObj;1394 SHCLOBJHANDLE hObj; 1395 1395 rc = VbglR3ClipboardObjCloseRecv(pCtx, &hObj); 1396 1396 if (RT_SUCCESS(rc)) … … 1408 1408 case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_READ: 1409 1409 { 1410 SH AREDCLIPBOARDOBJHANDLE hObj;1410 SHCLOBJHANDLE hObj; 1411 1411 uint32_t cbBuf; 1412 1412 uint32_t fFlags; … … 1549 1549 1550 1550 #if 0 1551 VBGLR3DECL(int) VbglR3ClipboardListHdrReadRecv(HGCMCLIENTID idClient, P VBOXCLIPBOARDLISTHANDLE phList)1551 VBGLR3DECL(int) VbglR3ClipboardListHdrReadRecv(HGCMCLIENTID idClient, PSHCLLISTHANDLE phList) 1552 1552 { 1553 1553 AssertPtrReturn(phList, VERR_INVALID_POINTER); … … 1581 1581 */ 1582 1582 VBGLR3DECL(int) VbglR3ClipboardListHdrSend(HGCMCLIENTID idClient, 1583 VBOXCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)1583 SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr) 1584 1584 { 1585 1585 AssertPtrReturn(pListHdr, VERR_INVALID_POINTER); … … 1613 1613 */ 1614 1614 VBGLR3DECL(int) VbglR3ClipboardSendListEntryWrite(HGCMCLIENTID idClient, 1615 VBOXCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pListEntry)1615 SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry) 1616 1616 { 1617 1617 AssertPtrReturn(pListEntry, VERR_INVALID_POINTER); … … 1643 1643 * @param pFormats The formats to send (report). 1644 1644 */ 1645 VBGLR3DECL(int) VbglR3ClipboardFormatsSend(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDFORMATDATA pFormats)1645 VBGLR3DECL(int) VbglR3ClipboardFormatsSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLFORMATDATA pFormats) 1646 1646 { 1647 1647 VBoxClipboardFormatsMsg Msg; … … 1725 1725 * @param pData Clipboard data to send. 1726 1726 */ 1727 VBGLR3DECL(int) VbglR3ClipboardWriteDataEx(PVBGLR3SHCLCMDCTX pCtx, PSH AREDCLIPBOARDDATABLOCK pData)1727 VBGLR3DECL(int) VbglR3ClipboardWriteDataEx(PVBGLR3SHCLCMDCTX pCtx, PSHCLDATABLOCK pData) 1728 1728 { 1729 1729 int rc; -
trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
r80623 r80662 44 44 * Global clipboard context information. 45 45 */ 46 struct _ VBOXCLIPBOARDCONTEXT46 struct _SHCLCONTEXT 47 47 { 48 48 /** Client ID for the clipboard subsystem */ … … 54 54 55 55 /** Only one client is supported. There seems to be no need for more clients. */ 56 static VBOXCLIPBOARDCONTEXT g_ctx;56 static SHCLCONTEXT g_ctx; 57 57 58 58 … … 86 86 * returned 87 87 */ 88 int ClipRequestDataForX11( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)88 int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb) 89 89 { 90 90 RT_NOREF1(pCtx); … … 148 148 * @param u32Formats The formats to report. 149 149 */ 150 void ClipReportX11Formats( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)150 void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats) 151 151 { 152 152 RT_NOREF1(pCtx); … … 166 166 * @param cb the size of the data in @a pv 167 167 */ 168 void ClipRequestFromX11CompleteCallback( VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)168 void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb) 169 169 { 170 170 RT_NOREF1(pCtx); -
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardArea.cpp
r79347 r80662 38 38 , m_fOpen(0) 39 39 , m_hDir(NIL_RTDIR) 40 , m_uID(NIL_SH AREDCLIPBOARDAREAID)40 , m_uID(NIL_SHCLAREAID) 41 41 { 42 42 int rc = initInternal(); … … 46 46 47 47 SharedClipboardArea::SharedClipboardArea(const char *pszPath, 48 SH AREDCLIPBOARDAREAID uID /* = NIL_SHAREDCLIPBOARDAREAID */,49 SH AREDCLIPBOARDAREAOPENFLAGS fFlags /* = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE */)48 SHCLAREAID uID /* = NIL_SHCLAREAID */, 49 SHCLAREAOPENFLAGS fFlags /* = SHCLAREA_OPEN_FLAGS_NONE */) 50 50 : m_tsCreatedMs(0) 51 51 , m_cRefs(0) … … 115 115 } 116 116 117 int SharedClipboardArea::AddObject(const char *pszPath, const SH AREDCLIPBOARDAREAOBJ &Obj)117 int SharedClipboardArea::AddObject(const char *pszPath, const SHCLAREAOBJ &Obj) 118 118 { 119 119 AssertPtrReturn(pszPath, VERR_INVALID_POINTER); … … 126 126 } 127 127 128 int SharedClipboardArea::GetObject(const char *pszPath, PSH AREDCLIPBOARDAREAOBJ pObj)128 int SharedClipboardArea::GetObject(const char *pszPath, PSHCLAREAOBJ pObj) 129 129 { 130 130 SharedClipboardAreaFsObjMap::const_iterator itObj = m_mapObj.find(pszPath); … … 166 166 if (RT_SUCCESS(rc)) 167 167 { 168 this->m_fOpen = SH AREDCLIPBOARDAREA_OPEN_FLAGS_NONE;169 this->m_uID = NIL_SH AREDCLIPBOARDAREAID;168 this->m_fOpen = SHCLAREA_OPEN_FLAGS_NONE; 169 this->m_uID = NIL_SHCLAREAID; 170 170 } 171 171 … … 185 185 */ 186 186 /* static */ 187 int SharedClipboardArea::PathConstruct(const char *pszBase, SH AREDCLIPBOARDAREAID uID, char *pszPath, size_t cbPath)187 int SharedClipboardArea::PathConstruct(const char *pszBase, SHCLAREAID uID, char *pszPath, size_t cbPath) 188 188 { 189 189 LogFlowFunc(("pszBase=%s, uAreaID=%RU32\n", pszBase, uID)); … … 224 224 } 225 225 226 SH AREDCLIPBOARDAREAID SharedClipboardArea::GetID(void) const226 SHCLAREAID SharedClipboardArea::GetID(void) const 227 227 { 228 228 return this->m_uID; … … 245 245 246 246 int SharedClipboardArea::OpenEx(const char *pszPath, 247 SH AREDCLIPBOARDAREAID uID /* = NIL_SHAREDCLIPBOARDAREAID */,248 SH AREDCLIPBOARDAREAOPENFLAGS fFlags /* = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE */)247 SHCLAREAID uID /* = NIL_SHCLAREAID */, 248 SHCLAREAOPENFLAGS fFlags /* = SHCLAREA_OPEN_FLAGS_NONE */) 249 249 { 250 250 AssertPtrReturn(pszPath, VERR_INVALID_POINTER); 251 AssertReturn(!(fFlags & ~SH AREDCLIPBOARDAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);251 AssertReturn(!(fFlags & ~SHCLAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS); 252 252 253 253 char szAreaDir[RTPATH_MAX]; … … 256 256 { 257 257 if ( RTDirExists(szAreaDir) 258 && (fFlags & SH AREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST))258 && (fFlags & SHCLAREA_OPEN_FLAGS_MUST_NOT_EXIST)) 259 259 { 260 260 rc = VERR_ALREADY_EXISTS; … … 282 282 } 283 283 284 int SharedClipboardArea::OpenTemp(SH AREDCLIPBOARDAREAID uID,285 SH AREDCLIPBOARDAREAOPENFLAGS fFlags /* = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE */)286 { 287 AssertReturn(!(fFlags & ~SH AREDCLIPBOARDAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);284 int SharedClipboardArea::OpenTemp(SHCLAREAID uID, 285 SHCLAREAOPENFLAGS fFlags /* = SHCLAREA_OPEN_FLAGS_NONE */) 286 { 287 AssertReturn(!(fFlags & ~SHCLAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS); 288 288 289 289 /* -
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp
r80359 r80662 41 41 //#define VBOX_CLIPBOARD_WITH_UNICODE_SUPPORT 0 42 42 43 VBoxClipboardWinDataObject::VBoxClipboardWinDataObject(PSH AREDCLIPBOARDURITRANSFER pTransfer,43 VBoxClipboardWinDataObject::VBoxClipboardWinDataObject(PSHCLURITRANSFER pTransfer, 44 44 LPFORMATETC pFormatEtc, LPSTGMEDIUM pStgMed, ULONG cFormats) 45 45 : m_enmStatus(Uninitialized) … … 229 229 * @param strDir Directory path to handle. 230 230 */ 231 int VBoxClipboardWinDataObject::readDir(PSH AREDCLIPBOARDURITRANSFER pTransfer, const Utf8Str &strDir)231 int VBoxClipboardWinDataObject::readDir(PSHCLURITRANSFER pTransfer, const Utf8Str &strDir) 232 232 { 233 233 LogFlowFunc(("strDir=%s\n", strDir.c_str())); 234 234 235 VBOXCLIPBOARDLISTOPENPARMS openParmsList;235 SHCLLISTOPENPARMS openParmsList; 236 236 int rc = SharedClipboardURIListOpenParmsInit(&openParmsList); 237 237 if (RT_SUCCESS(rc)) … … 240 240 if (RT_SUCCESS(rc)) 241 241 { 242 SH AREDCLIPBOARDLISTHANDLE hList;242 SHCLLISTHANDLE hList; 243 243 rc = SharedClipboardURITransferListOpen(pTransfer, &openParmsList, &hList); 244 244 if (RT_SUCCESS(rc)) … … 246 246 LogFlowFunc(("strDir=%s -> hList=%RU64\n", strDir.c_str(), hList)); 247 247 248 VBOXCLIPBOARDLISTHDR hdrList;248 SHCLLISTHDR hdrList; 249 249 rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList); 250 250 if (RT_SUCCESS(rc)) … … 255 255 for (uint64_t o = 0; o < hdrList.cTotalObjects; o++) 256 256 { 257 VBOXCLIPBOARDLISTENTRY entryList;257 SHCLLISTENTRY entryList; 258 258 rc = SharedClipboardURITransferListRead(pTransfer, hList, &entryList); 259 259 if (RT_SUCCESS(rc)) 260 260 { 261 PSH AREDCLIPBOARDFSOBJINFO pFsObjInfo = (PSHAREDCLIPBOARDFSOBJINFO)entryList.pvInfo;262 Assert(entryList.cbInfo == sizeof(SH AREDCLIPBOARDFSOBJINFO));261 PSHCLFSOBJINFO pFsObjInfo = (PSHCLFSOBJINFO)entryList.pvInfo; 262 Assert(entryList.cbInfo == sizeof(SHCLFSOBJINFO)); 263 263 264 264 Utf8Str strPath = strDir + Utf8Str("\\") + Utf8Str(entryList.pszName); … … 320 320 VBoxClipboardWinDataObject *pThis = (VBoxClipboardWinDataObject *)pvUser; 321 321 322 PSH AREDCLIPBOARDURITRANSFER pTransfer = pThis->m_pTransfer;322 PSHCLURITRANSFER pTransfer = pThis->m_pTransfer; 323 323 AssertPtr(pTransfer); 324 324 … … 333 333 if (RT_SUCCESS(rc)) 334 334 { 335 P VBOXCLIPBOARDROOTLIST pRootList;335 PSHCLROOTLIST pRootList; 336 336 rc = SharedClipboardURILTransferRootsAsList(pTransfer, &pRootList); 337 337 if (RT_SUCCESS(rc)) … … 341 341 for (uint32_t i = 0; i < pRootList->Hdr.cRoots; i++) 342 342 { 343 P VBOXCLIPBOARDLISTENTRY pRootEntry = &pRootList->paEntries[i];343 PSHCLLISTENTRY pRootEntry = &pRootList->paEntries[i]; 344 344 AssertPtr(pRootEntry); 345 345 346 Assert(pRootEntry->cbInfo == sizeof(SH AREDCLIPBOARDFSOBJINFO));347 PSH AREDCLIPBOARDFSOBJINFO pFsObjInfo = (PSHAREDCLIPBOARDFSOBJINFO)pRootEntry->pvInfo;346 Assert(pRootEntry->cbInfo == sizeof(SHCLFSOBJINFO)); 347 PSHCLFSOBJINFO pFsObjInfo = (PSHCLFSOBJINFO)pRootEntry->pvInfo; 348 348 349 349 LogFlowFunc(("pszRoot=%s, fMode=0x%x\n", pRootEntry->pszName, pFsObjInfo->Attr.fMode)); … … 405 405 * @param phGlobal Where to store the allocated HGLOBAL object on success. 406 406 */ 407 int VBoxClipboardWinDataObject::createFileGroupDescriptorFromTransfer(PSH AREDCLIPBOARDURITRANSFER pTransfer,407 int VBoxClipboardWinDataObject::createFileGroupDescriptorFromTransfer(PSHCLURITRANSFER pTransfer, 408 408 bool fUnicode, HGLOBAL *phGlobal) 409 409 { … … 478 478 pFD->dwFileAttributes = FILE_ATTRIBUTE_NORMAL; 479 479 480 const SH AREDCLIPBOARDFSOBJINFO *pObjInfo = &itRoot->objInfo;480 const SHCLFSOBJINFO *pObjInfo = &itRoot->objInfo; 481 481 482 482 if (RTFS_IS_DIRECTORY(pObjInfo->Attr.fMode)) … … 558 558 559 559 /* The caller can call GetData() several times, so make sure we don't do the same transfer multiple times. */ 560 if (SharedClipboardURITransferGetStatus(m_pTransfer) == SH AREDCLIPBOARDURITRANSFERSTATUS_NONE)560 if (SharedClipboardURITransferGetStatus(m_pTransfer) == SHCLURITRANSFERSTATUS_NONE) 561 561 { 562 562 rc = SharedClipboardURITransferPrepare(m_pTransfer); … … 615 615 /* Hand-in the provider so that our IStream implementation can continue working with it. */ 616 616 hr = VBoxClipboardWinStreamImpl::Create(this /* pParent */, m_pTransfer, 617 fsObjEntry.strPath.c_str()/* File name */, &fsObjEntry.objInfo /* PSH AREDCLIPBOARDFSOBJINFO */,617 fsObjEntry.strPath.c_str()/* File name */, &fsObjEntry.objInfo /* PSHCLFSOBJINFO */, 618 618 &m_pStream); 619 619 if (SUCCEEDED(hr)) -
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp
r80359 r80662 46 46 47 47 48 VBoxClipboardWinStreamImpl::VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSH AREDCLIPBOARDURITRANSFER pTransfer,49 const Utf8Str &strPath, PSH AREDCLIPBOARDFSOBJINFO pObjInfo)48 VBoxClipboardWinStreamImpl::VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSHCLURITRANSFER pTransfer, 49 const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo) 50 50 : m_pParent(pParent) 51 51 , m_lRefCount(1) /* Our IDataObjct *always* holds the last reference to this object; needed for the callbacks. */ 52 52 , m_pURITransfer(pTransfer) 53 53 , m_strPath(strPath) 54 , m_hObj(SH AREDCLIPBOARDOBJHANDLE_INVALID)54 , m_hObj(SHCLOBJHANDLE_INVALID) 55 55 , m_objInfo(*pObjInfo) 56 56 , m_cbProcessed(0) … … 184 184 try 185 185 { 186 if ( m_hObj == SH AREDCLIPBOARDOBJHANDLE_INVALID186 if ( m_hObj == SHCLOBJHANDLE_INVALID 187 187 && m_pURITransfer->ProviderIface.pfnObjOpen) 188 188 { 189 VBOXCLIPBOARDOBJOPENCREATEPARMS openParms;189 SHCLOBJOPENCREATEPARMS openParms; 190 190 rc = SharedClipboardURIObjectOpenParmsInit(&openParms); 191 191 if (RT_SUCCESS(rc)) 192 192 { 193 openParms.fCreate = SH AREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS194 | SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW195 | SH AREDCLIPBOARD_OBJ_CF_ACCESS_READ196 | SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE;193 openParms.fCreate = SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS 194 | SHCL_OBJ_CF_ACT_FAIL_IF_NEW 195 | SHCL_OBJ_CF_ACCESS_READ 196 | SHCL_OBJ_CF_ACCESS_DENYWRITE; 197 197 198 198 rc = RTStrCopy(openParms.pszPath, openParms.cbPath, m_strPath.c_str()); … … 362 362 */ 363 363 /* static */ 364 HRESULT VBoxClipboardWinStreamImpl::Create(VBoxClipboardWinDataObject *pParent, PSH AREDCLIPBOARDURITRANSFER pTransfer,365 const Utf8Str &strPath, PSH AREDCLIPBOARDFSOBJINFO pObjInfo,364 HRESULT VBoxClipboardWinStreamImpl::Create(VBoxClipboardWinDataObject *pParent, PSHCLURITRANSFER pTransfer, 365 const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo, 366 366 IStream **ppStream) 367 367 { -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
r80623 r80662 42 42 */ 43 43 int SharedClipboardPayloadAlloc(uint32_t uID, const void *pvData, uint32_t cbData, 44 PSH AREDCLIPBOARDEVENTPAYLOAD *ppPayload)44 PSHCLEVENTPAYLOAD *ppPayload) 45 45 { 46 46 AssertPtrReturn(pvData, VERR_INVALID_POINTER); 47 47 AssertReturn (cbData, VERR_INVALID_PARAMETER); 48 48 49 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload =50 (PSH AREDCLIPBOARDEVENTPAYLOAD)RTMemAlloc(sizeof(SHAREDCLIPBOARDEVENTPAYLOAD));49 PSHCLEVENTPAYLOAD pPayload = 50 (PSHCLEVENTPAYLOAD)RTMemAlloc(sizeof(SHCLEVENTPAYLOAD)); 51 51 if (!pPayload) 52 52 return VERR_NO_MEMORY; … … 75 75 * @param pPayload Event payload to free. 76 76 */ 77 void SharedClipboardPayloadFree(PSH AREDCLIPBOARDEVENTPAYLOAD pPayload)77 void SharedClipboardPayloadFree(PSHCLEVENTPAYLOAD pPayload) 78 78 { 79 79 if (!pPayload) … … 100 100 * @param uID Event ID to use. 101 101 */ 102 int SharedClipboardEventCreate(PSH AREDCLIPBOARDEVENT pEvent, VBOXCLIPBOARDEVENTID uID)102 int SharedClipboardEventCreate(PSHCLEVENT pEvent, SHCLEVENTID uID) 103 103 { 104 104 AssertPtrReturn(pEvent, VERR_INVALID_POINTER); … … 121 121 * @param pEvent Event to destroy. 122 122 */ 123 void SharedClipboardEventDestroy(PSH AREDCLIPBOARDEVENT pEvent)123 void SharedClipboardEventDestroy(PSHCLEVENT pEvent) 124 124 { 125 125 if (!pEvent) … … 146 146 * @param uID ID to use for event source. 147 147 */ 148 int SharedClipboardEventSourceCreate(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTSOURCEID uID)148 int SharedClipboardEventSourceCreate(PSHCLEVENTSOURCE pSource, SHCLEVENTSOURCEID uID) 149 149 { 150 150 AssertPtrReturn(pSource, VERR_INVALID_POINTER); … … 169 169 * @param pSource Event source to destroy. 170 170 */ 171 void SharedClipboardEventSourceDestroy(PSH AREDCLIPBOARDEVENTSOURCE pSource)171 void SharedClipboardEventSourceDestroy(PSHCLEVENTSOURCE pSource) 172 172 { 173 173 if (!pSource) … … 176 176 LogFlowFunc(("ID=%RU16\n", pSource->uID)); 177 177 178 PSH AREDCLIPBOARDEVENT pEvIt;179 PSH AREDCLIPBOARDEVENT pEvItNext;180 RTListForEachSafe(&pSource->lstEvents, pEvIt, pEvItNext, SH AREDCLIPBOARDEVENT, Node)178 PSHCLEVENT pEvIt; 179 PSHCLEVENT pEvItNext; 180 RTListForEachSafe(&pSource->lstEvents, pEvIt, pEvItNext, SHCLEVENT, Node) 181 181 { 182 182 SharedClipboardEventDestroy(pEvIt); … … 194 194 * @param pSource Event source to generate event for. 195 195 */ 196 VBOXCLIPBOARDEVENTID SharedClipboardEventIDGenerate(PSHAREDCLIPBOARDEVENTSOURCE pSource)196 SHCLEVENTID SharedClipboardEventIDGenerate(PSHCLEVENTSOURCE pSource) 197 197 { 198 198 AssertPtrReturn(pSource, 0); … … 209 209 * @param uID Event ID to get. 210 210 */ 211 inline PSH AREDCLIPBOARDEVENT sharedClipboardEventGet(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)212 { 213 PSH AREDCLIPBOARDEVENT pEvIt;214 RTListForEach(&pSource->lstEvents, pEvIt, SH AREDCLIPBOARDEVENT, Node)211 inline PSHCLEVENT sharedClipboardEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID) 212 { 213 PSHCLEVENT pEvIt; 214 RTListForEach(&pSource->lstEvents, pEvIt, SHCLEVENT, Node) 215 215 { 216 216 if (pEvIt->uID == uID) … … 227 227 * @param pSource Event source to get last registered event from. 228 228 */ 229 VBOXCLIPBOARDEVENTID SharedClipboardEventGetLast(PSHAREDCLIPBOARDEVENTSOURCE pSource)229 SHCLEVENTID SharedClipboardEventGetLast(PSHCLEVENTSOURCE pSource) 230 230 { 231 231 AssertPtrReturn(pSource, 0); 232 PSH AREDCLIPBOARDEVENT pEvent = RTListGetLast(&pSource->lstEvents, SHAREDCLIPBOARDEVENT, Node);232 PSHCLEVENT pEvent = RTListGetLast(&pSource->lstEvents, SHCLEVENT, Node); 233 233 if (pEvent) 234 234 return pEvent->uID; … … 244 244 * @param uID Event ID to register. 245 245 */ 246 int SharedClipboardEventRegister(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)246 int SharedClipboardEventRegister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID) 247 247 { 248 248 AssertPtrReturn(pSource, VERR_INVALID_POINTER); … … 254 254 if (sharedClipboardEventGet(pSource, uID) == NULL) 255 255 { 256 PSH AREDCLIPBOARDEVENT pEvent257 = (PSH AREDCLIPBOARDEVENT)RTMemAllocZ(sizeof(SHAREDCLIPBOARDEVENT));256 PSHCLEVENT pEvent 257 = (PSHCLEVENT)RTMemAllocZ(sizeof(SHCLEVENT)); 258 258 if (pEvent) 259 259 { … … 287 287 * @param uID Event ID to unregister. 288 288 */ 289 int SharedClipboardEventUnregister(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)289 int SharedClipboardEventUnregister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID) 290 290 { 291 291 AssertPtrReturn(pSource, VERR_INVALID_POINTER); … … 295 295 LogFlowFunc(("uSource=%RU16, uEvent=%RU16\n", pSource->uID, uID)); 296 296 297 PSH AREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);297 PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID); 298 298 if (pEvent) 299 299 { … … 326 326 * SharedClipboardPayloadFree(). 327 327 */ 328 int SharedClipboardEventWait(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID, RTMSINTERVAL uTimeoutMs,329 PSH AREDCLIPBOARDEVENTPAYLOAD* ppPayload)328 int SharedClipboardEventWait(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, RTMSINTERVAL uTimeoutMs, 329 PSHCLEVENTPAYLOAD* ppPayload) 330 330 { 331 331 AssertPtrReturn(pSource, VERR_INVALID_POINTER); … … 335 335 int rc; 336 336 337 PSH AREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);337 PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID); 338 338 if (pEvent) 339 339 { … … 361 361 * @param pPayload Event payload to associate. Takes ownership. Optional. 362 362 */ 363 int SharedClipboardEventSignal(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID,364 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload)363 int SharedClipboardEventSignal(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, 364 PSHCLEVENTPAYLOAD pPayload) 365 365 { 366 366 AssertPtrReturn(pSource, VERR_INVALID_POINTER); … … 370 370 LogFlowFunc(("uSource=%RU16, uEvent=%RU16\n", pSource->uID, uID)); 371 371 372 PSH AREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);372 PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID); 373 373 if (pEvent) 374 374 { … … 393 393 * @param uID Event ID to detach payload for. 394 394 */ 395 void SharedClipboardEventPayloadDetach(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)395 void SharedClipboardEventPayloadDetach(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID) 396 396 { 397 397 AssertPtrReturnVoid(pSource); … … 399 399 LogFlowFunc(("uSource=%RU16, uEvent=%RU16\n", pSource->uID, uID)); 400 400 401 PSH AREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);401 PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID); 402 402 if (pEvent) 403 403 { … … 751 751 } 752 752 753 void VBoxClipboardDbgDumpData(const void *pv, size_t cb, VBOXCLIPBOARDFORMAT u32Format)753 void VBoxClipboardDbgDumpData(const void *pv, size_t cb, SHCLFORMAT u32Format) 754 754 { 755 755 if (u32Format & VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT) -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-uri.cpp
r80444 r80662 30 30 31 31 32 static int sharedClipboardURITransferThreadCreate(PSH AREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser);33 static int sharedClipboardURITransferThreadDestroy(PSH AREDCLIPBOARDURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs);34 static PSH AREDCLIPBOARDURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx);32 static int sharedClipboardURITransferThreadCreate(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser); 33 static int sharedClipboardURITransferThreadDestroy(PSHCLURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs); 34 static PSHCLURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHCLURICTX pURI, uint32_t uIdx); 35 35 static int sharedClipboardConvertFileCreateFlags(bool fWritable, unsigned fShClFlags, RTFMODE fMode, 36 SH AREDCLIPBOARDOBJHANDLE handleInitial, uint64_t *pfOpen);36 SHCLOBJHANDLE handleInitial, uint64_t *pfOpen); 37 37 38 38 /** @todo Split this file up in different modules. */ … … 43 43 * @returns Allocated URI root list on success, or NULL on failure. 44 44 */ 45 P VBOXCLIPBOARDROOTLIST SharedClipboardURIRootListAlloc(void)46 { 47 P VBOXCLIPBOARDROOTLIST pRootList = (PVBOXCLIPBOARDROOTLIST)RTMemAllocZ(sizeof(VBOXCLIPBOARDROOTLIST));45 PSHCLROOTLIST SharedClipboardURIRootListAlloc(void) 46 { 47 PSHCLROOTLIST pRootList = (PSHCLROOTLIST)RTMemAllocZ(sizeof(SHCLROOTLIST)); 48 48 49 49 return pRootList; … … 56 56 * invalid after returning from this function. 57 57 */ 58 void SharedClipboardURIRootListFree(P VBOXCLIPBOARDROOTLIST pRootList)58 void SharedClipboardURIRootListFree(PSHCLROOTLIST pRootList) 59 59 { 60 60 if (!pRootList) … … 74 74 * @param pRootLstHdr Root list header to initialize. 75 75 */ 76 int SharedClipboardURIRootListHdrInit(P VBOXCLIPBOARDROOTLISTHDR pRootLstHdr)76 int SharedClipboardURIRootListHdrInit(PSHCLROOTLISTHDR pRootLstHdr) 77 77 { 78 78 AssertPtrReturn(pRootLstHdr, VERR_INVALID_POINTER); 79 79 80 RT_BZERO(pRootLstHdr, sizeof( VBOXCLIPBOARDROOTLISTHDR));80 RT_BZERO(pRootLstHdr, sizeof(SHCLROOTLISTHDR)); 81 81 82 82 return VINF_SUCCESS; … … 88 88 * @param pRootLstHdr Root list header to destroy. 89 89 */ 90 void SharedClipboardURIRootListHdrDestroy(P VBOXCLIPBOARDROOTLISTHDR pRootLstHdr)90 void SharedClipboardURIRootListHdrDestroy(PSHCLROOTLISTHDR pRootLstHdr) 91 91 { 92 92 if (!pRootLstHdr) … … 103 103 * @param pRootLstHdr Root list header to duplicate. 104 104 */ 105 P VBOXCLIPBOARDROOTLISTHDR SharedClipboardURIRootListHdrDup(PVBOXCLIPBOARDROOTLISTHDR pRootLstHdr)105 PSHCLROOTLISTHDR SharedClipboardURIRootListHdrDup(PSHCLROOTLISTHDR pRootLstHdr) 106 106 { 107 107 AssertPtrReturn(pRootLstHdr, NULL); … … 109 109 int rc = VINF_SUCCESS; 110 110 111 P VBOXCLIPBOARDROOTLISTHDR pRootsDup = (PVBOXCLIPBOARDROOTLISTHDR)RTMemAllocZ(sizeof(VBOXCLIPBOARDROOTLISTHDR));111 PSHCLROOTLISTHDR pRootsDup = (PSHCLROOTLISTHDR)RTMemAllocZ(sizeof(SHCLROOTLISTHDR)); 112 112 if (pRootsDup) 113 113 { … … 132 132 * @param pListEntry Clipboard root list entry to copy. 133 133 */ 134 int SharedClipboardURIRootListEntryCopy(P VBOXCLIPBOARDROOTLISTENTRY pDst, PVBOXCLIPBOARDROOTLISTENTRY pSrc)134 int SharedClipboardURIRootListEntryCopy(PSHCLROOTLISTENTRY pDst, PSHCLROOTLISTENTRY pSrc) 135 135 { 136 136 return SharedClipboardURIListEntryCopy(pDst, pSrc); … … 143 143 * @param pListEntry Clipboard root list entry to duplicate. 144 144 */ 145 P VBOXCLIPBOARDROOTLISTENTRY SharedClipboardURIRootListEntryDup(PVBOXCLIPBOARDROOTLISTENTRY pRootListEntry)145 PSHCLROOTLISTENTRY SharedClipboardURIRootListEntryDup(PSHCLROOTLISTENTRY pRootListEntry) 146 146 { 147 147 return SharedClipboardURIListEntryDup(pRootListEntry); … … 153 153 * @param pListEntry Clipboard root list entry structure to destroy. 154 154 */ 155 void SharedClipboardURIRootListEntryDestroy(P VBOXCLIPBOARDROOTLISTENTRY pRootListEntry)155 void SharedClipboardURIRootListEntryDestroy(PSHCLROOTLISTENTRY pRootListEntry) 156 156 { 157 157 return SharedClipboardURIListEntryDestroy(pRootListEntry); … … 163 163 * @param pInfo List handle info structure to destroy. 164 164 */ 165 void SharedClipboardURIListHandleInfoDestroy(PSH AREDCLIPBOARDURILISTHANDLEINFO pInfo)165 void SharedClipboardURIListHandleInfoDestroy(PSHCLURILISTHANDLEINFO pInfo) 166 166 { 167 167 if (!pInfo) … … 181 181 * @param ppListHdr Where to store the allocated URI list header structure on success. 182 182 */ 183 int SharedClipboardURIListHdrAlloc(P VBOXCLIPBOARDLISTHDR *ppListHdr)183 int SharedClipboardURIListHdrAlloc(PSHCLLISTHDR *ppListHdr) 184 184 { 185 185 int rc; 186 186 187 P VBOXCLIPBOARDLISTHDR pListHdr = (PVBOXCLIPBOARDLISTHDR)RTMemAllocZ(sizeof(VBOXCLIPBOARDLISTHDR));187 PSHCLLISTHDR pListHdr = (PSHCLLISTHDR)RTMemAllocZ(sizeof(SHCLLISTHDR)); 188 188 if (pListHdr) 189 189 { … … 203 203 * @param pListEntry URI list header structure to free. 204 204 */ 205 void SharedClipboardURIListHdrFree(P VBOXCLIPBOARDLISTHDR pListHdr)205 void SharedClipboardURIListHdrFree(PSHCLLISTHDR pListHdr) 206 206 { 207 207 if (!pListHdr) … … 222 222 * @param pListHdr URI list header to duplicate. 223 223 */ 224 P VBOXCLIPBOARDLISTHDR SharedClipboardURIListHdrDup(PVBOXCLIPBOARDLISTHDR pListHdr)224 PSHCLLISTHDR SharedClipboardURIListHdrDup(PSHCLLISTHDR pListHdr) 225 225 { 226 226 AssertPtrReturn(pListHdr, NULL); 227 227 228 P VBOXCLIPBOARDLISTHDR pListHdrDup = (PVBOXCLIPBOARDLISTHDR)RTMemAlloc(sizeof(VBOXCLIPBOARDLISTHDR));228 PSHCLLISTHDR pListHdrDup = (PSHCLLISTHDR)RTMemAlloc(sizeof(SHCLLISTHDR)); 229 229 if (pListHdrDup) 230 230 { … … 241 241 * @param pListHdr Data header struct to initialize. 242 242 */ 243 int SharedClipboardURIListHdrInit(P VBOXCLIPBOARDLISTHDR pListHdr)243 int SharedClipboardURIListHdrInit(PSHCLLISTHDR pListHdr) 244 244 { 245 245 AssertPtrReturn(pListHdr, VERR_INVALID_POINTER); … … 257 257 * @param pListHdr Data header struct to destroy. 258 258 */ 259 void SharedClipboardURIListHdrDestroy(P VBOXCLIPBOARDLISTHDR pListHdr)259 void SharedClipboardURIListHdrDestroy(PSHCLLISTHDR pListHdr) 260 260 { 261 261 if (!pListHdr) … … 266 266 267 267 /** 268 * Resets a VBOXCLIPBOARDListHdr structture.269 * 270 * @returns VBox status code. 271 * @param pListHdr VBOXCLIPBOARDListHdr structture to reset.272 */ 273 void SharedClipboardURIListHdrReset(P VBOXCLIPBOARDLISTHDR pListHdr)268 * Resets a SHCLListHdr structture. 269 * 270 * @returns VBox status code. 271 * @param pListHdr SHCLListHdr structture to reset. 272 */ 273 void SharedClipboardURIListHdrReset(PSHCLLISTHDR pListHdr) 274 274 { 275 275 AssertPtrReturnVoid(pListHdr); … … 277 277 LogFlowFuncEnter(); 278 278 279 RT_BZERO(pListHdr, sizeof( VBOXCLIPBOARDLISTHDR));279 RT_BZERO(pListHdr, sizeof(SHCLLISTHDR)); 280 280 } 281 281 … … 286 286 * @param pListHdr Clipboard data header to validate. 287 287 */ 288 bool SharedClipboardURIListHdrIsValid(P VBOXCLIPBOARDLISTHDR pListHdr)288 bool SharedClipboardURIListHdrIsValid(PSHCLLISTHDR pListHdr) 289 289 { 290 290 RT_NOREF(pListHdr); … … 292 292 } 293 293 294 int SharedClipboardURIListOpenParmsCopy(P VBOXCLIPBOARDLISTOPENPARMS pDst, PVBOXCLIPBOARDLISTOPENPARMS pSrc)294 int SharedClipboardURIListOpenParmsCopy(PSHCLLISTOPENPARMS pDst, PSHCLLISTOPENPARMS pSrc) 295 295 { 296 296 AssertPtrReturn(pDst, VERR_INVALID_POINTER); … … 330 330 * @param pParms URI list open parameters structure to duplicate. 331 331 */ 332 P VBOXCLIPBOARDLISTOPENPARMS SharedClipboardURIListOpenParmsDup(PVBOXCLIPBOARDLISTOPENPARMS pParms)332 PSHCLLISTOPENPARMS SharedClipboardURIListOpenParmsDup(PSHCLLISTOPENPARMS pParms) 333 333 { 334 334 AssertPtrReturn(pParms, NULL); 335 335 336 P VBOXCLIPBOARDLISTOPENPARMS pParmsDup = (PVBOXCLIPBOARDLISTOPENPARMS)RTMemAllocZ(sizeof(VBOXCLIPBOARDLISTOPENPARMS));336 PSHCLLISTOPENPARMS pParmsDup = (PSHCLLISTOPENPARMS)RTMemAllocZ(sizeof(SHCLLISTOPENPARMS)); 337 337 if (!pParmsDup) 338 338 return NULL; … … 356 356 * @param pParms URI list open parameters structure to initialize. 357 357 */ 358 int SharedClipboardURIListOpenParmsInit(P VBOXCLIPBOARDLISTOPENPARMS pParms)358 int SharedClipboardURIListOpenParmsInit(PSHCLLISTOPENPARMS pParms) 359 359 { 360 360 AssertPtrReturn(pParms, VERR_INVALID_POINTER); 361 361 362 RT_BZERO(pParms, sizeof( VBOXCLIPBOARDLISTOPENPARMS));362 RT_BZERO(pParms, sizeof(SHCLLISTOPENPARMS)); 363 363 364 364 pParms->cbFilter = 64; /** @todo Make this dynamic. */ … … 377 377 * @param pParms URI list open parameters structure to destroy. 378 378 */ 379 void SharedClipboardURIListOpenParmsDestroy(P VBOXCLIPBOARDLISTOPENPARMS pParms)379 void SharedClipboardURIListOpenParmsDestroy(PSHCLLISTOPENPARMS pParms) 380 380 { 381 381 if (!pParms) … … 400 400 * @param ppDirData Where to return the created clipboard list entry structure on success. 401 401 */ 402 int SharedClipboardURIListEntryAlloc(P VBOXCLIPBOARDLISTENTRY *ppListEntry)403 { 404 P VBOXCLIPBOARDLISTENTRY pListEntry = (PVBOXCLIPBOARDLISTENTRY)RTMemAlloc(sizeof(VBOXCLIPBOARDLISTENTRY));402 int SharedClipboardURIListEntryAlloc(PSHCLLISTENTRY *ppListEntry) 403 { 404 PSHCLLISTENTRY pListEntry = (PSHCLLISTENTRY)RTMemAlloc(sizeof(SHCLLISTENTRY)); 405 405 if (!pListEntry) 406 406 return VERR_NO_MEMORY; … … 418 418 * @param pListEntry Clipboard list entry structure to free. 419 419 */ 420 void SharedClipboardURIListEntryFree(P VBOXCLIPBOARDLISTENTRY pListEntry)420 void SharedClipboardURIListEntryFree(PSHCLLISTENTRY pListEntry) 421 421 { 422 422 if (!pListEntry) … … 433 433 * @param pListEntry Clipboard list entry to copy. 434 434 */ 435 int SharedClipboardURIListEntryCopy(P VBOXCLIPBOARDLISTENTRY pDst, PVBOXCLIPBOARDLISTENTRY pSrc)435 int SharedClipboardURIListEntryCopy(PSHCLLISTENTRY pDst, PSHCLLISTENTRY pSrc) 436 436 { 437 437 AssertPtrReturn(pDst, VERR_INVALID_POINTER); … … 480 480 * @param pListEntry Clipboard list entry to duplicate. 481 481 */ 482 P VBOXCLIPBOARDLISTENTRY SharedClipboardURIListEntryDup(PVBOXCLIPBOARDLISTENTRY pListEntry)482 PSHCLLISTENTRY SharedClipboardURIListEntryDup(PSHCLLISTENTRY pListEntry) 483 483 { 484 484 AssertPtrReturn(pListEntry, NULL); … … 486 486 int rc = VINF_SUCCESS; 487 487 488 P VBOXCLIPBOARDLISTENTRY pListEntryDup = (PVBOXCLIPBOARDLISTENTRY)RTMemAllocZ(sizeof(VBOXCLIPBOARDLISTENTRY));488 PSHCLLISTENTRY pListEntryDup = (PSHCLLISTENTRY)RTMemAllocZ(sizeof(SHCLLISTENTRY)); 489 489 if (pListEntryDup) 490 490 rc = SharedClipboardURIListEntryCopy(pListEntryDup, pListEntry); … … 507 507 * @param pListEntry Clipboard list entry structure to initialize. 508 508 */ 509 int SharedClipboardURIListEntryInit(P VBOXCLIPBOARDLISTENTRY pListEntry)510 { 511 RT_BZERO(pListEntry, sizeof( VBOXCLIPBOARDLISTENTRY));512 513 pListEntry->pszName = RTStrAlloc( VBOXCLIPBOARDLISTENTRY_MAX_NAME);509 int SharedClipboardURIListEntryInit(PSHCLLISTENTRY pListEntry) 510 { 511 RT_BZERO(pListEntry, sizeof(SHCLLISTENTRY)); 512 513 pListEntry->pszName = RTStrAlloc(SHCLLISTENTRY_MAX_NAME); 514 514 if (!pListEntry->pszName) 515 515 return VERR_NO_MEMORY; 516 516 517 pListEntry->cbName = VBOXCLIPBOARDLISTENTRY_MAX_NAME;517 pListEntry->cbName = SHCLLISTENTRY_MAX_NAME; 518 518 pListEntry->pvInfo = NULL; 519 519 pListEntry->cbInfo = 0; … … 528 528 * @param pListEntry Clipboard list entry structure to destroy. 529 529 */ 530 void SharedClipboardURIListEntryDestroy(P VBOXCLIPBOARDLISTENTRY pListEntry)530 void SharedClipboardURIListEntryDestroy(PSHCLLISTENTRY pListEntry) 531 531 { 532 532 if (!pListEntry) … … 555 555 * @param pListEntry Clipboard data chunk to validate. 556 556 */ 557 bool SharedClipboardURIListEntryIsValid(P VBOXCLIPBOARDLISTENTRY pListEntry)557 bool SharedClipboardURIListEntryIsValid(PSHCLLISTENTRY pListEntry) 558 558 { 559 559 RT_NOREF(pListEntry); … … 570 570 * @param pObjCtx URI object context to initialize. 571 571 */ 572 int SharedClipboardURIObjCtxInit(PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx)572 int SharedClipboardURIObjCtxInit(PSHCLCLIENTURIOBJCTX pObjCtx) 573 573 { 574 574 AssertPtrReturn(pObjCtx, VERR_INVALID_POINTER); … … 576 576 LogFlowFuncEnter(); 577 577 578 pObjCtx->uHandle = SH AREDCLIPBOARDOBJHANDLE_INVALID;578 pObjCtx->uHandle = SHCLOBJHANDLE_INVALID; 579 579 580 580 return VINF_SUCCESS; … … 586 586 * @param pObjCtx URI object context to destroy. 587 587 */ 588 void SharedClipboardURIObjCtxDestroy(PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx)588 void SharedClipboardURIObjCtxDestroy(PSHCLCLIENTURIOBJCTX pObjCtx) 589 589 { 590 590 AssertPtrReturnVoid(pObjCtx); … … 599 599 * @param pObjCtx URI object context to check. 600 600 */ 601 bool SharedClipboardURIObjCtxIsValid(PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx)601 bool SharedClipboardURIObjCtxIsValid(PSHCLCLIENTURIOBJCTX pObjCtx) 602 602 { 603 603 return ( pObjCtx 604 && pObjCtx->uHandle != SH AREDCLIPBOARDOBJHANDLE_INVALID);604 && pObjCtx->uHandle != SHCLOBJHANDLE_INVALID); 605 605 } 606 606 … … 610 610 * @param pInfo Object handle info structure to destroy. 611 611 */ 612 void SharedClipboardURIObjectHandleInfoDestroy(PSH AREDCLIPBOARDURIOBJHANDLEINFO pInfo)612 void SharedClipboardURIObjectHandleInfoDestroy(PSHCLURIOBJHANDLEINFO pInfo) 613 613 { 614 614 if (!pInfo) … … 628 628 * @param pParms URI object open parameters structure to initialize. 629 629 */ 630 int SharedClipboardURIObjectOpenParmsInit(P VBOXCLIPBOARDOBJOPENCREATEPARMS pParms)630 int SharedClipboardURIObjectOpenParmsInit(PSHCLOBJOPENCREATEPARMS pParms) 631 631 { 632 632 AssertPtrReturn(pParms, VERR_INVALID_POINTER); … … 634 634 int rc; 635 635 636 RT_BZERO(pParms, sizeof( VBOXCLIPBOARDOBJOPENCREATEPARMS));636 RT_BZERO(pParms, sizeof(SHCLOBJOPENCREATEPARMS)); 637 637 638 638 pParms->cbPath = RTPATH_MAX; /** @todo Make this dynamic. */ … … 656 656 * @param pParmsSrc Which source URI object open parameters to copy. 657 657 */ 658 int SharedClipboardURIObjectOpenParmsCopy(P VBOXCLIPBOARDOBJOPENCREATEPARMS pParmsDst, PVBOXCLIPBOARDOBJOPENCREATEPARMS pParmsSrc)658 int SharedClipboardURIObjectOpenParmsCopy(PSHCLOBJOPENCREATEPARMS pParmsDst, PSHCLOBJOPENCREATEPARMS pParmsSrc) 659 659 { 660 660 int rc; … … 685 685 * @param pParms URI object open parameters structure to destroy. 686 686 */ 687 void SharedClipboardURIObjectOpenParmsDestroy(P VBOXCLIPBOARDOBJOPENCREATEPARMS pParms)687 void SharedClipboardURIObjectOpenParmsDestroy(PSHCLOBJOPENCREATEPARMS pParms) 688 688 { 689 689 if (!pParms) … … 704 704 * @param hObj Object handle of the object to get handle info for. 705 705 */ 706 inline PSH AREDCLIPBOARDURIOBJHANDLEINFO sharedClipboardURIObjectGet(PSHAREDCLIPBOARDURITRANSFER pTransfer,707 SH AREDCLIPBOARDOBJHANDLE hObj)708 { 709 PSH AREDCLIPBOARDURIOBJHANDLEINFO pIt;710 RTListForEach(&pTransfer->lstObj, pIt, SH AREDCLIPBOARDURIOBJHANDLEINFO, Node)706 inline PSHCLURIOBJHANDLEINFO sharedClipboardURIObjectGet(PSHCLURITRANSFER pTransfer, 707 SHCLOBJHANDLE hObj) 708 { 709 PSHCLURIOBJHANDLEINFO pIt; 710 RTListForEach(&pTransfer->lstObj, pIt, SHCLURIOBJHANDLEINFO, Node) 711 711 { 712 712 if (pIt->hObj == hObj) … … 725 725 * @param phObj Where to store the handle of URI object opened on success. 726 726 */ 727 int SharedClipboardURIObjectOpen(PSH AREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDOBJOPENCREATEPARMS pOpenCreateParms,728 PSH AREDCLIPBOARDOBJHANDLE phObj)727 int SharedClipboardURIObjectOpen(PSHCLURITRANSFER pTransfer, PSHCLOBJOPENCREATEPARMS pOpenCreateParms, 728 PSHCLOBJHANDLE phObj) 729 729 { 730 730 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 736 736 LogFlowFunc(("pszPath=%s, fCreate=0x%x\n", pOpenCreateParms->pszPath, pOpenCreateParms->fCreate)); 737 737 738 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)739 { 740 PSH AREDCLIPBOARDURIOBJHANDLEINFO pInfo741 = (PSH AREDCLIPBOARDURIOBJHANDLEINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDURIOBJHANDLEINFO));738 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 739 { 740 PSHCLURIOBJHANDLEINFO pInfo 741 = (PSHCLURIOBJHANDLEINFO)RTMemAlloc(sizeof(SHCLURIOBJHANDLEINFO)); 742 742 if (pInfo) 743 743 { … … 747 747 rc = sharedClipboardConvertFileCreateFlags(fWritable, 748 748 pOpenCreateParms->fCreate, pOpenCreateParms->ObjInfo.Attr.fMode, 749 SH AREDCLIPBOARDOBJHANDLE_INVALID, &fOpen);749 SHCLOBJHANDLE_INVALID, &fOpen); 750 750 if (RT_SUCCESS(rc)) 751 751 { … … 765 765 { 766 766 pInfo->hObj = pTransfer->uObjHandleNext++; 767 pInfo->enmType = SH AREDCLIPBOARDURIOBJTYPE_FILE;767 pInfo->enmType = SHCLURIOBJTYPE_FILE; 768 768 769 769 RTListAppend(&pTransfer->lstObj, &pInfo->Node); … … 778 778 rc = VERR_NO_MEMORY; 779 779 } 780 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)780 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 781 781 { 782 782 if (pTransfer->ProviderIface.pfnObjOpen) … … 799 799 * @param hObj Handle of URI object to close. 800 800 */ 801 int SharedClipboardURIObjectClose(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDOBJHANDLE hObj)801 int SharedClipboardURIObjectClose(PSHCLURITRANSFER pTransfer, SHCLOBJHANDLE hObj) 802 802 { 803 803 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 805 805 int rc = VINF_SUCCESS; 806 806 807 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)808 { 809 PSH AREDCLIPBOARDURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);807 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 808 { 809 PSHCLURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj); 810 810 if (pInfo) 811 811 { 812 812 switch (pInfo->enmType) 813 813 { 814 case SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY:814 case SHCLURIOBJTYPE_DIRECTORY: 815 815 { 816 816 rc = RTDirClose(pInfo->u.Local.hDir); … … 820 820 } 821 821 822 case SH AREDCLIPBOARDURIOBJTYPE_FILE:822 case SHCLURIOBJTYPE_FILE: 823 823 { 824 824 rc = RTFileClose(pInfo->u.Local.hFile); … … 840 840 rc = VERR_NOT_FOUND; 841 841 } 842 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)842 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 843 843 { 844 844 if (pTransfer->ProviderIface.pfnObjClose) … … 864 864 * @param pcbRead How much bytes were read on success. Optional. 865 865 */ 866 int SharedClipboardURIObjectRead(PSH AREDCLIPBOARDURITRANSFER pTransfer,867 SH AREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead, uint32_t fFlags)866 int SharedClipboardURIObjectRead(PSHCLURITRANSFER pTransfer, 867 SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead, uint32_t fFlags) 868 868 { 869 869 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 875 875 int rc = VINF_SUCCESS; 876 876 877 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)878 { 879 PSH AREDCLIPBOARDURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);877 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 878 { 879 PSHCLURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj); 880 880 if (pInfo) 881 881 { 882 882 switch (pInfo->enmType) 883 883 { 884 case SH AREDCLIPBOARDURIOBJTYPE_FILE:884 case SHCLURIOBJTYPE_FILE: 885 885 { 886 886 size_t cbRead; … … 902 902 rc = VERR_NOT_FOUND; 903 903 } 904 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)904 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 905 905 { 906 906 if (pTransfer->ProviderIface.pfnObjRead) … … 926 926 * @param pcbWritten How much bytes were writtenon success. Optional. 927 927 */ 928 int SharedClipboardURIObjectWrite(PSH AREDCLIPBOARDURITRANSFER pTransfer,929 SH AREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten,928 int SharedClipboardURIObjectWrite(PSHCLURITRANSFER pTransfer, 929 SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten, 930 930 uint32_t fFlags) 931 931 { … … 937 937 int rc = VINF_SUCCESS; 938 938 939 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)940 { 941 PSH AREDCLIPBOARDURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);939 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 940 { 941 PSHCLURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj); 942 942 if (pInfo) 943 943 { 944 944 switch (pInfo->enmType) 945 945 { 946 case SH AREDCLIPBOARDURIOBJTYPE_FILE:946 case SHCLURIOBJTYPE_FILE: 947 947 { 948 948 rc = RTFileWrite(pInfo->u.Local.hFile, pvBuf, cbBuf, (size_t *)pcbWritten); … … 958 958 rc = VERR_NOT_FOUND; 959 959 } 960 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)960 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 961 961 { 962 962 if (pTransfer->ProviderIface.pfnObjWrite) … … 978 978 * @param pDataChunk URI object data chunk to duplicate. 979 979 */ 980 P VBOXCLIPBOARDOBJDATACHUNK SharedClipboardURIObjectDataChunkDup(PVBOXCLIPBOARDOBJDATACHUNK pDataChunk)980 PSHCLOBJDATACHUNK SharedClipboardURIObjectDataChunkDup(PSHCLOBJDATACHUNK pDataChunk) 981 981 { 982 982 if (!pDataChunk) 983 983 return NULL; 984 984 985 P VBOXCLIPBOARDOBJDATACHUNK pDataChunkDup = (PVBOXCLIPBOARDOBJDATACHUNK)RTMemAllocZ(sizeof(VBOXCLIPBOARDOBJDATACHUNK));985 PSHCLOBJDATACHUNK pDataChunkDup = (PSHCLOBJDATACHUNK)RTMemAllocZ(sizeof(SHCLOBJDATACHUNK)); 986 986 if (!pDataChunkDup) 987 987 return NULL; … … 1004 1004 * @param pDataChunk URI object data chunk to destroy. 1005 1005 */ 1006 void SharedClipboardURIObjectDataChunkDestroy(P VBOXCLIPBOARDOBJDATACHUNK pDataChunk)1006 void SharedClipboardURIObjectDataChunkDestroy(PSHCLOBJDATACHUNK pDataChunk) 1007 1007 { 1008 1008 if (!pDataChunk) … … 1028 1028 * be invalid after calling this function. 1029 1029 */ 1030 void SharedClipboardURIObjectDataChunkFree(P VBOXCLIPBOARDOBJDATACHUNK pDataChunk)1030 void SharedClipboardURIObjectDataChunkFree(PSHCLOBJDATACHUNK pDataChunk) 1031 1031 { 1032 1032 if (!pDataChunk) … … 1048 1048 * Must be destroyed by SharedClipboardURITransferDestroy(). 1049 1049 */ 1050 int SharedClipboardURITransferCreate(SH AREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,1051 PSH AREDCLIPBOARDURITRANSFER *ppTransfer)1050 int SharedClipboardURITransferCreate(SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource, 1051 PSHCLURITRANSFER *ppTransfer) 1052 1052 { 1053 1053 AssertPtrReturn(ppTransfer, VERR_INVALID_POINTER); … … 1055 1055 LogFlowFuncEnter(); 1056 1056 1057 PSH AREDCLIPBOARDURITRANSFER pTransfer = (PSHAREDCLIPBOARDURITRANSFER)RTMemAlloc(sizeof(SHAREDCLIPBOARDURITRANSFER));1057 PSHCLURITRANSFER pTransfer = (PSHCLURITRANSFER)RTMemAlloc(sizeof(SHCLURITRANSFER)); 1058 1058 if (!pTransfer) 1059 1059 return VERR_NO_MEMORY; … … 1062 1062 1063 1063 pTransfer->State.uID = 0; 1064 pTransfer->State.enmStatus = SH AREDCLIPBOARDURITRANSFERSTATUS_NONE;1064 pTransfer->State.enmStatus = SHCLURITRANSFERSTATUS_NONE; 1065 1065 pTransfer->State.enmDir = enmDir; 1066 1066 pTransfer->State.enmSource = enmSource; … … 1115 1115 * @param pURI URI clipboard transfer to destroy. 1116 1116 */ 1117 int SharedClipboardURITransferDestroy(PSH AREDCLIPBOARDURITRANSFER pTransfer)1117 int SharedClipboardURITransferDestroy(PSHCLURITRANSFER pTransfer) 1118 1118 { 1119 1119 if (!pTransfer) … … 1130 1130 SharedClipboardEventSourceDestroy(&pTransfer->Events); 1131 1131 1132 PSH AREDCLIPBOARDURILISTHANDLEINFO pItList, pItListNext;1133 RTListForEachSafe(&pTransfer->lstList, pItList, pItListNext, SH AREDCLIPBOARDURILISTHANDLEINFO, Node)1132 PSHCLURILISTHANDLEINFO pItList, pItListNext; 1133 RTListForEachSafe(&pTransfer->lstList, pItList, pItListNext, SHCLURILISTHANDLEINFO, Node) 1134 1134 { 1135 1135 SharedClipboardURIListHandleInfoDestroy(pItList); … … 1140 1140 } 1141 1141 1142 PSH AREDCLIPBOARDURIOBJHANDLEINFO pItObj, pItObjNext;1143 RTListForEachSafe(&pTransfer->lstObj, pItObj, pItObjNext, SH AREDCLIPBOARDURIOBJHANDLEINFO, Node)1142 PSHCLURIOBJHANDLEINFO pItObj, pItObjNext; 1143 RTListForEachSafe(&pTransfer->lstObj, pItObj, pItObjNext, SHCLURIOBJHANDLEINFO, Node) 1144 1144 { 1145 1145 SharedClipboardURIObjectHandleInfoDestroy(pItObj); … … 1154 1154 } 1155 1155 1156 int SharedClipboardURITransferOpen(PSH AREDCLIPBOARDURITRANSFER pTransfer)1156 int SharedClipboardURITransferOpen(PSHCLURITRANSFER pTransfer) 1157 1157 { 1158 1158 int rc = VINF_SUCCESS; … … 1165 1165 } 1166 1166 1167 int SharedClipboardURITransferClose(PSH AREDCLIPBOARDURITRANSFER pTransfer)1167 int SharedClipboardURITransferClose(PSHCLURITRANSFER pTransfer) 1168 1168 { 1169 1169 int rc = VINF_SUCCESS; … … 1183 1183 * @param hList List handle of the list to get handle info for. 1184 1184 */ 1185 inline PSH AREDCLIPBOARDURILISTHANDLEINFO sharedClipboardURITransferListGet(PSHAREDCLIPBOARDURITRANSFER pTransfer,1186 SH AREDCLIPBOARDLISTHANDLE hList)1187 { 1188 PSH AREDCLIPBOARDURILISTHANDLEINFO pIt;1189 RTListForEach(&pTransfer->lstList, pIt, SH AREDCLIPBOARDURILISTHANDLEINFO, Node)1185 inline PSHCLURILISTHANDLEINFO sharedClipboardURITransferListGet(PSHCLURITRANSFER pTransfer, 1186 SHCLLISTHANDLE hList) 1187 { 1188 PSHCLURILISTHANDLEINFO pIt; 1189 RTListForEach(&pTransfer->lstList, pIt, SHCLURILISTHANDLEINFO, Node) 1190 1190 { 1191 1191 if (pIt->hList == hList) … … 1199 1199 * Creates a new list handle (local only). 1200 1200 * 1201 * @returns New List handle on success, or SH AREDCLIPBOARDLISTHANDLE_INVALID on error.1201 * @returns New List handle on success, or SHCLLISTHANDLE_INVALID on error. 1202 1202 * @param pTransfer URI clipboard transfer to create new list handle for. 1203 1203 */ 1204 inline SH AREDCLIPBOARDLISTHANDLE sharedClipboardURITransferListHandleNew(PSHAREDCLIPBOARDURITRANSFER pTransfer)1204 inline SHCLLISTHANDLE sharedClipboardURITransferListHandleNew(PSHCLURITRANSFER pTransfer) 1205 1205 { 1206 1206 return pTransfer->uListHandleNext++; /** @todo Good enough for now. Improve this later. */ … … 1215 1215 * @param phList Where to store the List handle of opened list on success. 1216 1216 */ 1217 int SharedClipboardURITransferListOpen(PSH AREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms,1218 PSH AREDCLIPBOARDLISTHANDLE phList)1217 int SharedClipboardURITransferListOpen(PSHCLURITRANSFER pTransfer, PSHCLLISTOPENPARMS pOpenParms, 1218 PSHCLLISTHANDLE phList) 1219 1219 { 1220 1220 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1224 1224 int rc; 1225 1225 1226 SH AREDCLIPBOARDLISTHANDLE hList = SHAREDCLIPBOARDLISTHANDLE_INVALID;1227 1228 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)1229 { 1230 PSH AREDCLIPBOARDURILISTHANDLEINFO pInfo1231 = (PSH AREDCLIPBOARDURILISTHANDLEINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDURILISTHANDLEINFO));1226 SHCLLISTHANDLE hList = SHCLLISTHANDLE_INVALID; 1227 1228 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1229 { 1230 PSHCLURILISTHANDLEINFO pInfo 1231 = (PSHCLURILISTHANDLEINFO)RTMemAlloc(sizeof(SHCLURILISTHANDLEINFO)); 1232 1232 if (pInfo) 1233 1233 { … … 1240 1240 switch (pInfo->enmType) 1241 1241 { 1242 case SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY:1242 case SHCLURIOBJTYPE_DIRECTORY: 1243 1243 { 1244 1244 rc = RTDirOpen(&pInfo->u.Local.hDir, pOpenParms->pszPath); … … 1246 1246 } 1247 1247 1248 case SH AREDCLIPBOARDURIOBJTYPE_FILE:1248 case SHCLURIOBJTYPE_FILE: 1249 1249 { 1250 1250 rc = RTFileOpen(&pInfo->u.Local.hFile, pOpenParms->pszPath, … … 1285 1285 rc = VERR_NO_MEMORY; 1286 1286 } 1287 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)1287 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 1288 1288 { 1289 1289 if (pTransfer->ProviderIface.pfnListOpen) … … 1311 1311 * @param hList Handle of list to close. 1312 1312 */ 1313 int SharedClipboardURITransferListClose(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList)1313 int SharedClipboardURITransferListClose(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList) 1314 1314 { 1315 1315 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); 1316 1316 1317 if (hList == SH AREDCLIPBOARDLISTHANDLE_INVALID)1317 if (hList == SHCLLISTHANDLE_INVALID) 1318 1318 return VINF_SUCCESS; 1319 1319 1320 1320 int rc = VINF_SUCCESS; 1321 1321 1322 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)1323 { 1324 PSH AREDCLIPBOARDURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);1322 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1323 { 1324 PSHCLURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList); 1325 1325 if (pInfo) 1326 1326 { 1327 1327 switch (pInfo->enmType) 1328 1328 { 1329 case SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY:1329 case SHCLURIOBJTYPE_DIRECTORY: 1330 1330 { 1331 1331 if (RTDirIsValid(pInfo->u.Local.hDir)) … … 1346 1346 rc = VERR_NOT_FOUND; 1347 1347 } 1348 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)1348 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 1349 1349 { 1350 1350 if (pTransfer->ProviderIface.pfnListClose) … … 1367 1367 * @param pszPath Path of file to add. 1368 1368 */ 1369 static int sharedClipboardURITransferListHdrAddFile(P VBOXCLIPBOARDLISTHDR pHdr, const char *pszPath)1369 static int sharedClipboardURITransferListHdrAddFile(PSHCLLISTHDR pHdr, const char *pszPath) 1370 1370 { 1371 1371 uint64_t cbSize = 0; … … 1391 1391 * @param cchDstBase Number of charaters of destination base path. 1392 1392 */ 1393 static int sharedClipboardURITransferListHdrFromDir(P VBOXCLIPBOARDLISTHDR pHdr,1393 static int sharedClipboardURITransferListHdrFromDir(PSHCLLISTHDR pHdr, 1394 1394 const char *pcszSrcPath, const char *pcszDstPath, 1395 1395 const char *pcszDstBase) … … 1543 1543 * @param pHdr Where to store the returned list header information. 1544 1544 */ 1545 int SharedClipboardURITransferListGetHeader(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,1546 P VBOXCLIPBOARDLISTHDR pHdr)1545 int SharedClipboardURITransferListGetHeader(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList, 1546 PSHCLLISTHDR pHdr) 1547 1547 { 1548 1548 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1553 1553 LogFlowFunc(("hList=%RU64\n", hList)); 1554 1554 1555 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)1556 { 1557 PSH AREDCLIPBOARDURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);1555 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1556 { 1557 PSHCLURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList); 1558 1558 if (pInfo) 1559 1559 { … … 1563 1563 switch (pInfo->enmType) 1564 1564 { 1565 case SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY:1565 case SHCLURIOBJTYPE_DIRECTORY: 1566 1566 { 1567 1567 char *pszPathRel = sharedClipboardPathTranslate(pInfo->pszPathLocalAbs); … … 1577 1577 } 1578 1578 1579 case SH AREDCLIPBOARDURIOBJTYPE_FILE:1579 case SHCLURIOBJTYPE_FILE: 1580 1580 { 1581 1581 pHdr->cTotalObjects = 1; … … 1601 1601 rc = VERR_NOT_FOUND; 1602 1602 } 1603 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)1603 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 1604 1604 { 1605 1605 if (pTransfer->ProviderIface.pfnListHdrRead) … … 1627 1627 * @param uIdx Index of object to get. 1628 1628 */ 1629 PSH AREDCLIPBOARDURITRANSFEROBJ SharedClipboardURITransferListGetObj(PSHAREDCLIPBOARDURITRANSFER pTransfer,1630 SH AREDCLIPBOARDLISTHANDLE hList, uint64_t uIdx)1629 PSHCLURITRANSFEROBJ SharedClipboardURITransferListGetObj(PSHCLURITRANSFER pTransfer, 1630 SHCLLISTHANDLE hList, uint64_t uIdx) 1631 1631 { 1632 1632 AssertPtrReturn(pTransfer, NULL); … … 1647 1647 * @param pEntry Where to store the read information. 1648 1648 */ 1649 int SharedClipboardURITransferListRead(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,1650 P VBOXCLIPBOARDLISTENTRY pEntry)1649 int SharedClipboardURITransferListRead(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList, 1650 PSHCLLISTENTRY pEntry) 1651 1651 { 1652 1652 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1657 1657 LogFlowFunc(("hList=%RU64\n", hList)); 1658 1658 1659 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)1660 { 1661 PSH AREDCLIPBOARDURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);1659 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1660 { 1661 PSHCLURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList); 1662 1662 if (pInfo) 1663 1663 { 1664 1664 switch (pInfo->enmType) 1665 1665 { 1666 case SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY:1666 case SHCLURIOBJTYPE_DIRECTORY: 1667 1667 { 1668 1668 LogFlowFunc(("\tDirectory: %s\n", pInfo->pszPathLocalAbs)); … … 1711 1711 && !fSkipEntry) 1712 1712 { 1713 pEntry->pvInfo = (PSH AREDCLIPBOARDFSOBJINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDFSOBJINFO));1713 pEntry->pvInfo = (PSHCLFSOBJINFO)RTMemAlloc(sizeof(SHCLFSOBJINFO)); 1714 1714 if (pEntry->pvInfo) 1715 1715 { … … 1717 1717 if (RT_SUCCESS(rc)) 1718 1718 { 1719 SharedClipboardFsObjFromIPRT(PSH AREDCLIPBOARDFSOBJINFO(pEntry->pvInfo), &pDirEntry->Info);1720 1721 pEntry->cbInfo = sizeof(SH AREDCLIPBOARDFSOBJINFO);1722 pEntry->fInfo = VBOX_SH AREDCLIPBOARD_INFO_FLAG_FSOBJINFO;1719 SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO(pEntry->pvInfo), &pDirEntry->Info); 1720 1721 pEntry->cbInfo = sizeof(SHCLFSOBJINFO); 1722 pEntry->fInfo = VBOX_SHCL_INFO_FLAG_FSOBJINFO; 1723 1723 } 1724 1724 } … … 1740 1740 } 1741 1741 1742 case SH AREDCLIPBOARDURIOBJTYPE_FILE:1742 case SHCLURIOBJTYPE_FILE: 1743 1743 { 1744 1744 LogFlowFunc(("\tSingle file: %s\n", pInfo->pszPathLocalAbs)); … … 1748 1748 if (RT_SUCCESS(rc)) 1749 1749 { 1750 pEntry->pvInfo = (PSH AREDCLIPBOARDFSOBJINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDFSOBJINFO));1750 pEntry->pvInfo = (PSHCLFSOBJINFO)RTMemAlloc(sizeof(SHCLFSOBJINFO)); 1751 1751 if (pEntry->pvInfo) 1752 1752 { … … 1754 1754 if (RT_SUCCESS(rc)) 1755 1755 { 1756 SharedClipboardFsObjFromIPRT(PSH AREDCLIPBOARDFSOBJINFO(pEntry->pvInfo), &objInfo);1757 1758 pEntry->cbInfo = sizeof(SH AREDCLIPBOARDFSOBJINFO);1759 pEntry->fInfo = VBOX_SH AREDCLIPBOARD_INFO_FLAG_FSOBJINFO;1756 SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO(pEntry->pvInfo), &objInfo); 1757 1758 pEntry->cbInfo = sizeof(SHCLFSOBJINFO); 1759 pEntry->fInfo = VBOX_SHCL_INFO_FLAG_FSOBJINFO; 1760 1760 } 1761 1761 } … … 1775 1775 rc = VERR_NOT_FOUND; 1776 1776 } 1777 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)1777 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 1778 1778 { 1779 1779 if (pTransfer->ProviderIface.pfnListEntryRead) … … 1787 1787 } 1788 1788 1789 int SharedClipboardURITransferListWrite(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,1790 P VBOXCLIPBOARDLISTENTRY pEntry)1789 int SharedClipboardURITransferListWrite(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList, 1790 PSHCLLISTENTRY pEntry) 1791 1791 { 1792 1792 RT_NOREF(pTransfer, hList, pEntry); … … 1810 1810 * @param hList List handle to check. 1811 1811 */ 1812 bool SharedClipboardURITransferListHandleIsValid(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList)1812 bool SharedClipboardURITransferListHandleIsValid(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList) 1813 1813 { 1814 1814 bool fIsValid = false; 1815 1815 1816 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)1816 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1817 1817 { 1818 1818 fIsValid = sharedClipboardURITransferListGet(pTransfer, hList) != NULL; 1819 1819 } 1820 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)1820 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 1821 1821 { 1822 1822 AssertFailed(); /** @todo Implement. */ … … 1832 1832 * @param pTransfer URI clipboard transfer to prepare. 1833 1833 */ 1834 int SharedClipboardURITransferPrepare(PSH AREDCLIPBOARDURITRANSFER pTransfer)1834 int SharedClipboardURITransferPrepare(PSHCLURITRANSFER pTransfer) 1835 1835 { 1836 1836 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1840 1840 int rc = VINF_SUCCESS; 1841 1841 1842 AssertMsgReturn(pTransfer->State.enmStatus == SH AREDCLIPBOARDURITRANSFERSTATUS_NONE,1842 AssertMsgReturn(pTransfer->State.enmStatus == SHCLURITRANSFERSTATUS_NONE, 1843 1843 ("Transfer has wrong state (%RU32)\n", pTransfer->State.enmStatus), VERR_WRONG_ORDER); 1844 1844 … … 1847 1847 if (pTransfer->Callbacks.pfnTransferPrepare) 1848 1848 { 1849 SH AREDCLIPBOARDURITRANSFERCALLBACKDATA callbackData = { pTransfer, pTransfer->Callbacks.pvUser };1849 SHCLURITRANSFERCALLBACKDATA callbackData = { pTransfer, pTransfer->Callbacks.pvUser }; 1850 1850 pTransfer->Callbacks.pfnTransferPrepare(&callbackData); 1851 1851 } … … 1853 1853 if (RT_SUCCESS(rc)) 1854 1854 { 1855 pTransfer->State.enmStatus = SH AREDCLIPBOARDURITRANSFERSTATUS_READY;1855 pTransfer->State.enmStatus = SHCLURITRANSFERSTATUS_READY; 1856 1856 1857 1857 /** @todo Add checksum support. */ … … 1869 1869 * @param pCreationCtx Provider creation context to use for provider creation. 1870 1870 */ 1871 int SharedClipboardURITransferSetInterface(PSH AREDCLIPBOARDURITRANSFER pTransfer,1872 PSH AREDCLIPBOARDPROVIDERCREATIONCTX pCreationCtx)1871 int SharedClipboardURITransferSetInterface(PSHCLURITRANSFER pTransfer, 1872 PSHCLPROVIDERCREATIONCTX pCreationCtx) 1873 1873 { 1874 1874 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1906 1906 * @param pTransfer Transfer to clear URI root list for. 1907 1907 */ 1908 static void sharedClipboardURIListTransferRootsClear(PSH AREDCLIPBOARDURITRANSFER pTransfer)1908 static void sharedClipboardURIListTransferRootsClear(PSHCLURITRANSFER pTransfer) 1909 1909 { 1910 1910 AssertPtrReturnVoid(pTransfer); … … 1916 1916 } 1917 1917 1918 PSH AREDCLIPBOARDURILISTROOT pListRoot, pListRootNext;1919 RTListForEachSafe(&pTransfer->lstRoots, pListRoot, pListRootNext, SH AREDCLIPBOARDURILISTROOT, Node)1918 PSHCLURILISTROOT pListRoot, pListRootNext; 1919 RTListForEachSafe(&pTransfer->lstRoots, pListRoot, pListRootNext, SHCLURILISTROOT, Node) 1920 1920 { 1921 1921 RTStrFree(pListRoot->pszPathAbs); … … 1939 1939 * @param cbRoots Size (in bytes) of string list. 1940 1940 */ 1941 int SharedClipboardURILTransferSetRoots(PSH AREDCLIPBOARDURITRANSFER pTransfer, const char *pszRoots, size_t cbRoots)1941 int SharedClipboardURILTransferSetRoots(PSHCLURITRANSFER pTransfer, const char *pszRoots, size_t cbRoots) 1942 1942 { 1943 1943 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1957 1957 for (size_t i = 0; i < lstRootEntries.size(); ++i) 1958 1958 { 1959 PSH AREDCLIPBOARDURILISTROOT pListRoot = (PSHAREDCLIPBOARDURILISTROOT)RTMemAlloc(sizeof(SHAREDCLIPBOARDURILISTROOT));1959 PSHCLURILISTROOT pListRoot = (PSHCLURILISTROOT)RTMemAlloc(sizeof(SHCLURILISTROOT)); 1960 1960 AssertPtrBreakStmt(pListRoot, rc = VERR_NO_MEMORY); 1961 1961 … … 2007 2007 * @param pTransfer URI clipboard transfer to reset. 2008 2008 */ 2009 void SharedClipboardURITransferReset(PSH AREDCLIPBOARDURITRANSFER pTransfer)2009 void SharedClipboardURITransferReset(PSHCLURITRANSFER pTransfer) 2010 2010 { 2011 2011 AssertPtrReturnVoid(pTransfer); … … 2022 2022 * @param pTransfer URI clipboard transfer to return clipboard area for. 2023 2023 */ 2024 SharedClipboardArea *SharedClipboardURITransferGetArea(PSH AREDCLIPBOARDURITRANSFER pTransfer)2024 SharedClipboardArea *SharedClipboardURITransferGetArea(PSHCLURITRANSFER pTransfer) 2025 2025 { 2026 2026 AssertPtrReturn(pTransfer, NULL); … … 2035 2035 * @param pTransfer URI clipboard transfer to return root entry count for. 2036 2036 */ 2037 uint32_t SharedClipboardURILTransferRootsCount(PSH AREDCLIPBOARDURITRANSFER pTransfer)2037 uint32_t SharedClipboardURILTransferRootsCount(PSHCLURITRANSFER pTransfer) 2038 2038 { 2039 2039 AssertPtrReturn(pTransfer, 0); … … 2049 2049 * @param uIdx Index of root list entry to return. 2050 2050 */ 2051 inline PSH AREDCLIPBOARDURILISTROOT sharedClipboardURILTransferRootsGet(PSHAREDCLIPBOARDURITRANSFER pTransfer, uint32_t uIdx)2051 inline PSHCLURILISTROOT sharedClipboardURILTransferRootsGet(PSHCLURITRANSFER pTransfer, uint32_t uIdx) 2052 2052 { 2053 2053 if (uIdx >= pTransfer->cRoots) 2054 2054 return NULL; 2055 2055 2056 PSH AREDCLIPBOARDURILISTROOT pIt = RTListGetFirst(&pTransfer->lstRoots, SHAREDCLIPBOARDURILISTROOT, Node);2056 PSHCLURILISTROOT pIt = RTListGetFirst(&pTransfer->lstRoots, SHCLURILISTROOT, Node); 2057 2057 while (uIdx--) 2058 pIt = RTListGetNext(&pTransfer->lstRoots, pIt, SH AREDCLIPBOARDURILISTROOT, Node);2058 pIt = RTListGetNext(&pTransfer->lstRoots, pIt, SHCLURILISTROOT, Node); 2059 2059 2060 2060 return pIt; … … 2069 2069 * @param pEntry Where to store the returned entry on success. 2070 2070 */ 2071 int SharedClipboardURILTransferRootsEntry(PSH AREDCLIPBOARDURITRANSFER pTransfer,2072 uint64_t uIndex, P VBOXCLIPBOARDROOTLISTENTRY pEntry)2071 int SharedClipboardURILTransferRootsEntry(PSHCLURITRANSFER pTransfer, 2072 uint64_t uIndex, PSHCLROOTLISTENTRY pEntry) 2073 2073 { 2074 2074 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 2080 2080 int rc; 2081 2081 2082 PSH AREDCLIPBOARDURILISTROOT pRoot = sharedClipboardURILTransferRootsGet(pTransfer, uIndex);2082 PSHCLURILISTROOT pRoot = sharedClipboardURILTransferRootsGet(pTransfer, uIndex); 2083 2083 AssertPtrReturn(pRoot, VERR_INVALID_PARAMETER); 2084 2084 … … 2101 2101 if (RT_SUCCESS(rc)) 2102 2102 { 2103 pEntry->cbInfo = sizeof(SH AREDCLIPBOARDFSOBJINFO);2104 pEntry->pvInfo = (PSH AREDCLIPBOARDFSOBJINFO)RTMemAlloc(pEntry->cbInfo);2103 pEntry->cbInfo = sizeof(SHCLFSOBJINFO); 2104 pEntry->pvInfo = (PSHCLFSOBJINFO)RTMemAlloc(pEntry->cbInfo); 2105 2105 if (pEntry->pvInfo) 2106 2106 { … … 2109 2109 if (RT_SUCCESS(rc)) 2110 2110 { 2111 SharedClipboardFsObjFromIPRT(PSH AREDCLIPBOARDFSOBJINFO(pEntry->pvInfo), &fsObjInfo);2112 2113 pEntry->fInfo = VBOX_SH AREDCLIPBOARD_INFO_FLAG_FSOBJINFO;2111 SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO(pEntry->pvInfo), &fsObjInfo); 2112 2113 pEntry->fInfo = VBOX_SHCL_INFO_FLAG_FSOBJINFO; 2114 2114 } 2115 2115 } … … 2133 2133 * @param ppRootList Where to store the root list on success. 2134 2134 */ 2135 int SharedClipboardURILTransferRootsAsList(PSH AREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDROOTLIST *ppRootList)2135 int SharedClipboardURILTransferRootsAsList(PSHCLURITRANSFER pTransfer, PSHCLROOTLIST *ppRootList) 2136 2136 { 2137 2137 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 2142 2142 int rc = VINF_SUCCESS; 2143 2143 2144 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)2145 { 2146 P VBOXCLIPBOARDROOTLIST pRootList = SharedClipboardURIRootListAlloc();2144 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 2145 { 2146 PSHCLROOTLIST pRootList = SharedClipboardURIRootListAlloc(); 2147 2147 if (!pRootList) 2148 2148 return VERR_NO_MEMORY; … … 2154 2154 if (cRoots) 2155 2155 { 2156 P VBOXCLIPBOARDROOTLISTENTRY paRootListEntries2157 = (P VBOXCLIPBOARDROOTLISTENTRY)RTMemAllocZ(cRoots * sizeof(VBOXCLIPBOARDROOTLISTENTRY));2156 PSHCLROOTLISTENTRY paRootListEntries 2157 = (PSHCLROOTLISTENTRY)RTMemAllocZ(cRoots * sizeof(SHCLROOTLISTENTRY)); 2158 2158 if (paRootListEntries) 2159 2159 { … … 2182 2182 } 2183 2183 } 2184 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)2184 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 2185 2185 { 2186 2186 if (pTransfer->ProviderIface.pfnGetRoots) … … 2200 2200 * @param pTransfer URI clipboard transfer to return source for. 2201 2201 */ 2202 SH AREDCLIPBOARDSOURCE SharedClipboardURITransferGetSource(PSHAREDCLIPBOARDURITRANSFER pTransfer)2203 { 2204 AssertPtrReturn(pTransfer, SH AREDCLIPBOARDSOURCE_INVALID);2202 SHCLSOURCE SharedClipboardURITransferGetSource(PSHCLURITRANSFER pTransfer) 2203 { 2204 AssertPtrReturn(pTransfer, SHCLSOURCE_INVALID); 2205 2205 2206 2206 return pTransfer->State.enmSource; … … 2213 2213 * @param pTransfer URI clipboard transfer to return status for. 2214 2214 */ 2215 SH AREDCLIPBOARDURITRANSFERSTATUS SharedClipboardURITransferGetStatus(PSHAREDCLIPBOARDURITRANSFER pTransfer)2216 { 2217 AssertPtrReturn(pTransfer, SH AREDCLIPBOARDURITRANSFERSTATUS_NONE);2215 SHCLURITRANSFERSTATUS SharedClipboardURITransferGetStatus(PSHCLURITRANSFER pTransfer) 2216 { 2217 AssertPtrReturn(pTransfer, SHCLURITRANSFERSTATUS_NONE); 2218 2218 2219 2219 return pTransfer->State.enmStatus; … … 2228 2228 * @param pvUser Pointer to user-provided data. 2229 2229 */ 2230 int SharedClipboardURITransferRun(PSH AREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser)2230 int SharedClipboardURITransferRun(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser) 2231 2231 { 2232 2232 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); 2233 2233 2234 AssertMsgReturn(pTransfer->State.enmStatus == SH AREDCLIPBOARDURITRANSFERSTATUS_READY,2234 AssertMsgReturn(pTransfer->State.enmStatus == SHCLURITRANSFERSTATUS_READY, 2235 2235 ("Wrong status (currently is %RU32)\n", pTransfer->State.enmStatus), VERR_WRONG_ORDER); 2236 2236 … … 2248 2248 * @param pCallbacks Pointer to callback table to set. 2249 2249 */ 2250 void SharedClipboardURITransferSetCallbacks(PSH AREDCLIPBOARDURITRANSFER pTransfer,2251 PSH AREDCLIPBOARDURITRANSFERCALLBACKS pCallbacks)2250 void SharedClipboardURITransferSetCallbacks(PSHCLURITRANSFER pTransfer, 2251 PSHCLURITRANSFERCALLBACKS pCallbacks) 2252 2252 { 2253 2253 AssertPtrReturnVoid(pTransfer); … … 2281 2281 * @param pvUser Pointer to user-provided data. 2282 2282 */ 2283 static int sharedClipboardURITransferThreadCreate(PSH AREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser)2283 static int sharedClipboardURITransferThreadCreate(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser) 2284 2284 2285 2285 { … … 2297 2297 if (pTransfer->Thread.fStarted) /* Did the thread indicate that it started correctly? */ 2298 2298 { 2299 pTransfer->State.enmStatus = SH AREDCLIPBOARDURITRANSFERSTATUS_RUNNING;2299 pTransfer->State.enmStatus = SHCLURITRANSFERSTATUS_RUNNING; 2300 2300 } 2301 2301 else … … 2314 2314 * @param uTimeoutMs Timeout (in ms) to wait for thread creation. 2315 2315 */ 2316 static int sharedClipboardURITransferThreadDestroy(PSH AREDCLIPBOARDURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs)2316 static int sharedClipboardURITransferThreadDestroy(PSHCLURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs) 2317 2317 { 2318 2318 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 2340 2340 * @param pURI URI clipboard context to initialize. 2341 2341 */ 2342 int SharedClipboardURICtxInit(PSH AREDCLIPBOARDURICTX pURI)2342 int SharedClipboardURICtxInit(PSHCLURICTX pURI) 2343 2343 { 2344 2344 AssertPtrReturn(pURI, VERR_INVALID_POINTER); … … 2368 2368 * @param pURI URI clipboard context to destroy. 2369 2369 */ 2370 void SharedClipboardURICtxDestroy(PSH AREDCLIPBOARDURICTX pURI)2370 void SharedClipboardURICtxDestroy(PSHCLURICTX pURI) 2371 2371 { 2372 2372 AssertPtrReturnVoid(pURI); … … 2376 2376 RTCritSectDelete(&pURI->CritSect); 2377 2377 2378 PSH AREDCLIPBOARDURITRANSFER pTransfer, pTransferNext;2379 RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SH AREDCLIPBOARDURITRANSFER, Node)2378 PSHCLURITRANSFER pTransfer, pTransferNext; 2379 RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SHCLURITRANSFER, Node) 2380 2380 { 2381 2381 SharedClipboardURITransferDestroy(pTransfer); … … 2396 2396 * @param pURI URI clipboard context to reset. 2397 2397 */ 2398 void SharedClipboardURICtxReset(PSH AREDCLIPBOARDURICTX pURI)2398 void SharedClipboardURICtxReset(PSHCLURICTX pURI) 2399 2399 { 2400 2400 AssertPtrReturnVoid(pURI); … … 2402 2402 LogFlowFuncEnter(); 2403 2403 2404 PSH AREDCLIPBOARDURITRANSFER pTransfer;2405 RTListForEach(&pURI->List, pTransfer, SH AREDCLIPBOARDURITRANSFER, Node)2404 PSHCLURITRANSFER pTransfer; 2405 RTListForEach(&pURI->List, pTransfer, SHCLURITRANSFER, Node) 2406 2406 SharedClipboardURITransferReset(pTransfer); 2407 2407 } … … 2414 2414 * @param pTransfer Pointer to URI clipboard transfer to add. 2415 2415 */ 2416 int SharedClipboardURICtxTransferAdd(PSH AREDCLIPBOARDURICTX pURI, PSHAREDCLIPBOARDURITRANSFER pTransfer)2416 int SharedClipboardURICtxTransferAdd(PSHCLURICTX pURI, PSHCLURITRANSFER pTransfer) 2417 2417 { 2418 2418 AssertPtrReturn(pURI, VERR_INVALID_POINTER); … … 2439 2439 * @param pTransfer Pointer to URI clipboard transfer to remove. 2440 2440 */ 2441 int SharedClipboardURICtxTransferRemove(PSH AREDCLIPBOARDURICTX pURI, PSHAREDCLIPBOARDURITRANSFER pTransfer)2441 int SharedClipboardURICtxTransferRemove(PSHCLURICTX pURI, PSHCLURITRANSFER pTransfer) 2442 2442 { 2443 2443 AssertPtrReturn(pURI, VERR_INVALID_POINTER); … … 2467 2467 * @param uIdx Index of the transfer to return. 2468 2468 */ 2469 static PSH AREDCLIPBOARDURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx)2469 static PSHCLURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHCLURICTX pURI, uint32_t uIdx) 2470 2470 { 2471 2471 AssertReturn(uIdx == 0, NULL); /* Only one transfer allowed at the moment. */ 2472 return RTListGetFirst(&pURI->List, SH AREDCLIPBOARDURITRANSFER, Node);2472 return RTListGetFirst(&pURI->List, SHCLURITRANSFER, Node); 2473 2473 } 2474 2474 … … 2480 2480 * @param uIdx Index of the transfer to return. 2481 2481 */ 2482 PSH AREDCLIPBOARDURITRANSFER SharedClipboardURICtxGetTransfer(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx)2482 PSHCLURITRANSFER SharedClipboardURICtxGetTransfer(PSHCLURICTX pURI, uint32_t uIdx) 2483 2483 { 2484 2484 return sharedClipboardURICtxGetTransferInternal(pURI, uIdx); … … 2491 2491 * @param pURI URI clipboard context to return number for. 2492 2492 */ 2493 uint32_t SharedClipboardURICtxGetRunningTransfers(PSH AREDCLIPBOARDURICTX pURI)2493 uint32_t SharedClipboardURICtxGetRunningTransfers(PSHCLURICTX pURI) 2494 2494 { 2495 2495 AssertPtrReturn(pURI, 0); … … 2503 2503 * @param pURI URI clipboard context to return number for. 2504 2504 */ 2505 uint32_t SharedClipboardURICtxGetTotalTransfers(PSH AREDCLIPBOARDURICTX pURI)2505 uint32_t SharedClipboardURICtxGetTotalTransfers(PSHCLURICTX pURI) 2506 2506 { 2507 2507 AssertPtrReturn(pURI, 0); … … 2515 2515 * @param pURI URI clipboard context to cleanup transfers for. 2516 2516 */ 2517 void SharedClipboardURICtxTransfersCleanup(PSH AREDCLIPBOARDURICTX pURI)2517 void SharedClipboardURICtxTransfersCleanup(PSHCLURICTX pURI) 2518 2518 { 2519 2519 AssertPtrReturnVoid(pURI); … … 2522 2522 2523 2523 /* Remove all transfers which are not in a running state (e.g. only announced). */ 2524 PSH AREDCLIPBOARDURITRANSFER pTransfer, pTransferNext;2525 RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SH AREDCLIPBOARDURITRANSFER, Node)2526 { 2527 if (SharedClipboardURITransferGetStatus(pTransfer) != SH AREDCLIPBOARDURITRANSFERSTATUS_RUNNING)2524 PSHCLURITRANSFER pTransfer, pTransferNext; 2525 RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SHCLURITRANSFER, Node) 2526 { 2527 if (SharedClipboardURITransferGetStatus(pTransfer) != SHCLURITRANSFERSTATUS_RUNNING) 2528 2528 { 2529 2529 SharedClipboardURITransferDestroy(pTransfer); … … 2545 2545 * @param pURI URI clipboard context to determine value for. 2546 2546 */ 2547 bool SharedClipboardURICtxTransfersMaximumReached(PSH AREDCLIPBOARDURICTX pURI)2547 bool SharedClipboardURICtxTransfersMaximumReached(PSHCLURICTX pURI) 2548 2548 { 2549 2549 AssertPtrReturn(pURI, true); … … 2561 2561 * @param pSrc The IPRT structure to convert data from. 2562 2562 */ 2563 void SharedClipboardFsObjFromIPRT(PSH AREDCLIPBOARDFSOBJINFO pDst, PCRTFSOBJINFO pSrc)2563 void SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO pDst, PCRTFSOBJINFO pSrc) 2564 2564 { 2565 2565 pDst->cbObject = pSrc->cbObject; … … 2577 2577 default: 2578 2578 case RTFSOBJATTRADD_NOTHING: 2579 pDst->Attr.enmAdditional = SH AREDCLIPBOARDFSOBJATTRADD_NOTHING;2579 pDst->Attr.enmAdditional = SHCLFSOBJATTRADD_NOTHING; 2580 2580 break; 2581 2581 2582 2582 case RTFSOBJATTRADD_UNIX: 2583 pDst->Attr.enmAdditional = SH AREDCLIPBOARDFSOBJATTRADD_UNIX;2583 pDst->Attr.enmAdditional = SHCLFSOBJATTRADD_UNIX; 2584 2584 pDst->Attr.u.Unix.uid = pSrc->Attr.u.Unix.uid; 2585 2585 pDst->Attr.u.Unix.gid = pSrc->Attr.u.Unix.gid; … … 2593 2593 2594 2594 case RTFSOBJATTRADD_EASIZE: 2595 pDst->Attr.enmAdditional = SH AREDCLIPBOARDFSOBJATTRADD_EASIZE;2595 pDst->Attr.enmAdditional = SHCLFSOBJATTRADD_EASIZE; 2596 2596 pDst->Attr.u.EASize.cb = pSrc->Attr.u.EASize.cb; 2597 2597 break; … … 2612 2612 */ 2613 2613 static int sharedClipboardConvertFileCreateFlags(bool fWritable, unsigned fShClFlags, RTFMODE fMode, 2614 SH AREDCLIPBOARDOBJHANDLE handleInitial, uint64_t *pfOpen)2614 SHCLOBJHANDLE handleInitial, uint64_t *pfOpen) 2615 2615 { 2616 2616 uint64_t fOpen = 0; … … 2640 2640 * and it contained random bits from stack. Detect this using the handle field value 2641 2641 * passed from the guest: old additions set it (incorrectly) to 0, new additions 2642 * set it to SH AREDCLIPBOARDOBJHANDLE_INVALID(~0).2642 * set it to SHCLOBJHANDLE_INVALID(~0). 2643 2643 */ 2644 2644 if (handleInitial == 0) … … 2656 2656 } 2657 2657 2658 switch ((fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_RW))2658 switch ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_RW)) 2659 2659 { 2660 2660 default: 2661 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_NONE:2661 case SHCL_OBJ_CF_ACCESS_NONE: 2662 2662 { 2663 2663 #ifdef RT_OS_WINDOWS 2664 if ((fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_ATTR) != SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE)2664 if ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_ATTR) != SHCL_OBJ_CF_ACCESS_ATTR_NONE) 2665 2665 fOpen |= RTFILE_O_ATTR_ONLY; 2666 2666 else 2667 2667 #endif 2668 2668 fOpen |= RTFILE_O_READ; 2669 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_NONE\n"));2669 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_NONE\n")); 2670 2670 break; 2671 2671 } 2672 2672 2673 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_READ:2673 case SHCL_OBJ_CF_ACCESS_READ: 2674 2674 { 2675 2675 fOpen |= RTFILE_O_READ; 2676 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_READ\n"));2676 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_READ\n")); 2677 2677 break; 2678 2678 } 2679 2679 2680 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_WRITE:2680 case SHCL_OBJ_CF_ACCESS_WRITE: 2681 2681 { 2682 2682 fOpen |= RTFILE_O_WRITE; 2683 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_WRITE\n"));2683 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_WRITE\n")); 2684 2684 break; 2685 2685 } 2686 2686 2687 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_READWRITE:2687 case SHCL_OBJ_CF_ACCESS_READWRITE: 2688 2688 { 2689 2689 fOpen |= RTFILE_O_READWRITE; 2690 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_READWRITE\n"));2690 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_READWRITE\n")); 2691 2691 break; 2692 2692 } 2693 2693 } 2694 2694 2695 if (fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACCESS_APPEND)2695 if (fShClFlags & SHCL_OBJ_CF_ACCESS_APPEND) 2696 2696 { 2697 2697 fOpen |= RTFILE_O_APPEND; 2698 2698 } 2699 2699 2700 switch ((fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_ATTR))2700 switch ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_ATTR)) 2701 2701 { 2702 2702 default: 2703 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE:2703 case SHCL_OBJ_CF_ACCESS_ATTR_NONE: 2704 2704 { 2705 2705 fOpen |= RTFILE_O_ACCESS_ATTR_DEFAULT; 2706 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE\n"));2706 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_NONE\n")); 2707 2707 break; 2708 2708 } 2709 2709 2710 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READ:2710 case SHCL_OBJ_CF_ACCESS_ATTR_READ: 2711 2711 { 2712 2712 fOpen |= RTFILE_O_ACCESS_ATTR_READ; 2713 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READ\n"));2713 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_READ\n")); 2714 2714 break; 2715 2715 } 2716 2716 2717 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_WRITE:2717 case SHCL_OBJ_CF_ACCESS_ATTR_WRITE: 2718 2718 { 2719 2719 fOpen |= RTFILE_O_ACCESS_ATTR_WRITE; 2720 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_WRITE\n"));2720 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_WRITE\n")); 2721 2721 break; 2722 2722 } 2723 2723 2724 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READWRITE:2724 case SHCL_OBJ_CF_ACCESS_ATTR_READWRITE: 2725 2725 { 2726 2726 fOpen |= RTFILE_O_ACCESS_ATTR_READWRITE; 2727 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READWRITE\n"));2727 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_READWRITE\n")); 2728 2728 break; 2729 2729 } … … 2731 2731 2732 2732 /* Sharing mask */ 2733 switch ((fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_DENY))2733 switch ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_DENY)) 2734 2734 { 2735 2735 default: 2736 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYNONE:2736 case SHCL_OBJ_CF_ACCESS_DENYNONE: 2737 2737 fOpen |= RTFILE_O_DENY_NONE; 2738 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYNONE\n"));2738 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYNONE\n")); 2739 2739 break; 2740 2740 2741 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYREAD:2741 case SHCL_OBJ_CF_ACCESS_DENYREAD: 2742 2742 fOpen |= RTFILE_O_DENY_READ; 2743 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYREAD\n"));2743 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYREAD\n")); 2744 2744 break; 2745 2745 2746 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE:2746 case SHCL_OBJ_CF_ACCESS_DENYWRITE: 2747 2747 fOpen |= RTFILE_O_DENY_WRITE; 2748 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE\n"));2748 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYWRITE\n")); 2749 2749 break; 2750 2750 2751 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYALL:2751 case SHCL_OBJ_CF_ACCESS_DENYALL: 2752 2752 fOpen |= RTFILE_O_DENY_ALL; 2753 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYALL\n"));2753 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYALL\n")); 2754 2754 break; 2755 2755 } 2756 2756 2757 2757 /* Open/Create action mask */ 2758 switch ((fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_EXISTS))2759 { 2760 case SH AREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS:2761 if (SH AREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2758 switch ((fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_EXISTS)) 2759 { 2760 case SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS: 2761 if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2762 2762 { 2763 2763 fOpen |= RTFILE_O_OPEN_CREATE; 2764 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));2764 LogFlowFunc(("SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n")); 2765 2765 } 2766 else if (SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2766 else if (SHCL_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2767 2767 { 2768 2768 fOpen |= RTFILE_O_OPEN; 2769 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW\n"));2769 LogFlowFunc(("SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS and SHCL_OBJ_CF_ACT_FAIL_IF_NEW\n")); 2770 2770 } 2771 2771 else … … 2775 2775 } 2776 2776 break; 2777 case SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_EXISTS:2778 if (SH AREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2777 case SHCL_OBJ_CF_ACT_FAIL_IF_EXISTS: 2778 if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2779 2779 { 2780 2780 fOpen |= RTFILE_O_CREATE; 2781 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));2781 LogFlowFunc(("SHCL_OBJ_CF_ACT_FAIL_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n")); 2782 2782 } 2783 2783 else … … 2787 2787 } 2788 2788 break; 2789 case SH AREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS:2790 if (SH AREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2789 case SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS: 2790 if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2791 2791 { 2792 2792 fOpen |= RTFILE_O_CREATE_REPLACE; 2793 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));2793 LogFlowFunc(("SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n")); 2794 2794 } 2795 else if (SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2795 else if (SHCL_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2796 2796 { 2797 2797 fOpen |= RTFILE_O_OPEN | RTFILE_O_TRUNCATE; 2798 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW\n"));2798 LogFlowFunc(("SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHCL_OBJ_CF_ACT_FAIL_IF_NEW\n")); 2799 2799 } 2800 2800 else … … 2804 2804 } 2805 2805 break; 2806 case SH AREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS:2807 if (SH AREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2806 case SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS: 2807 if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2808 2808 { 2809 2809 fOpen |= RTFILE_O_CREATE_REPLACE; 2810 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));2810 LogFlowFunc(("SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n")); 2811 2811 } 2812 else if (SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2812 else if (SHCL_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2813 2813 { 2814 2814 fOpen |= RTFILE_O_OPEN | RTFILE_O_TRUNCATE; 2815 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW\n"));2815 LogFlowFunc(("SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHCL_OBJ_CF_ACT_FAIL_IF_NEW\n")); 2816 2816 } 2817 2817 else … … 2824 2824 { 2825 2825 rc = VERR_INVALID_PARAMETER; 2826 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_EXISTS - invalid parameter\n"));2826 LogFlowFunc(("SHCL_OBJ_CF_ACT_MASK_IF_EXISTS - invalid parameter\n")); 2827 2827 break; 2828 2828 } -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
r80444 r80662 154 154 * Will be set to NULL if the new API is not available. 155 155 */ 156 int VBoxClipboardWinCheckAndInitNewAPI(P VBOXCLIPBOARDWINAPINEW pAPI)156 int VBoxClipboardWinCheckAndInitNewAPI(PSHCLWINAPINEW pAPI) 157 157 { 158 158 RTLDRMOD hUser32 = NIL_RTLDRMOD; … … 175 175 else 176 176 { 177 RT_BZERO(pAPI, sizeof( VBOXCLIPBOARDWINAPINEW));177 RT_BZERO(pAPI, sizeof(SHCLWINAPINEW)); 178 178 LogFunc(("New Clipboard API not available; rc=%Rrc\n", rc)); 179 179 } … … 188 188 * @param pAPI Structure used for checking if the new clipboard API is available or not. 189 189 */ 190 bool VBoxClipboardWinIsNewAPI(P VBOXCLIPBOARDWINAPINEW pAPI)190 bool VBoxClipboardWinIsNewAPI(PSHCLWINAPINEW pAPI) 191 191 { 192 192 if (!pAPI) … … 201 201 * @param pCtx Windows clipboard context to use to add ourselves. 202 202 */ 203 int VBoxClipboardWinChainAdd(P VBOXCLIPBOARDWINCTX pCtx)204 { 205 const P VBOXCLIPBOARDWINAPINEW pAPI = &pCtx->newAPI;203 int VBoxClipboardWinChainAdd(PSHCLWINCTX pCtx) 204 { 205 const PSHCLWINAPINEW pAPI = &pCtx->newAPI; 206 206 207 207 BOOL fRc; … … 234 234 * @param pCtx Windows clipboard context to use to remove ourselves. 235 235 */ 236 int VBoxClipboardWinChainRemove(P VBOXCLIPBOARDWINCTX pCtx)236 int VBoxClipboardWinChainRemove(PSHCLWINCTX pCtx) 237 237 { 238 238 if (!pCtx->hWnd) 239 239 return VINF_SUCCESS; 240 240 241 const P VBOXCLIPBOARDWINAPINEW pAPI = &pCtx->newAPI;241 const PSHCLWINAPINEW pAPI = &pCtx->newAPI; 242 242 243 243 BOOL fRc; … … 283 283 284 284 /** @todo r=andy Why not using SetWindowLongPtr for keeping the context? */ 285 P VBOXCLIPBOARDWINCTX pCtx = (PVBOXCLIPBOARDWINCTX)dwData;285 PSHCLWINCTX pCtx = (PSHCLWINCTX)dwData; 286 286 AssertPtrReturnVoid(pCtx); 287 287 … … 298 298 * @param lParam LPARAM to pass. 299 299 */ 300 LRESULT VBoxClipboardWinChainPassToNext(P VBOXCLIPBOARDWINCTX pWinCtx,300 LRESULT VBoxClipboardWinChainPassToNext(PSHCLWINCTX pWinCtx, 301 301 UINT msg, WPARAM wParam, LPARAM lParam) 302 302 { … … 327 327 * @param uFormat Windows clipboard format to convert. 328 328 */ 329 VBOXCLIPBOARDFORMAT VBoxClipboardWinClipboardFormatToVBox(UINT uFormat)329 SHCLFORMAT VBoxClipboardWinClipboardFormatToVBox(UINT uFormat) 330 330 { 331 331 /* Insert the requested clipboard format data into the clipboard. */ 332 VBOXCLIPBOARDFORMAT vboxFormat = VBOX_SHARED_CLIPBOARD_FMT_NONE;332 SHCLFORMAT vboxFormat = VBOX_SHARED_CLIPBOARD_FMT_NONE; 333 333 334 334 switch (uFormat) … … 386 386 * @param pFormats Where to store the retrieved formats. 387 387 */ 388 int VBoxClipboardWinGetFormats(P VBOXCLIPBOARDWINCTX pCtx, PSHAREDCLIPBOARDFORMATDATA pFormats)388 int VBoxClipboardWinGetFormats(PSHCLWINCTX pCtx, PSHCLFORMATDATA pFormats) 389 389 { 390 390 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); 391 391 AssertPtrReturn(pFormats, VERR_INVALID_POINTER); 392 392 393 VBOXCLIPBOARDFORMATS fFormats = VBOX_SHARED_CLIPBOARD_FMT_NONE;393 SHCLFORMATS fFormats = VBOX_SHARED_CLIPBOARD_FMT_NONE; 394 394 395 395 /* Query list of available formats and report to host. */ … … 649 649 * @param lParam lParam to pass on. 650 650 */ 651 LRESULT VBoxClipboardWinHandleWMChangeCBChain(P VBOXCLIPBOARDWINCTX pWinCtx,651 LRESULT VBoxClipboardWinHandleWMChangeCBChain(PSHCLWINCTX pWinCtx, 652 652 HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) 653 653 { … … 697 697 * @param pWinCtx Windows context to use. 698 698 */ 699 int VBoxClipboardWinHandleWMDestroy(P VBOXCLIPBOARDWINCTX pWinCtx)699 int VBoxClipboardWinHandleWMDestroy(PSHCLWINCTX pWinCtx) 700 700 { 701 701 LogFlowFuncEnter(); … … 723 723 * @param hWnd Window handle to use. 724 724 */ 725 int VBoxClipboardWinHandleWMRenderAllFormats(P VBOXCLIPBOARDWINCTX pWinCtx, HWND hWnd)725 int VBoxClipboardWinHandleWMRenderAllFormats(PSHCLWINCTX pWinCtx, HWND hWnd) 726 726 { 727 727 RT_NOREF(pWinCtx); … … 750 750 * @param pWinCtx Windows context to use. 751 751 */ 752 int VBoxClipboardWinHandleWMTimer(P VBOXCLIPBOARDWINCTX pWinCtx)752 int VBoxClipboardWinHandleWMTimer(PSHCLWINCTX pWinCtx) 753 753 { 754 754 int rc = VINF_SUCCESS; … … 790 790 * @param fFormats Clipboard format(s) to announce. 791 791 */ 792 int VBoxClipboardWinAnnounceFormats(P VBOXCLIPBOARDWINCTX pWinCtx, VBOXCLIPBOARDFORMATS fFormats)792 int VBoxClipboardWinAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats) 793 793 { 794 794 LogFunc(("fFormats=0x%x\n", fFormats)); … … 846 846 * @param pTransfer URI transfer to use. 847 847 */ 848 int VBoxClipboardWinURITransferCreate(P VBOXCLIPBOARDWINCTX pWinCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer)848 int VBoxClipboardWinURITransferCreate(PSHCLWINCTX pWinCtx, PSHCLURITRANSFER pTransfer) 849 849 { 850 850 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 912 912 * @param pTransfer URI transfer to create implementation-specific data for. 913 913 */ 914 void VBoxClipboardWinURITransferDestroy(P VBOXCLIPBOARDWINCTX pWinCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer)914 void VBoxClipboardWinURITransferDestroy(PSHCLWINCTX pWinCtx, PSHCLURITRANSFER pTransfer) 915 915 { 916 916 RT_NOREF(pWinCtx); -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
r80623 r80662 206 206 { 207 207 /** Opaque data structure describing the front-end. */ 208 VBOXCLIPBOARDCONTEXT *pFrontend;208 SHCLCONTEXT *pFrontend; 209 209 /** Is an X server actually available? */ 210 210 bool fHaveX11; … … 926 926 * @note X11 backend code 927 927 */ 928 CLIPBACKEND *ClipConstructX11( VBOXCLIPBOARDCONTEXT *pFrontend, bool fHeadless)928 CLIPBACKEND *ClipConstructX11(SHCLCONTEXT *pFrontend, bool fHeadless) 929 929 { 930 930 CLIPBACKEND *pCtx = (CLIPBACKEND *)RTMemAllocZ(sizeof(CLIPBACKEND)); … … 2120 2120 2121 2121 /* Return the data in the simulated VBox clipboard. */ 2122 int ClipRequestDataForX11( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)2122 int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb) 2123 2123 { 2124 2124 RT_NOREF2(pCtx, u32Format); … … 2241 2241 static uint32_t g_fX11Formats = 0; 2242 2242 2243 void ClipReportX11Formats( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)2243 void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats) 2244 2244 { 2245 2245 RT_NOREF1(pCtx); … … 2389 2389 static char g_completedBuf[MAX_BUF_SIZE]; 2390 2390 2391 void ClipRequestFromX11CompleteCallback( VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)2391 void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb) 2392 2392 { 2393 2393 RT_NOREF1(pCtx); … … 2885 2885 # include <iprt/test.h> 2886 2886 2887 int ClipRequestDataForX11( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)2887 int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb) 2888 2888 { 2889 2889 RT_NOREF4(pCtx, u32Format, ppv, pcb); … … 2891 2891 } 2892 2892 2893 void ClipReportX11Formats( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)2893 void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats) 2894 2894 { 2895 2895 RT_NOREF2(pCtx, u32Formats); 2896 2896 } 2897 2897 2898 void ClipRequestFromX11CompleteCallback( VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)2898 void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb) 2899 2899 { 2900 2900 RT_NOREF5(pCtx, rc, pReq, pv, cb); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp
r80623 r80662 35 35 *********************************************************************************************************************************/ 36 36 /** Global clipboard context information */ 37 struct _ VBOXCLIPBOARDCONTEXT37 struct _SHCLCONTEXT 38 38 { 39 39 /** We have a separate thread to poll for new clipboard content */ … … 42 42 /** The reference to the current pasteboard */ 43 43 PasteboardRef pasteboard; 44 P VBOXCLIPBOARDCLIENT pClient;44 PSHCLCLIENT pClient; 45 45 }; 46 46 … … 50 50 *********************************************************************************************************************************/ 51 51 /** Only one client is supported. There seems to be no need for more clients. */ 52 static VBOXCLIPBOARDCONTEXT g_ctx;52 static SHCLCONTEXT g_ctx; 53 53 54 54 … … 59 59 * @param pCtx The context. 60 60 */ 61 static int vboxClipboardChanged( VBOXCLIPBOARDCONTEXT *pCtx)61 static int vboxClipboardChanged(SHCLCONTEXT *pCtx) 62 62 { 63 63 if (pCtx->pClient == NULL) … … 71 71 && fChanged) 72 72 { 73 SH AREDCLIPBOARDFORMATDATA formatData;73 SHCLFORMATDATA formatData; 74 74 RT_ZERO(formatData); 75 75 … … 90 90 * @returns VINF_SUCCESS (not used). 91 91 * @param ThreadSelf Our thread handle. 92 * @param pvUser Pointer to the VBOXCLIPBOARDCONTEXT structure.92 * @param pvUser Pointer to the SHCLCONTEXT structure. 93 93 * 94 94 */ … … 98 98 99 99 AssertPtrReturn(pvUser, VERR_INVALID_PARAMETER); 100 VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *)pvUser;100 SHCLCONTEXT *pCtx = (SHCLCONTEXT *)pvUser; 101 101 102 102 while (!pCtx->fTerminate) … … 156 156 } 157 157 158 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT pClient, bool fHeadless)158 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 159 159 { 160 160 RT_NOREF(fHeadless); … … 178 178 } 179 179 180 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT pClient)180 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient) 181 181 { 182 182 /* Sync the host clipboard content with the client. */ … … 190 190 } 191 191 192 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT pClient)192 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 193 193 { 194 194 VBoxSvcClipboardLock(); … … 201 201 } 202 202 203 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT pClient,204 P VBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDFORMATDATA pFormats)203 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, 204 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats) 205 205 { 206 206 RT_NOREF(pCmdCtx); … … 219 219 #endif 220 220 221 SH AREDCLIPBOARDDATAREQ dataReq;221 SHCLDATAREQ dataReq; 222 222 RT_ZERO(dataReq); 223 223 … … 236 236 * @param pcbActual Where to write the actual size of the written data. 237 237 */ 238 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,239 PSH AREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)238 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 239 PSHCLDATABLOCK pData, uint32_t *pcbActual) 240 240 { 241 241 RT_NOREF(pCmdCtx); … … 262 262 * @param pData Data block to write to clipboard. 263 263 */ 264 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT pClient,265 P VBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData)264 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, 265 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData) 266 266 { 267 267 RT_NOREF(pCmdCtx); … … 277 277 278 278 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 279 int VBoxClipboardSvcImplURIReadDir(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDDIRDATA pDirData)279 int VBoxClipboardSvcImplURIReadDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData) 280 280 { 281 281 RT_NOREF(pClient, pDirData); … … 283 283 } 284 284 285 int VBoxClipboardSvcImplURIWriteDir(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDDIRDATA pDirData)285 int VBoxClipboardSvcImplURIWriteDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData) 286 286 { 287 287 RT_NOREF(pClient, pDirData); … … 289 289 } 290 290 291 int VBoxClipboardSvcImplURIReadFileHdr(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEHDR pFileHdr)291 int VBoxClipboardSvcImplURIReadFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr) 292 292 { 293 293 RT_NOREF(pClient, pFileHdr); … … 295 295 } 296 296 297 int VBoxClipboardSvcImplURIWriteFileHdr(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEHDR pFileHdr)297 int VBoxClipboardSvcImplURIWriteFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr) 298 298 { 299 299 RT_NOREF(pClient, pFileHdr); … … 301 301 } 302 302 303 int VBoxClipboardSvcImplURIReadFileData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEDATA pFileData)303 int VBoxClipboardSvcImplURIReadFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData) 304 304 { 305 305 RT_NOREF(pClient, pFileData); … … 307 307 } 308 308 309 int VBoxClipboardSvcImplURIWriteFileData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEDATA pFileData)309 int VBoxClipboardSvcImplURIWriteFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData) 310 310 { 311 311 RT_NOREF(pClient, pFileData); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
r80638 r80662 40 40 41 41 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 42 struct VBOXCLIPBOARDCLIENTSTATE;42 struct SHCLCLIENTSTATE; 43 43 #endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ 44 44 … … 55 55 * Structure for keeping a single HGCM message. 56 56 */ 57 typedef struct _ VBOXCLIPBOARDCLIENTMSG57 typedef struct _SHCLCLIENTMSG 58 58 { 59 59 /** Stored message type. */ … … 65 65 /** Message context. */ 66 66 VBOXSHCLMSGCTX m_Ctx; 67 } VBOXCLIPBOARDCLIENTMSG, *PVBOXCLIPBOARDCLIENTMSG;68 69 typedef struct VBOXCLIPBOARDCLIENTURISTATE67 } SHCLCLIENTMSG, *PSHCLCLIENTMSG; 68 69 typedef struct SHCLCLIENTURISTATE 70 70 { 71 71 /** Directory of the transfer to start. */ 72 SH AREDCLIPBOARDURITRANSFERDIR enmTransferDir;73 } VBOXCLIPBOARDCLIENTURISTATE, *PVBOXCLIPBOARDCLIENTURISTATE;72 SHCLURITRANSFERDIR enmTransferDir; 73 } SHCLCLIENTURISTATE, *PSHCLCLIENTURISTATE; 74 74 75 75 /** … … 77 77 * This structure needs to be serializable by SSM (must be a POD type). 78 78 */ 79 typedef struct VBOXCLIPBOARDCLIENTSTATE80 { 81 struct VBOXCLIPBOARDCLIENTSTATE *pNext;82 struct VBOXCLIPBOARDCLIENTSTATE *pPrev;83 84 VBOXCLIPBOARDCONTEXT *pCtx;79 typedef struct SHCLCLIENTSTATE 80 { 81 struct SHCLCLIENTSTATE *pNext; 82 struct SHCLCLIENTSTATE *pPrev; 83 84 SHCLCONTEXT *pCtx; 85 85 86 86 /** The client's HGCM ID. */ … … 90 90 /** Maximum chunk size to use for data transfers. Set to _64K by default. */ 91 91 uint32_t cbChunkSize; 92 SH AREDCLIPBOARDSOURCE enmSource;92 SHCLSOURCE enmSource; 93 93 /** The client's URI state. */ 94 VBOXCLIPBOARDCLIENTURISTATE URI;95 } VBOXCLIPBOARDCLIENTSTATE, *PVBOXCLIPBOARDCLIENTSTATE;96 97 typedef struct _ VBOXCLIPBOARDCLIENTCMDCTX94 SHCLCLIENTURISTATE URI; 95 } SHCLCLIENTSTATE, *PSHCLCLIENTSTATE; 96 97 typedef struct _SHCLCLIENTCMDCTX 98 98 { 99 99 uint32_t uContextID; 100 } VBOXCLIPBOARDCLIENTCMDCTX, *PVBOXCLIPBOARDCLIENTCMDCTX;101 102 typedef struct _ VBOXCLIPBOARDCLIENT100 } SHCLCLIENTCMDCTX, *PSHCLCLIENTCMDCTX; 101 102 typedef struct _SHCLCLIENT 103 103 { 104 104 /** The client's HGCM client ID. */ 105 105 uint32_t uClientID; 106 106 /** General client state data. */ 107 VBOXCLIPBOARDCLIENTSTATE State;107 SHCLCLIENTSTATE State; 108 108 /** The client's message queue (FIFO). */ 109 RTCList< VBOXCLIPBOARDCLIENTMSG *> queueMsg;109 RTCList<SHCLCLIENTMSG *> queueMsg; 110 110 /** The client's own event source. */ 111 SH AREDCLIPBOARDEVENTSOURCE Events;111 SHCLEVENTSOURCE Events; 112 112 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 113 113 /** URI context data. */ 114 SH AREDCLIPBOARDURICTX URI;114 SHCLURICTX URI; 115 115 #endif 116 116 /** Structure for keeping the client's pending (deferred return) state. … … 130 130 PVBOXHGCMSVCPARM paParms; 131 131 } Pending; 132 } VBOXCLIPBOARDCLIENT, *PVBOXCLIPBOARDCLIENT;132 } SHCLCLIENT, *PSHCLCLIENT; 133 133 134 134 /** … … 136 136 * Currently empty. 137 137 */ 138 typedef struct _ VBOXCLIPBOARDEVENTSOURCEMAPENTRY139 { 140 } VBOXCLIPBOARDEVENTSOURCEMAPENTRY;138 typedef struct _SHCLEVENTSOURCEMAPENTRY 139 { 140 } SHCLEVENTSOURCEMAPENTRY; 141 141 142 142 /** Map holding information about connected HGCM clients. Key is the (unique) HGCM client ID. 143 * The value is a weak pointer to P VBOXCLIPBOARDCLIENT, which is owned by HGCM. */144 typedef std::map<uint32_t, P VBOXCLIPBOARDCLIENT> ClipboardClientMap;143 * The value is a weak pointer to PSHCLCLIENT, which is owned by HGCM. */ 144 typedef std::map<uint32_t, PSHCLCLIENT> ClipboardClientMap; 145 145 146 146 /** Map holding information about event sources. Key is the (unique) event source ID. */ 147 typedef std::map< VBOXCLIPBOARDEVENTSOURCEID, VBOXCLIPBOARDEVENTSOURCEMAPENTRY> ClipboardEventSourceMap;147 typedef std::map<SHCLEVENTSOURCEID, SHCLEVENTSOURCEMAPENTRY> ClipboardEventSourceMap; 148 148 149 149 /** Simple queue (list) which holds deferred (waiting) clients. */ … … 156 156 * to communicate with the Shared Clipboard host service. 157 157 */ 158 typedef struct _ VBOXCLIPBOARDEXTSTATE158 typedef struct _SHCLEXTSTATE 159 159 { 160 160 /** Pointer to the actual service extension handle. */ … … 173 173 * is reading clipboard data from the extension. */ 174 174 uint32_t uDelayedFormats; 175 } VBOXCLIPBOARDEXTSTATE, *PVBOXCLIPBOARDEXTSTATE;175 } SHCLEXTSTATE, *PSHCLEXTSTATE; 176 176 177 177 /* 178 178 * The service functions. Locking is between the service thread and the platform-dependent (window) thread. 179 179 */ 180 int vboxSvcClipboardDataReadRequest(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDDATAREQ pDataReq, PVBOXCLIPBOARDEVENTID puEvent);181 int vboxSvcClipboardDataReadSignal(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData);182 int vboxSvcClipboardFormatsReport(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDFORMATDATA pFormats);180 int vboxSvcClipboardDataReadRequest(PSHCLCLIENT pClient, PSHCLDATAREQ pDataReq, PSHCLEVENTID puEvent); 181 int vboxSvcClipboardDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData); 182 int vboxSvcClipboardFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats); 183 183 184 184 uint32_t vboxSvcClipboardGetMode(void); 185 int vboxSvcClipboardSetSource(P VBOXCLIPBOARDCLIENT pClient, SHAREDCLIPBOARDSOURCE enmSource);186 187 void vboxSvcClipboardMsgQueueReset(P VBOXCLIPBOARDCLIENT pClient);188 P VBOXCLIPBOARDCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms);189 void vboxSvcClipboardMsgFree(P VBOXCLIPBOARDCLIENTMSG pMsg);190 void vboxSvcClipboardMsgSetPeekReturn(P VBOXCLIPBOARDCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms);191 int vboxSvcClipboardMsgAdd(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTMSG pMsg, bool fAppend);192 int vboxSvcClipboardMsgPeek(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool fWait);193 int vboxSvcClipboardMsgGet(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);194 195 int vboxSvcClipboardClientWakeup(P VBOXCLIPBOARDCLIENT pClient);185 int vboxSvcClipboardSetSource(PSHCLCLIENT pClient, SHCLSOURCE enmSource); 186 187 void vboxSvcClipboardMsgQueueReset(PSHCLCLIENT pClient); 188 PSHCLCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms); 189 void vboxSvcClipboardMsgFree(PSHCLCLIENTMSG pMsg); 190 void vboxSvcClipboardMsgSetPeekReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms); 191 int vboxSvcClipboardMsgAdd(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg, bool fAppend); 192 int vboxSvcClipboardMsgPeek(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool fWait); 193 int vboxSvcClipboardMsgGet(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 194 195 int vboxSvcClipboardClientWakeup(PSHCLCLIENT pClient); 196 196 197 197 # ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 198 int vboxSvcClipboardURITransferStart(P VBOXCLIPBOARDCLIENT pClient,199 SH AREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,200 PSH AREDCLIPBOARDURITRANSFER *ppTransfer);198 int vboxSvcClipboardURITransferStart(PSHCLCLIENT pClient, 199 SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource, 200 PSHCLURITRANSFER *ppTransfer); 201 201 bool vboxSvcClipboardURIMsgIsAllowed(uint32_t uMode, uint32_t uMsg); 202 202 # endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ … … 208 208 void VBoxClipboardSvcImplDestroy(void); 209 209 210 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT pClient, bool fHeadless);211 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT pClient);212 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDFORMATDATA pFormats);210 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless); 211 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient); 212 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats); 213 213 /** @todo Document: Can return VINF_HGCM_ASYNC_EXECUTE to defer returning read data.*/ 214 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual);215 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData);214 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual); 215 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData); 216 216 /** 217 217 * Synchronise the contents of the host clipboard with the guest, called by the HGCM layer 218 218 * after a save and restore of the guest. 219 219 */ 220 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT pClient);220 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient); 221 221 222 222 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 223 int vboxSvcClipboardURITransferOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx);224 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx);225 226 int vboxSvcClipboardURIGetRoots(PSH AREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDROOTLIST *ppRootList);227 228 int vboxSvcClipboardURIListOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx,229 P VBOXCLIPBOARDLISTOPENPARMS pOpenParms, PSHAREDCLIPBOARDLISTHANDLE phList);230 int vboxSvcClipboardURIListClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList);231 int vboxSvcClipboardURIListHdrRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,232 P VBOXCLIPBOARDLISTHDR pListHdr);233 int vboxSvcClipboardURIListHdrWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,234 P VBOXCLIPBOARDLISTHDR pListHdr);235 int vboxSvcClipboardURIListEntryRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,236 P VBOXCLIPBOARDLISTENTRY pListEntry);237 int vboxSvcClipboardURIListEntryWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,238 P VBOXCLIPBOARDLISTENTRY pListEntry);239 240 int vboxSvcClipboardURIObjOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms,241 PSH AREDCLIPBOARDOBJHANDLE phObj);242 int vboxSvcClipboardURIObjClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj);243 int vboxSvcClipboardURIObjRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,223 int vboxSvcClipboardURITransferOpen(PSHCLPROVIDERCTX pCtx); 224 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSHCLPROVIDERCTX pCtx); 225 226 int vboxSvcClipboardURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList); 227 228 int vboxSvcClipboardURIListOpen(PSHCLPROVIDERCTX pCtx, 229 PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList); 230 int vboxSvcClipboardURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList); 231 int vboxSvcClipboardURIListHdrRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 232 PSHCLLISTHDR pListHdr); 233 int vboxSvcClipboardURIListHdrWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 234 PSHCLLISTHDR pListHdr); 235 int vboxSvcClipboardURIListEntryRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 236 PSHCLLISTENTRY pListEntry); 237 int vboxSvcClipboardURIListEntryWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 238 PSHCLLISTENTRY pListEntry); 239 240 int vboxSvcClipboardURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms, 241 PSHCLOBJHANDLE phObj); 242 int vboxSvcClipboardURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj); 243 int vboxSvcClipboardURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 244 244 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead); 245 int vboxSvcClipboardURIObjWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,245 int vboxSvcClipboardURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 246 246 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten); 247 247 248 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData);249 DECLCALLBACK(void) VBoxSvcClipboardURIDataHeaderCompleteCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData);250 DECLCALLBACK(void) VBoxSvcClipboardURIDataCompleteCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData);251 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc);252 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData);253 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc);254 255 int VBoxClipboardSvcImplURITransferCreate(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer);256 int VBoxClipboardSvcImplURITransferDestroy(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer);248 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSHCLURITRANSFERCALLBACKDATA pData); 249 DECLCALLBACK(void) VBoxSvcClipboardURIDataHeaderCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData); 250 DECLCALLBACK(void) VBoxSvcClipboardURIDataCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData); 251 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc); 252 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSHCLURITRANSFERCALLBACKDATA pData); 253 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc); 254 255 int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer); 256 int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer); 257 257 #endif /*VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ 258 258 -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.cpp
r80557 r80662 40 40 * Externals * 41 41 *********************************************************************************************************************************/ 42 extern VBOXCLIPBOARDEXTSTATE g_ExtState;42 extern SHCLEXTSTATE g_ExtState; 43 43 extern PVBOXHGCMSVCHELPERS g_pHelpers; 44 44 extern ClipboardClientQueue g_listClientsDeferred; … … 49 49 *********************************************************************************************************************************/ 50 50 static int vboxSvcClipboardURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 51 PVBOXSHCLMSGCTX pMsgCtx, P VBOXCLIPBOARDLISTOPENPARMS pOpenParms);51 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms); 52 52 static int vboxSvcClipboardURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 53 PVBOXSHCLMSGCTX pMsgCtx, SH AREDCLIPBOARDLISTHANDLE hList);53 PVBOXSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList); 54 54 55 55 … … 58 58 *********************************************************************************************************************************/ 59 59 60 DECLCALLBACK(int) vboxSvcClipboardURITransferOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx)60 DECLCALLBACK(int) vboxSvcClipboardURITransferOpen(PSHCLPROVIDERCTX pCtx) 61 61 { 62 62 RT_NOREF(pCtx); … … 66 66 } 67 67 68 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx)68 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSHCLPROVIDERCTX pCtx) 69 69 { 70 70 RT_NOREF(pCtx); … … 74 74 } 75 75 76 DECLCALLBACK(int) vboxSvcClipboardURIGetRoots(PSH AREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDROOTLIST *ppRootList)76 DECLCALLBACK(int) vboxSvcClipboardURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList) 77 77 { 78 78 LogFlowFuncEnter(); 79 79 80 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;80 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 81 81 AssertPtr(pClient); 82 82 83 83 int rc; 84 84 85 P VBOXCLIPBOARDCLIENTMSG pMsgHdr = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_HDR_READ,85 PSHCLCLIENTMSG pMsgHdr = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_HDR_READ, 86 86 VBOX_SHARED_CLIPBOARD_CPARMS_ROOT_LIST_HDR_READ); 87 87 if (pMsgHdr) 88 88 { 89 VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);89 SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 90 90 91 91 HGCMSvcSetU32(&pMsgHdr->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 101 101 if (RT_SUCCESS(rc)) 102 102 { 103 PSH AREDCLIPBOARDEVENTPAYLOAD pPayloadHdr;103 PSHCLEVENTPAYLOAD pPayloadHdr; 104 104 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, 105 105 pCtx->pTransfer->uTimeoutMs, &pPayloadHdr); 106 106 if (RT_SUCCESS(rc)) 107 107 { 108 P VBOXCLIPBOARDROOTLISTHDR pSrcRootListHdr = (PVBOXCLIPBOARDROOTLISTHDR)pPayloadHdr->pvData;109 Assert(pPayloadHdr->cbData == sizeof( VBOXCLIPBOARDROOTLISTHDR));108 PSHCLROOTLISTHDR pSrcRootListHdr = (PSHCLROOTLISTHDR)pPayloadHdr->pvData; 109 Assert(pPayloadHdr->cbData == sizeof(SHCLROOTLISTHDR)); 110 110 111 111 LogFlowFunc(("cRoots=%RU32, fRoots=0x%x\n", pSrcRootListHdr->cRoots, pSrcRootListHdr->fRoots)); 112 112 113 P VBOXCLIPBOARDROOTLIST pRootList = SharedClipboardURIRootListAlloc();113 PSHCLROOTLIST pRootList = SharedClipboardURIRootListAlloc(); 114 114 if (pRootList) 115 115 { … … 117 117 { 118 118 pRootList->paEntries = 119 (P VBOXCLIPBOARDROOTLISTENTRY)RTMemAllocZ(pSrcRootListHdr->cRoots * sizeof(VBOXCLIPBOARDROOTLISTENTRY));119 (PSHCLROOTLISTENTRY)RTMemAllocZ(pSrcRootListHdr->cRoots * sizeof(SHCLROOTLISTENTRY)); 120 120 121 121 if (pRootList->paEntries) … … 123 123 for (uint32_t i = 0; i < pSrcRootListHdr->cRoots; i++) 124 124 { 125 P VBOXCLIPBOARDCLIENTMSG pMsgEntry = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_ENTRY_READ,125 PSHCLCLIENTMSG pMsgEntry = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_ENTRY_READ, 126 126 VBOX_SHARED_CLIPBOARD_CPARMS_ROOT_LIST_ENTRY_READ_REQ); 127 127 … … 140 140 break; 141 141 142 PSH AREDCLIPBOARDEVENTPAYLOAD pPayloadEntry;142 PSHCLEVENTPAYLOAD pPayloadEntry; 143 143 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, 144 144 pCtx->pTransfer->uTimeoutMs, &pPayloadEntry); … … 146 146 break; 147 147 148 P VBOXCLIPBOARDROOTLISTENTRY pSrcRootListEntry = (PVBOXCLIPBOARDROOTLISTENTRY)pPayloadEntry->pvData;149 Assert(pPayloadEntry->cbData == sizeof( VBOXCLIPBOARDROOTLISTENTRY));148 PSHCLROOTLISTENTRY pSrcRootListEntry = (PSHCLROOTLISTENTRY)pPayloadEntry->pvData; 149 Assert(pPayloadEntry->cbData == sizeof(SHCLROOTLISTENTRY)); 150 150 151 151 rc = SharedClipboardURIListEntryCopy(&pRootList->paEntries[i], pSrcRootListEntry); … … 190 190 } 191 191 192 DECLCALLBACK(int) vboxSvcClipboardURIListOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx,193 P VBOXCLIPBOARDLISTOPENPARMS pOpenParms, PSHAREDCLIPBOARDLISTHANDLE phList)192 DECLCALLBACK(int) vboxSvcClipboardURIListOpen(PSHCLPROVIDERCTX pCtx, 193 PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList) 194 194 { 195 195 LogFlowFuncEnter(); 196 196 197 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;197 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 198 198 AssertPtr(pClient); 199 199 200 200 int rc; 201 201 202 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_OPEN,202 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_OPEN, 203 203 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_OPEN); 204 204 if (pMsg) 205 205 { 206 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);206 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 207 207 208 208 pMsg->m_Ctx.uContextID = VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent); … … 220 220 if (RT_SUCCESS(rc)) 221 221 { 222 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;222 PSHCLEVENTPAYLOAD pPayload; 223 223 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 224 224 if (RT_SUCCESS(rc)) 225 225 { 226 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDREPLY));227 228 P VBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)pPayload->pvData;226 Assert(pPayload->cbData == sizeof(SHCLREPLY)); 227 228 PSHCLREPLY pReply = (PSHCLREPLY)pPayload->pvData; 229 229 AssertPtr(pReply); 230 230 231 Assert(pReply->uType == VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN);231 Assert(pReply->uType == VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN); 232 232 233 233 *phList = pReply->u.ListOpen.uHandle; … … 248 248 } 249 249 250 DECLCALLBACK(int) vboxSvcClipboardURIListClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList)250 DECLCALLBACK(int) vboxSvcClipboardURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList) 251 251 { 252 252 LogFlowFuncEnter(); 253 253 254 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;254 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 255 255 AssertPtr(pClient); 256 256 257 257 int rc; 258 258 259 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_CLOSE,259 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_CLOSE, 260 260 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_CLOSE); 261 261 if (pMsg) 262 262 { 263 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);263 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 264 264 265 265 pMsg->m_Ctx.uContextID = VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent); … … 277 277 if (RT_SUCCESS(rc)) 278 278 { 279 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;279 PSHCLEVENTPAYLOAD pPayload; 280 280 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 281 281 if (RT_SUCCESS(rc)) … … 294 294 } 295 295 296 DECLCALLBACK(int) vboxSvcClipboardURIListHdrRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx,297 SH AREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)296 DECLCALLBACK(int) vboxSvcClipboardURIListHdrRead(PSHCLPROVIDERCTX pCtx, 297 SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr) 298 298 { 299 299 LogFlowFuncEnter(); 300 300 301 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;301 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 302 302 AssertPtr(pClient); 303 303 304 304 int rc; 305 305 306 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_HDR_READ,306 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_HDR_READ, 307 307 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_HDR_READ_REQ); 308 308 if (pMsg) 309 309 { 310 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);310 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 311 311 312 312 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 323 323 if (RT_SUCCESS(rc)) 324 324 { 325 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;325 PSHCLEVENTPAYLOAD pPayload; 326 326 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, 327 327 pCtx->pTransfer->uTimeoutMs, &pPayload); 328 328 if (RT_SUCCESS(rc)) 329 329 { 330 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDLISTHDR));331 332 *pListHdr = *(P VBOXCLIPBOARDLISTHDR)pPayload->pvData;330 Assert(pPayload->cbData == sizeof(SHCLLISTHDR)); 331 332 *pListHdr = *(PSHCLLISTHDR)pPayload->pvData; 333 333 334 334 SharedClipboardPayloadFree(pPayload); … … 344 344 } 345 345 346 DECLCALLBACK(int) vboxSvcClipboardURIListHdrWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx,347 SH AREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)346 DECLCALLBACK(int) vboxSvcClipboardURIListHdrWrite(PSHCLPROVIDERCTX pCtx, 347 SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr) 348 348 { 349 349 RT_NOREF(pCtx, hList, pListHdr); … … 354 354 } 355 355 356 DECLCALLBACK(int) vboxSvcClipboardURIListEntryRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx,357 SH AREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pListEntry)356 DECLCALLBACK(int) vboxSvcClipboardURIListEntryRead(PSHCLPROVIDERCTX pCtx, 357 SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry) 358 358 { 359 359 LogFlowFuncEnter(); 360 360 361 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;361 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 362 362 AssertPtr(pClient); 363 363 364 364 int rc; 365 365 366 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_ENTRY_READ,366 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_ENTRY_READ, 367 367 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_ENTRY_READ); 368 368 if (pMsg) 369 369 { 370 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);370 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 371 371 372 372 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 383 383 if (RT_SUCCESS(rc)) 384 384 { 385 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;385 PSHCLEVENTPAYLOAD pPayload; 386 386 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 387 387 if (RT_SUCCESS(rc)) 388 388 { 389 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDLISTENTRY));390 391 rc = SharedClipboardURIListEntryCopy(pListEntry, (P VBOXCLIPBOARDLISTENTRY)pPayload->pvData);389 Assert(pPayload->cbData == sizeof(SHCLLISTENTRY)); 390 391 rc = SharedClipboardURIListEntryCopy(pListEntry, (PSHCLLISTENTRY)pPayload->pvData); 392 392 393 393 SharedClipboardPayloadFree(pPayload); … … 403 403 } 404 404 405 DECLCALLBACK(int) vboxSvcClipboardURIListEntryWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx,406 SH AREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pListEntry)405 DECLCALLBACK(int) vboxSvcClipboardURIListEntryWrite(PSHCLPROVIDERCTX pCtx, 406 SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry) 407 407 { 408 408 RT_NOREF(pCtx, hList, pListEntry); … … 413 413 } 414 414 415 int vboxSvcClipboardURIObjOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms,416 PSH AREDCLIPBOARDOBJHANDLE phObj)415 int vboxSvcClipboardURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms, 416 PSHCLOBJHANDLE phObj) 417 417 { 418 418 LogFlowFuncEnter(); 419 419 420 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;420 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 421 421 AssertPtr(pClient); 422 422 423 423 int rc; 424 424 425 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_OPEN,425 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_OPEN, 426 426 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_OPEN); 427 427 if (pMsg) 428 428 { 429 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);429 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 430 430 431 431 LogFlowFunc(("pszPath=%s, fCreate=0x%x\n", pCreateParms->pszPath, pCreateParms->fCreate)); … … 448 448 if (RT_SUCCESS(rc)) 449 449 { 450 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;450 PSHCLEVENTPAYLOAD pPayload; 451 451 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 452 452 if (RT_SUCCESS(rc)) 453 453 { 454 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDREPLY));455 456 P VBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)pPayload->pvData;454 Assert(pPayload->cbData == sizeof(SHCLREPLY)); 455 456 PSHCLREPLY pReply = (PSHCLREPLY)pPayload->pvData; 457 457 AssertPtr(pReply); 458 458 459 Assert(pReply->uType == VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN);459 Assert(pReply->uType == VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN); 460 460 461 461 *phObj = pReply->u.ObjOpen.uHandle; … … 473 473 } 474 474 475 int vboxSvcClipboardURIObjClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj)475 int vboxSvcClipboardURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj) 476 476 { 477 477 LogFlowFuncEnter(); 478 478 479 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;479 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 480 480 AssertPtr(pClient); 481 481 482 482 int rc; 483 483 484 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_CLOSE,484 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_CLOSE, 485 485 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_CLOSE); 486 486 if (pMsg) 487 487 { 488 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);488 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 489 489 490 490 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 500 500 if (RT_SUCCESS(rc)) 501 501 { 502 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;502 PSHCLEVENTPAYLOAD pPayload; 503 503 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 504 504 if (RT_SUCCESS(rc)) 505 505 { 506 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDREPLY));506 Assert(pPayload->cbData == sizeof(SHCLREPLY)); 507 507 508 508 #ifdef VBOX_STRICT 509 P VBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)pPayload->pvData;509 PSHCLREPLY pReply = (PSHCLREPLY)pPayload->pvData; 510 510 AssertPtr(pReply); 511 511 512 Assert(pReply->uType == VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE);512 Assert(pReply->uType == VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE); 513 513 #endif 514 514 … … 525 525 } 526 526 527 int vboxSvcClipboardURIObjRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,527 int vboxSvcClipboardURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 528 528 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead) 529 529 { 530 530 LogFlowFuncEnter(); 531 531 532 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;532 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 533 533 AssertPtr(pClient); 534 534 535 535 int rc; 536 536 537 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_READ,537 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_READ, 538 538 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_READ_REQ); 539 539 if (pMsg) 540 540 { 541 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);541 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 542 542 543 543 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 555 555 if (RT_SUCCESS(rc)) 556 556 { 557 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;557 PSHCLEVENTPAYLOAD pPayload; 558 558 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 559 559 if (RT_SUCCESS(rc)) 560 560 { 561 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDOBJDATACHUNK));562 563 P VBOXCLIPBOARDOBJDATACHUNK pDataChunk = (PVBOXCLIPBOARDOBJDATACHUNK)pPayload->pvData;561 Assert(pPayload->cbData == sizeof(SHCLOBJDATACHUNK)); 562 563 PSHCLOBJDATACHUNK pDataChunk = (PSHCLOBJDATACHUNK)pPayload->pvData; 564 564 AssertPtr(pDataChunk); 565 565 … … 583 583 } 584 584 585 int vboxSvcClipboardURIObjWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,585 int vboxSvcClipboardURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 586 586 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten) 587 587 { 588 588 LogFlowFuncEnter(); 589 589 590 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;590 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 591 591 AssertPtr(pClient); 592 592 593 593 int rc; 594 594 595 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_WRITE,595 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_WRITE, 596 596 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_WRITE); 597 597 if (pMsg) 598 598 { 599 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);599 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 600 600 601 601 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 613 613 if (RT_SUCCESS(rc)) 614 614 { 615 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;615 PSHCLEVENTPAYLOAD pPayload; 616 616 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 617 617 if (RT_SUCCESS(rc)) … … 641 641 *********************************************************************************************************************************/ 642 642 643 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData)643 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSHCLURITRANSFERCALLBACKDATA pData) 644 644 { 645 645 RT_NOREF(pData); … … 648 648 } 649 649 650 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc)650 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc) 651 651 { 652 652 RT_NOREF(pData, rc); … … 657 657 } 658 658 659 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData)659 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSHCLURITRANSFERCALLBACKDATA pData) 660 660 { 661 661 LogFlowFuncEnter(); … … 666 666 } 667 667 668 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc)668 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc) 669 669 { 670 670 LogFlowFuncEnter(); … … 689 689 */ 690 690 static int vboxSvcClipboardURIGetReply(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 691 P VBOXCLIPBOARDREPLY pReply)691 PSHCLREPLY pReply) 692 692 { 693 693 int rc; … … 714 714 switch (pReply->uType) 715 715 { 716 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN:716 case VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN: 717 717 { 718 718 if (cParms >= 6) … … 721 721 } 722 722 723 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN:723 case VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN: 724 724 { 725 725 if (cParms >= 6) … … 728 728 } 729 729 730 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE:730 case VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE: 731 731 { 732 732 if (cParms >= 6) … … 757 757 */ 758 758 static int vboxSvcClipboardURIGetRootListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 759 P VBOXCLIPBOARDROOTLISTHDR pRootLstHdr)759 PSHCLROOTLISTHDR pRootLstHdr) 760 760 { 761 761 int rc; … … 783 783 */ 784 784 static int vboxSvcClipboardURIGetRootListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 785 P VBOXCLIPBOARDROOTLISTENTRY pListEntry)785 PSHCLROOTLISTENTRY pListEntry) 786 786 { 787 787 int rc; … … 820 820 */ 821 821 static int vboxSvcClipboardURIGetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 822 P VBOXCLIPBOARDLISTOPENPARMS pOpenParms)822 PSHCLLISTOPENPARMS pOpenParms) 823 823 { 824 824 int rc; … … 867 867 */ 868 868 static int vboxSvcClipboardURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 869 PVBOXSHCLMSGCTX pMsgCtx, P VBOXCLIPBOARDLISTOPENPARMS pOpenParms)869 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms) 870 870 { 871 871 int rc; … … 900 900 */ 901 901 static int vboxSvcClipboardURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 902 PVBOXSHCLMSGCTX pMsgCtx, SH AREDCLIPBOARDLISTHANDLE hList)902 PVBOXSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList) 903 903 { 904 904 int rc; … … 928 928 */ 929 929 static int vboxSvcClipboardURIGetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 930 PSH AREDCLIPBOARDLISTHANDLE phList, PVBOXCLIPBOARDLISTHDR pListHdr)930 PSHCLLISTHANDLE phList, PSHCLLISTHDR pListHdr) 931 931 { 932 932 int rc; … … 967 967 */ 968 968 static int vboxSvcClipboardURISetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 969 PVBOXSHCLMSGCTX pMsgCtx, P VBOXCLIPBOARDLISTHDR pListHdr)969 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTHDR pListHdr) 970 970 { 971 971 int rc; … … 1002 1002 */ 1003 1003 static int vboxSvcClipboardURIGetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 1004 PSH AREDCLIPBOARDLISTHANDLE phList, PVBOXCLIPBOARDLISTENTRY pListEntry)1004 PSHCLLISTHANDLE phList, PSHCLLISTENTRY pListEntry) 1005 1005 { 1006 1006 int rc; … … 1048 1048 */ 1049 1049 static int vboxSvcClipboardURISetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 1050 PVBOXSHCLMSGCTX pMsgCtx, P VBOXCLIPBOARDLISTENTRY pListEntry)1050 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTENTRY pListEntry) 1051 1051 { 1052 1052 int rc; … … 1079 1079 * @param pDataChunk Where to store the object data chunk data. 1080 1080 */ 1081 static int vboxSvcClipboardURIGetObjDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], P VBOXCLIPBOARDOBJDATACHUNK pDataChunk)1081 static int vboxSvcClipboardURIGetObjDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PSHCLOBJDATACHUNK pDataChunk) 1082 1082 { 1083 1083 AssertPtrReturn(paParms, VERR_INVALID_PARAMETER); … … 1144 1144 * @param paParms Array function parameters supplied. 1145 1145 */ 1146 static int vboxSvcClipboardURITransferHandleReply(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer,1146 static int vboxSvcClipboardURITransferHandleReply(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer, 1147 1147 uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 1148 1148 { … … 1151 1151 int rc; 1152 1152 1153 uint32_t cbReply = sizeof( VBOXCLIPBOARDREPLY);1154 P VBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)RTMemAlloc(cbReply);1153 uint32_t cbReply = sizeof(SHCLREPLY); 1154 PSHCLREPLY pReply = (PSHCLREPLY)RTMemAlloc(cbReply); 1155 1155 if (pReply) 1156 1156 { … … 1158 1158 if (RT_SUCCESS(rc)) 1159 1159 { 1160 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload1161 = (PSH AREDCLIPBOARDEVENTPAYLOAD)RTMemAlloc(sizeof(SHAREDCLIPBOARDEVENTPAYLOAD));1160 PSHCLEVENTPAYLOAD pPayload 1161 = (PSHCLEVENTPAYLOAD)RTMemAlloc(sizeof(SHCLEVENTPAYLOAD)); 1162 1162 if (pPayload) 1163 1163 { … … 1167 1167 switch (pReply->uType) 1168 1168 { 1169 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN:1169 case VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN: 1170 1170 RT_FALL_THROUGH(); 1171 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_CLOSE:1171 case VBOX_SHCL_REPLYMSGTYPE_LIST_CLOSE: 1172 1172 RT_FALL_THROUGH(); 1173 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN:1173 case VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN: 1174 1174 RT_FALL_THROUGH(); 1175 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE:1175 case VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE: 1176 1176 { 1177 1177 uint32_t uCID; … … 1179 1179 if (RT_SUCCESS(rc)) 1180 1180 { 1181 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1181 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1182 1182 1183 1183 LogFlowFunc(("uCID=%RU32 -> uEvent=%RU32\n", uCID, uEvent)); … … 1227 1227 * @param tsArrival Timestamp of arrival. 1228 1228 */ 1229 int vboxSvcClipboardURIHandler(P VBOXCLIPBOARDCLIENT pClient,1229 int vboxSvcClipboardURIHandler(PSHCLCLIENT pClient, 1230 1230 VBOXHGCMCALLHANDLE callHandle, 1231 1231 uint32_t u32Function, … … 1262 1262 * Pre-check: For certain messages we need to make sure that a (right) transfer is present. 1263 1263 */ 1264 PSH AREDCLIPBOARDURITRANSFER pTransfer = NULL;1264 PSHCLURITRANSFER pTransfer = NULL; 1265 1265 switch (u32Function) 1266 1266 { … … 1301 1301 break; 1302 1302 1303 SH AREDCLIPBOARDURITRANSFERSTATUS uStatus = SHAREDCLIPBOARDURITRANSFERSTATUS_NONE;1303 SHCLURITRANSFERSTATUS uStatus = SHCLURITRANSFERSTATUS_NONE; 1304 1304 rc = HGCMSvcGetU32(&paParms[1], &uStatus); 1305 1305 if (RT_FAILURE(rc)) … … 1316 1316 } 1317 1317 1318 if (uStatus == SH AREDCLIPBOARDURITRANSFERSTATUS_RUNNING)1319 { 1320 const SH AREDCLIPBOARDURITRANSFERDIR enmDir = SHAREDCLIPBOARDURITRANSFERDIR_READ;1321 1322 PSH AREDCLIPBOARDURITRANSFER pTransfer;1318 if (uStatus == SHCLURITRANSFERSTATUS_RUNNING) 1319 { 1320 const SHCLURITRANSFERDIR enmDir = SHCLURITRANSFERDIR_READ; 1321 1322 PSHCLURITRANSFER pTransfer; 1323 1323 rc = SharedClipboardURITransferCreate(enmDir, 1324 SH AREDCLIPBOARDSOURCE_REMOTE, &pTransfer);1324 SHCLSOURCE_REMOTE, &pTransfer); 1325 1325 if (RT_SUCCESS(rc)) 1326 1326 { … … 1328 1328 if (RT_SUCCESS(rc)) 1329 1329 { 1330 SH AREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;1330 SHCLPROVIDERCREATIONCTX creationCtx; 1331 1331 RT_ZERO(creationCtx); 1332 1332 … … 1340 1340 creationCtx.Interface.pfnObjClose = vboxSvcClipboardURIObjClose; 1341 1341 1342 if (enmDir == SH AREDCLIPBOARDURITRANSFERDIR_READ)1342 if (enmDir == SHCLURITRANSFERDIR_READ) 1343 1343 { 1344 1344 creationCtx.Interface.pfnGetRoots = vboxSvcClipboardURIGetRoots; … … 1355 1355 1356 1356 /* Register needed callbacks so that we can wait for the meta data to arrive here. */ 1357 SH AREDCLIPBOARDURITRANSFERCALLBACKS Callbacks;1357 SHCLURITRANSFERCALLBACKS Callbacks; 1358 1358 RT_ZERO(Callbacks); 1359 1359 … … 1409 1409 case VBOX_SHARED_CLIPBOARD_GUEST_FN_ROOT_LIST_HDR_WRITE: 1410 1410 { 1411 VBOXCLIPBOARDROOTLISTHDR lstHdr;1411 SHCLROOTLISTHDR lstHdr; 1412 1412 rc = vboxSvcClipboardURIGetRootListHdr(cParms, paParms, &lstHdr); 1413 1413 if (RT_SUCCESS(rc)) 1414 1414 { 1415 1415 void *pvData = SharedClipboardURIRootListHdrDup(&lstHdr); 1416 uint32_t cbData = sizeof( VBOXCLIPBOARDROOTLISTHDR);1416 uint32_t cbData = sizeof(SHCLROOTLISTHDR); 1417 1417 1418 1418 uint32_t uCID; … … 1420 1420 if (RT_SUCCESS(rc)) 1421 1421 { 1422 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1423 1424 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;1422 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1423 1424 PSHCLEVENTPAYLOAD pPayload; 1425 1425 rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload); 1426 1426 if (RT_SUCCESS(rc)) … … 1438 1438 { 1439 1439 #if 0 1440 VBOXCLIPBOARDROOTLISTENTRY lstEntry;1440 SHCLROOTLISTENTRY lstEntry; 1441 1441 rc = VBoxSvcClipboardURIGetRootListEntry(cParms, paParms, &lstEntry); 1442 1442 if (RT_SUCCESS(rc)) 1443 1443 { 1444 1444 void *pvData = SharedClipboardURIRootListEntryDup(&lstEntry); 1445 uint32_t cbData = sizeof( VBOXCLIPBOARDROOTLISTENTRY);1446 1447 PSH AREDCLIPBOARDURITRANSFERPAYLOAD pPayload;1448 rc = SharedClipboardURITransferPayloadAlloc(SH AREDCLIPBOARDURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,1445 uint32_t cbData = sizeof(SHCLROOTLISTENTRY); 1446 1447 PSHCLURITRANSFERPAYLOAD pPayload; 1448 rc = SharedClipboardURITransferPayloadAlloc(SHCLURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ, 1449 1449 pvData, cbData, &pPayload); 1450 1450 if (RT_SUCCESS(rc)) 1451 rc = SharedClipboardURITransferEventSignal(pTransfer, SH AREDCLIPBOARDURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,1451 rc = SharedClipboardURITransferEventSignal(pTransfer, SHCLURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ, 1452 1452 pPayload); 1453 1453 } … … 1458 1458 case VBOX_SHARED_CLIPBOARD_GUEST_FN_ROOT_LIST_ENTRY_WRITE: 1459 1459 { 1460 VBOXCLIPBOARDROOTLISTENTRY lstEntry;1460 SHCLROOTLISTENTRY lstEntry; 1461 1461 rc = vboxSvcClipboardURIGetRootListEntry(cParms, paParms, &lstEntry); 1462 1462 if (RT_SUCCESS(rc)) 1463 1463 { 1464 1464 void *pvData = SharedClipboardURIRootListEntryDup(&lstEntry); 1465 uint32_t cbData = sizeof( VBOXCLIPBOARDROOTLISTENTRY);1465 uint32_t cbData = sizeof(SHCLROOTLISTENTRY); 1466 1466 1467 1467 uint32_t uCID; … … 1469 1469 if (RT_SUCCESS(rc)) 1470 1470 { 1471 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1472 1473 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;1471 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1472 1473 PSHCLEVENTPAYLOAD pPayload; 1474 1474 rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload); 1475 1475 if (RT_SUCCESS(rc)) … … 1486 1486 case VBOX_SHARED_CLIPBOARD_GUEST_FN_LIST_OPEN: 1487 1487 { 1488 VBOXCLIPBOARDLISTOPENPARMS listOpenParms;1488 SHCLLISTOPENPARMS listOpenParms; 1489 1489 rc = vboxSvcClipboardURIGetListOpen(cParms, paParms, &listOpenParms); 1490 1490 if (RT_SUCCESS(rc)) 1491 1491 { 1492 SH AREDCLIPBOARDLISTHANDLE hList;1492 SHCLLISTHANDLE hList; 1493 1493 rc = SharedClipboardURITransferListOpen(pTransfer, &listOpenParms, &hList); 1494 1494 if (RT_SUCCESS(rc)) … … 1506 1506 break; 1507 1507 1508 SH AREDCLIPBOARDLISTHANDLE hList;1508 SHCLLISTHANDLE hList; 1509 1509 rc = HGCMSvcGetU64(&paParms[1], &hList); 1510 1510 if (RT_SUCCESS(rc)) … … 1520 1520 break; 1521 1521 1522 SH AREDCLIPBOARDLISTHANDLE hList;1522 SHCLLISTHANDLE hList; 1523 1523 rc = HGCMSvcGetU64(&paParms[1], &hList); /* Get list handle. */ 1524 1524 if (RT_SUCCESS(rc)) 1525 1525 { 1526 VBOXCLIPBOARDLISTHDR hdrList;1526 SHCLLISTHDR hdrList; 1527 1527 rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList); 1528 1528 /*if (RT_SUCCESS(rc)) … … 1534 1534 case VBOX_SHARED_CLIPBOARD_GUEST_FN_LIST_HDR_WRITE: 1535 1535 { 1536 VBOXCLIPBOARDLISTHDR hdrList;1536 SHCLLISTHDR hdrList; 1537 1537 rc = SharedClipboardURIListHdrInit(&hdrList); 1538 1538 if (RT_SUCCESS(rc)) 1539 1539 { 1540 SH AREDCLIPBOARDLISTHANDLE hList;1540 SHCLLISTHANDLE hList; 1541 1541 rc = vboxSvcClipboardURIGetListHdr(cParms, paParms, &hList, &hdrList); 1542 1542 if (RT_SUCCESS(rc)) 1543 1543 { 1544 1544 void *pvData = SharedClipboardURIListHdrDup(&hdrList); 1545 uint32_t cbData = sizeof( VBOXCLIPBOARDLISTHDR);1545 uint32_t cbData = sizeof(SHCLLISTHDR); 1546 1546 1547 1547 uint32_t uCID; … … 1549 1549 if (RT_SUCCESS(rc)) 1550 1550 { 1551 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1552 1553 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;1551 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1552 1553 PSHCLEVENTPAYLOAD pPayload; 1554 1554 rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload); 1555 1555 if (RT_SUCCESS(rc)) … … 1570 1570 break; 1571 1571 1572 SH AREDCLIPBOARDLISTHANDLE hList;1572 SHCLLISTHANDLE hList; 1573 1573 rc = HGCMSvcGetU64(&paParms[1], &hList); /* Get list handle. */ 1574 1574 if (RT_SUCCESS(rc)) 1575 1575 { 1576 VBOXCLIPBOARDLISTENTRY entryList;1576 SHCLLISTENTRY entryList; 1577 1577 rc = SharedClipboardURITransferListRead(pTransfer, hList, &entryList); 1578 1578 } … … 1582 1582 case VBOX_SHARED_CLIPBOARD_GUEST_FN_LIST_ENTRY_WRITE: 1583 1583 { 1584 VBOXCLIPBOARDLISTENTRY entryList;1584 SHCLLISTENTRY entryList; 1585 1585 rc = SharedClipboardURIListEntryInit(&entryList); 1586 1586 if (RT_SUCCESS(rc)) 1587 1587 { 1588 SH AREDCLIPBOARDLISTHANDLE hList;1588 SHCLLISTHANDLE hList; 1589 1589 rc = vboxSvcClipboardURIGetListEntry(cParms, paParms, &hList, &entryList); 1590 1590 if (RT_SUCCESS(rc)) 1591 1591 { 1592 1592 void *pvData = SharedClipboardURIListEntryDup(&entryList); 1593 uint32_t cbData = sizeof( VBOXCLIPBOARDLISTENTRY);1593 uint32_t cbData = sizeof(SHCLLISTENTRY); 1594 1594 1595 1595 uint32_t uCID; … … 1597 1597 if (RT_SUCCESS(rc)) 1598 1598 { 1599 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1600 1601 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;1599 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1600 1601 PSHCLEVENTPAYLOAD pPayload; 1602 1602 rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload); 1603 1603 if (RT_SUCCESS(rc)) … … 1632 1632 case VBOX_SHARED_CLIPBOARD_GUEST_FN_OBJ_WRITE: 1633 1633 { 1634 VBOXCLIPBOARDOBJDATACHUNK dataChunk;1634 SHCLOBJDATACHUNK dataChunk; 1635 1635 rc = vboxSvcClipboardURIGetObjDataChunk(cParms, paParms, &dataChunk); 1636 1636 if (RT_SUCCESS(rc)) 1637 1637 { 1638 1638 void *pvData = SharedClipboardURIObjectDataChunkDup(&dataChunk); 1639 uint32_t cbData = sizeof( VBOXCLIPBOARDOBJDATACHUNK);1639 uint32_t cbData = sizeof(SHCLOBJDATACHUNK); 1640 1640 1641 1641 uint32_t uCID; … … 1643 1643 if (RT_SUCCESS(rc)) 1644 1644 { 1645 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1646 1647 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;1645 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1646 1647 PSHCLEVENTPAYLOAD pPayload; 1648 1648 rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload); 1649 1649 if (RT_SUCCESS(rc)) … … 1664 1664 LogFlowFunc(("VBOX_SHARED_CLIPBOARD_GUEST_FN_WRITE_DIR\n")); 1665 1665 1666 VBOXCLIPBOARDDIRDATA dirData;1666 SHCLDIRDATA dirData; 1667 1667 rc = VBoxSvcClipboardURIGetDir(cParms, paParms, &dirData); 1668 1668 if (RT_SUCCESS(rc)) … … 1680 1680 if (RT_SUCCESS(rc)) 1681 1681 { 1682 SH AREDCLIPBOARDAREAOBJ Obj = { SHAREDCLIPBOARDAREAOBJTYPE_DIR, SHAREDCLIPBOARDAREAOBJSTATE_COMPLETE };1682 SHCLAREAOBJ Obj = { SHCLAREAOBJTYPE_DIR, SHCLAREAOBJSTATE_COMPLETE }; 1683 1683 int rc2 = pArea->AddObject(pszDir, Obj); 1684 1684 AssertRC(rc2); … … 1697 1697 LogFlowFunc(("VBOX_SHARED_CLIPBOARD_GUEST_FN_READ_FILE_HDR\n")); 1698 1698 1699 VBOXCLIPBOARDFILEHDR fileHdr;1699 SHCLFILEHDR fileHdr; 1700 1700 rc = VBoxSvcClipboardURISetFileHdr(cParms, paParms, &fileHdr); 1701 1701 break; … … 1722 1722 break; 1723 1723 1724 VBOXCLIPBOARDFILEHDR fileHdr;1724 SHCLFILEHDR fileHdr; 1725 1725 rc = VBoxSvcClipboardURIGetFileHdr(cParms, paParms, &fileHdr); 1726 1726 if (RT_SUCCESS(rc)) … … 1738 1738 if (RT_SUCCESS(rc)) 1739 1739 { 1740 PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer);1740 PSHCLCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer); 1741 1741 AssertPtrBreakStmt(pObjCtx, VERR_INVALID_POINTER); 1742 1742 … … 1767 1767 } 1768 1768 1769 SH AREDCLIPBOARDAREAOBJ Obj = { SHAREDCLIPBOARDAREAOBJTYPE_FILE, SHAREDCLIPBOARDAREAOBJSTATE_NONE };1769 SHCLAREAOBJ Obj = { SHCLAREAOBJTYPE_FILE, SHCLAREAOBJSTATE_NONE }; 1770 1770 int rc2 = pArea->AddObject(pszPathAbs, Obj); 1771 1771 AssertRC(rc2); … … 1783 1783 LogFlowFunc(("VBOX_SHARED_CLIPBOARD_FN_READ_FILE_DATA\n")); 1784 1784 1785 VBOXCLIPBOARDFILEDATA fileData;1785 SHCLFILEDATA fileData; 1786 1786 rc = VBoxSvcClipboardURISetFileData(cParms, paParms, &fileData); 1787 1787 break; … … 1798 1798 } 1799 1799 1800 VBOXCLIPBOARDFILEDATA fileData;1800 SHCLFILEDATA fileData; 1801 1801 rc = VBoxSvcClipboardURIGetFileData(cParms, paParms, &fileData); 1802 1802 if (RT_SUCCESS(rc)) 1803 1803 { 1804 PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer);1804 PSHCLCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer); 1805 1805 AssertPtrBreakStmt(pObjCtx, VERR_INVALID_POINTER); 1806 1806 … … 1901 1901 * @param pTransfer URI transfer to register a clipboard area for. 1902 1902 */ 1903 int vboxSvcClipboardURIAreaRegister(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer)1903 int vboxSvcClipboardURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer) 1904 1904 { 1905 1905 RT_NOREF(pClientState); … … 1918 1918 if (g_ExtState.pfnExtension) 1919 1919 { 1920 VBOXCLIPBOARDEXTAREAPARMS parms;1920 SHCLEXTAREAPARMS parms; 1921 1921 RT_ZERO(parms); 1922 1922 1923 parms.uID = NIL_SH AREDCLIPBOARDAREAID;1923 parms.uID = NIL_SHCLAREAID; 1924 1924 1925 1925 /* As the meta data is now complete, register a new clipboard on the host side. */ … … 1927 1927 if (RT_SUCCESS(rc)) 1928 1928 { 1929 /* Note: Do *not* specify SH AREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST as flags here, as VBoxSVC took care of the1929 /* Note: Do *not* specify SHCLAREA_OPEN_FLAGS_MUST_NOT_EXIST as flags here, as VBoxSVC took care of the 1930 1930 * clipboard area creation already. */ 1931 1931 rc = pTransfer->pArea->OpenTemp(parms.uID /* Area ID */, 1932 SH AREDCLIPBOARDAREA_OPEN_FLAGS_NONE);1932 SHCLAREA_OPEN_FLAGS_NONE); 1933 1933 } 1934 1934 … … 1950 1950 * @param pTransfer URI transfer to unregister a clipboard area from. 1951 1951 */ 1952 int vboxSvcClipboardURIAreaUnregister(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer)1952 int vboxSvcClipboardURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer) 1953 1953 { 1954 1954 RT_NOREF(pClientState); … … 1963 1963 if (g_ExtState.pfnExtension) 1964 1964 { 1965 VBOXCLIPBOARDEXTAREAPARMS parms;1965 SHCLEXTAREAPARMS parms; 1966 1966 RT_ZERO(parms); 1967 1967 … … 1998 1998 * @param uID ID of clipboard area to to attach to. Specify 0 to attach to the most recent one. 1999 1999 */ 2000 int vboxSvcClipboardURIAreaAttach(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer,2001 SH AREDCLIPBOARDAREAID uID)2000 int vboxSvcClipboardURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer, 2001 SHCLAREAID uID) 2002 2002 { 2003 2003 RT_NOREF(pClientState); … … 2016 2016 if (g_ExtState.pfnExtension) 2017 2017 { 2018 VBOXCLIPBOARDEXTAREAPARMS parms;2018 SHCLEXTAREAPARMS parms; 2019 2019 RT_ZERO(parms); 2020 2020 … … 2046 2046 * @param pTransfer URI transfer to detach a clipboard area from. 2047 2047 */ 2048 int vboxSvcClipboardURIAreaDetach(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer)2048 int vboxSvcClipboardURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer) 2049 2049 { 2050 2050 RT_NOREF(pClientState); … … 2061 2061 if (g_ExtState.pfnExtension) 2062 2062 { 2063 VBOXCLIPBOARDEXTAREAPARMS parms;2063 SHCLEXTAREAPARMS parms; 2064 2064 RT_ZERO(parms); 2065 2065 parms.uID = uAreaID; -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.h
r79497 r80662 22 22 #endif 23 23 24 int vboxSvcClipboardURIHandler(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival);24 int vboxSvcClipboardURIHandler(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival); 25 25 int vboxSvcClipboardURIHostHandler(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 26 26 27 int vboxSvcClipboardURIAreaRegister(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer);28 int vboxSvcClipboardURIAreaUnregister(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer);29 int vboxSvcClipboardURIAreaAttach(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDAREAID uID);30 int vboxSvcClipboardURIAreaDetach(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer);27 int vboxSvcClipboardURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer); 28 int vboxSvcClipboardURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer); 29 int vboxSvcClipboardURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer, SHCLAREAID uID); 30 int vboxSvcClipboardURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer); 31 31 32 32 #endif /* !VBOX_INCLUDED_SRC_SharedClipboard_VBoxSharedClipboardSvc_uri_h */ -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-utils.cpp
r80444 r80662 93 93 94 94 #if 0 95 int vboxSvcClipboardURIReportMsg(P VBOXCLIPBOARDCLIENT pClient, uint32_t uMsg, uint32_t uParm)95 int vboxSvcClipboardURIReportMsg(PSHCLCLIENT pClient, uint32_t uMsg, uint32_t uParm) 96 96 { 97 97 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 115 115 116 116 pClient->State.URI.fTransferStart = true; 117 pClient->State.URI.enmTransferDir = (SH AREDCLIPBOARDURITRANSFERDIR)uParm;117 pClient->State.URI.enmTransferDir = (SHCLURITRANSFERDIR)uParm; 118 118 break; 119 119 … … 130 130 } 131 131 132 bool vboxSvcClipboardURIReturnMsg(P VBOXCLIPBOARDCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])132 bool vboxSvcClipboardURIReturnMsg(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 133 133 { 134 134 RT_NOREF(pClient, cParms, paParms); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp
r80623 r80662 53 53 * Internal Functions * 54 54 *********************************************************************************************************************************/ 55 static int vboxClipboardSvcWinSyncInternal(P VBOXCLIPBOARDCONTEXT pCtx);56 57 struct _ VBOXCLIPBOARDCONTEXT55 static int vboxClipboardSvcWinSyncInternal(PSHCLCONTEXT pCtx); 56 57 struct _SHCLCONTEXT 58 58 { 59 59 /** Handle for window message handling thread. */ 60 60 RTTHREAD hThread; 61 61 /** Structure for keeping and communicating with service client. */ 62 P VBOXCLIPBOARDCLIENT pClient;62 PSHCLCLIENT pClient; 63 63 /** Windows-specific context data. */ 64 VBOXCLIPBOARDWINCTX Win;64 SHCLWINCTX Win; 65 65 }; 66 66 … … 114 114 } 115 115 116 static int vboxClipboardSvcWinDataSet(P VBOXCLIPBOARDCONTEXT pCtx, UINT cfFormat, void *pvData, uint32_t cbData)116 static int vboxClipboardSvcWinDataSet(PSHCLCONTEXT pCtx, UINT cfFormat, void *pvData, uint32_t cbData) 117 117 { 118 118 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 167 167 } 168 168 169 static int vboxClipboardSvcWinDataRead(P VBOXCLIPBOARDCONTEXT pCtx, UINT cfFormat,169 static int vboxClipboardSvcWinDataRead(PSHCLCONTEXT pCtx, UINT cfFormat, 170 170 void **ppvData, uint32_t *pcbData) 171 171 { 172 172 LogFlowFunc(("cfFormat=%u\n", cfFormat)); 173 173 174 SH AREDCLIPBOARDDATAREQ dataReq;174 SHCLDATAREQ dataReq; 175 175 RT_ZERO(dataReq); 176 176 … … 178 178 dataReq.cbSize = _64K; /** @todo Make this more dynamic. */ 179 179 180 VBOXCLIPBOARDEVENTID uEvent = 0;180 SHCLEVENTID uEvent = 0; 181 181 int rc = vboxSvcClipboardDataReadRequest(pCtx->pClient, &dataReq, &uEvent); 182 182 if (RT_SUCCESS(rc)) 183 183 { 184 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;184 PSHCLEVENTPAYLOAD pPayload; 185 185 rc = SharedClipboardEventWait(&pCtx->pClient->Events, uEvent, 30 * 1000, &pPayload); 186 186 if (RT_SUCCESS(rc)) … … 200 200 } 201 201 202 static LRESULT CALLBACK vboxClipboardSvcWinWndProcMain(P VBOXCLIPBOARDCONTEXT pCtx,202 static LRESULT CALLBACK vboxClipboardSvcWinWndProcMain(PSHCLCONTEXT pCtx, 203 203 HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 204 204 { … … 207 207 LRESULT lresultRc = 0; 208 208 209 const P VBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;209 const PSHCLWINCTX pWinCtx = &pCtx->Win; 210 210 211 211 switch (uMsg) … … 222 222 int rc = vboxClipboardSvcWinSyncInternal(pCtx); 223 223 if (RT_SUCCESS(rc)) 224 vboxSvcClipboardSetSource(pCtx->pClient, SH AREDCLIPBOARDSOURCE_LOCAL);224 vboxSvcClipboardSetSource(pCtx->pClient, SHCLSOURCE_LOCAL); 225 225 } 226 226 … … 244 244 int rc = vboxClipboardSvcWinSyncInternal(pCtx); 245 245 if (RT_SUCCESS(rc)) 246 vboxSvcClipboardSetSource(pCtx->pClient, SH AREDCLIPBOARDSOURCE_LOCAL);246 vboxSvcClipboardSetSource(pCtx->pClient, SHCLSOURCE_LOCAL); 247 247 } 248 248 … … 266 266 const UINT cfFormat = (UINT)wParam; 267 267 268 const VBOXCLIPBOARDFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat);268 const SHCLFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat); 269 269 270 270 LogFunc(("WM_RENDERFORMAT: cfFormat=%u -> fFormat=0x%x\n", cfFormat, fFormat)); … … 314 314 315 315 /* Announce available formats. Do not insert data -- will be inserted in WM_RENDERFORMAT. */ 316 VBOXCLIPBOARDFORMATS fFormats = (uint32_t)lParam;316 SHCLFORMATS fFormats = (uint32_t)lParam; 317 317 if (fFormats != VBOX_SHARED_CLIPBOARD_FMT_NONE) /* Could arrive with some older GA versions. */ 318 318 { … … 361 361 AssertPtrReturn(pUserData, 0); 362 362 363 P VBOXCLIPBOARDCONTEXT pCtx = reinterpret_cast<PVBOXCLIPBOARDCONTEXT>(pUserData);363 PSHCLCONTEXT pCtx = reinterpret_cast<PSHCLCONTEXT>(pUserData); 364 364 if (pCtx) 365 365 return vboxClipboardSvcWinWndProcMain(pCtx, hWnd, uMsg, wParam, lParam); … … 398 398 bool fThreadSignalled = false; 399 399 400 const P VBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)pvUser;400 const PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pvUser; 401 401 AssertPtr(pCtx); 402 const P VBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;402 const PSHCLWINCTX pWinCtx = &pCtx->Win; 403 403 404 404 HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL); … … 517 517 * @param pCtx Clipboard context to synchronize. 518 518 */ 519 static int vboxClipboardSvcWinSyncInternal(P VBOXCLIPBOARDCONTEXT pCtx)519 static int vboxClipboardSvcWinSyncInternal(PSHCLCONTEXT pCtx) 520 520 { 521 521 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 527 527 if (pCtx->pClient) 528 528 { 529 SH AREDCLIPBOARDFORMATDATA Formats;529 SHCLFORMATDATA Formats; 530 530 RT_ZERO(Formats); 531 531 … … 559 559 } 560 560 561 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT pClient, bool fHeadless)561 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 562 562 { 563 563 RT_NOREF(fHeadless); … … 567 567 int rc; 568 568 569 P VBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)RTMemAllocZ(sizeof(VBOXCLIPBOARDCONTEXT));569 PSHCLCONTEXT pCtx = (PSHCLCONTEXT)RTMemAllocZ(sizeof(SHCLCONTEXT)); 570 570 if (pCtx) 571 571 { … … 596 596 } 597 597 598 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT pClient)598 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient) 599 599 { 600 600 /* Sync the host clipboard content with the client. */ … … 602 602 } 603 603 604 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT pClient)604 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 605 605 { 606 606 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 610 610 int rc = VINF_SUCCESS; 611 611 612 P VBOXCLIPBOARDCONTEXT pCtx = pClient->State.pCtx;612 PSHCLCONTEXT pCtx = pClient->State.pCtx; 613 613 if (pCtx) 614 614 { … … 641 641 } 642 642 643 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,644 PSH AREDCLIPBOARDFORMATDATA pFormats)643 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 644 PSHCLFORMATDATA pFormats) 645 645 { 646 646 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 649 649 int rc; 650 650 651 P VBOXCLIPBOARDCONTEXT pCtx = pClient->State.pCtx;651 PSHCLCONTEXT pCtx = pClient->State.pCtx; 652 652 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); 653 653 … … 657 657 if (pFormats->uFormats & VBOX_SHARED_CLIPBOARD_FMT_URI_LIST) 658 658 { 659 PSH AREDCLIPBOARDURITRANSFER pTransfer;659 PSHCLURITRANSFER pTransfer; 660 660 rc = vboxSvcClipboardURITransferStart(pClient, 661 SH AREDCLIPBOARDURITRANSFERDIR_READ, SHAREDCLIPBOARDSOURCE_REMOTE,661 SHCLURITRANSFERDIR_READ, SHCLSOURCE_REMOTE, 662 662 &pTransfer); 663 663 if (RT_SUCCESS(rc)) … … 691 691 } 692 692 693 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,694 PSH AREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)693 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 694 PSHCLDATABLOCK pData, uint32_t *pcbActual) 695 695 { 696 696 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 702 702 HANDLE hClip = NULL; 703 703 704 const P VBOXCLIPBOARDWINCTX pWinCtx = &pClient->State.pCtx->Win;704 const PSHCLWINCTX pWinCtx = &pClient->State.pCtx->Win; 705 705 706 706 /* … … 802 802 } 803 803 804 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,805 PSH AREDCLIPBOARDDATABLOCK pData)804 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 805 PSHCLDATABLOCK pData) 806 806 { 807 807 LogFlowFuncEnter(); … … 814 814 815 815 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 816 int VBoxClipboardSvcImplURITransferCreate(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)816 int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 817 817 { 818 818 RT_NOREF(pClient, pTransfer); … … 823 823 } 824 824 825 int VBoxClipboardSvcImplURITransferDestroy(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)825 int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 826 826 { 827 827 LogFlowFuncEnter(); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp
r80623 r80662 58 58 * @param fHeadless Whether headless. 59 59 */ 60 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT pClient, bool fHeadless)60 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 61 61 { 62 62 RT_NOREF(pClient, fHeadless); … … 69 69 * after a save and restore of the guest. 70 70 */ 71 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT pClient)71 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient) 72 72 { 73 73 RT_NOREF(pClient); … … 81 81 * @param pClient Structure containing context information about the guest system 82 82 */ 83 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT pClient)83 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 84 84 { 85 85 RT_NOREF(pClient); … … 95 95 * @param pFormats Clipboard formats the guest is offering. 96 96 */ 97 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,98 PSH AREDCLIPBOARDFORMATDATA pFormats)97 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 98 PSHCLFORMATDATA pFormats) 99 99 { 100 100 RT_NOREF(pClient, pCmdCtx, pFormats); … … 110 110 * @param pcbActual Where to store the actual amount of data available. 111 111 */ 112 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,113 PSH AREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)112 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 113 PSHCLDATABLOCK pData, uint32_t *pcbActual) 114 114 { 115 115 RT_NOREF(pClient, pCmdCtx, pData); … … 121 121 } 122 122 123 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,124 PSH AREDCLIPBOARDDATABLOCK pData)123 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 124 PSHCLDATABLOCK pData) 125 125 { 126 126 RT_NOREF(pClient, pCmdCtx, pData); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r80623 r80662 42 42 * Global context information used by the host glue for the X11 clipboard backend. 43 43 */ 44 struct _ VBOXCLIPBOARDCONTEXT44 struct _SHCLCONTEXT 45 45 { 46 46 /** This mutex is grabbed during any critical operations on the clipboard … … 50 50 CLIPBACKEND *pBackend; 51 51 /** Pointer to the VBox host client data structure. */ 52 P VBOXCLIPBOARDCLIENT pClient;52 PSHCLCLIENT pClient; 53 53 /** We set this when we start shutting down as a hint not to post any new 54 54 * requests. */ … … 63 63 * @note Host glue code 64 64 */ 65 void ClipReportX11Formats( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)65 void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats) 66 66 { 67 67 LogFlowFunc(("pCtx=%p, u32Formats=%02X\n", pCtx, u32Formats)); 68 68 69 SH AREDCLIPBOARDFORMATDATA formatData;69 SHCLFORMATDATA formatData; 70 70 RT_ZERO(formatData); 71 71 … … 100 100 * the clipboard and leave ownership to X11. 101 101 */ 102 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT pClient, bool fHeadless)102 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 103 103 { 104 104 int rc = VINF_SUCCESS; 105 105 106 P VBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)RTMemAllocZ(sizeof(VBOXCLIPBOARDCONTEXT));106 PSHCLCONTEXT pCtx = (PSHCLCONTEXT)RTMemAllocZ(sizeof(SHCLCONTEXT)); 107 107 if (pCtx) 108 108 { … … 142 142 * @note Host glue code 143 143 */ 144 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT pClient)144 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient) 145 145 { 146 146 LogFlowFuncEnter(); … … 149 149 * there is data in the host clipboard it will automatically be sent to 150 150 * the guest when the clipboard starts up. */ 151 SH AREDCLIPBOARDFORMATDATA formatData;151 SHCLFORMATDATA formatData; 152 152 RT_ZERO(formatData); 153 153 … … 161 161 * @note Host glue code 162 162 */ 163 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT pClient)163 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 164 164 { 165 165 LogFlowFuncEnter(); 166 166 167 P VBOXCLIPBOARDCONTEXT pCtx = pClient->State.pCtx;167 PSHCLCONTEXT pCtx = pClient->State.pCtx; 168 168 169 169 /* Drop the reference to the client, in case it is still there. This … … 173 173 174 174 /* If there is a currently pending request, release it immediately. */ 175 SH AREDCLIPBOARDDATABLOCK dataBlock = { 0, NULL, 0 };175 SHCLDATABLOCK dataBlock = { 0, NULL, 0 }; 176 176 VBoxClipboardSvcImplWriteData(pClient, NULL, &dataBlock); 177 177 … … 199 199 * @param pFormats Clipboard formats the guest is offering. 200 200 */ 201 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,202 PSH AREDCLIPBOARDFORMATDATA pFormats)201 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 202 PSHCLFORMATDATA pFormats) 203 203 { 204 204 RT_NOREF(pCmdCtx); … … 224 224 uint32_t *pcbActual; 225 225 /** The request's event ID. */ 226 VBOXCLIPBOARDEVENTID uEvent;226 SHCLEVENTID uEvent; 227 227 }; 228 228 … … 245 245 * 246 246 */ 247 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT pClient,248 P VBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)247 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, 248 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual) 249 249 { 250 250 RT_NOREF(pCmdCtx); … … 258 258 if (pReq) 259 259 { 260 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);260 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events); 261 261 262 262 pReq->pv = pData->pvData; … … 271 271 if (RT_SUCCESS(rc)) 272 272 { 273 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;273 PSHCLEVENTPAYLOAD pPayload; 274 274 rc = SharedClipboardEventWait(&pClient->Events, uEvent, 30 * 1000, &pPayload); 275 275 if (RT_SUCCESS(rc)) … … 299 299 * @param pData Data block to write to clipboard. 300 300 */ 301 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT pClient,302 P VBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData)301 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, 302 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData) 303 303 { 304 304 LogFlowFunc(("pClient=%p, pv=%p, cb=%RU32, uFormat=%02X\n", … … 323 323 * @todo Change this to deal with the buffer issues rather than offloading them onto the caller. 324 324 */ 325 void ClipRequestFromX11CompleteCallback( VBOXCLIPBOARDCONTEXT *pCtx, int rc,325 void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, 326 326 CLIPREADCBREQ *pReq, void *pv, uint32_t cb) 327 327 { 328 328 AssertMsgRC(rc, ("Clipboard data completion from X11 failed with %Rrc\n", rc)); 329 329 330 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;330 PSHCLEVENTPAYLOAD pPayload; 331 331 int rc2 = SharedClipboardPayloadAlloc(pReq->uEvent, pv, cb, &pPayload); 332 332 if (RT_SUCCESS(rc2)) … … 349 349 * @note Host glue code. 350 350 */ 351 int ClipRequestDataForX11( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)351 int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb) 352 352 { 353 353 LogFlowFunc(("pCtx=%p, u32Format=%02X, ppv=%p\n", pCtx, u32Format, ppv)); … … 361 361 362 362 /* Request data from the guest. */ 363 SH AREDCLIPBOARDDATAREQ dataReq;363 SHCLDATAREQ dataReq; 364 364 RT_ZERO(dataReq); 365 365 … … 367 367 dataReq.cbSize = _64K; /** @todo Make this more dynamic. */ 368 368 369 VBOXCLIPBOARDEVENTID uEvent;369 SHCLEVENTID uEvent; 370 370 int rc = vboxSvcClipboardDataReadRequest(pCtx->pClient, &dataReq, &uEvent); 371 371 if (RT_SUCCESS(rc)) 372 372 { 373 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;373 PSHCLEVENTPAYLOAD pPayload; 374 374 rc = SharedClipboardEventWait(&pCtx->pClient->Events, uEvent, 30 * 1000, &pPayload); 375 375 if (RT_SUCCESS(rc)) … … 390 390 391 391 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 392 int VBoxClipboardSvcImplURITransferCreate(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)392 int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 393 393 { 394 394 RT_NOREF(pClient, pTransfer); … … 396 396 } 397 397 398 int VBoxClipboardSvcImplURITransferDestroy(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)398 int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 399 399 { 400 400 RT_NOREF(pClient, pTransfer); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r80640 r80662 224 224 * Prototypes * 225 225 *********************************************************************************************************************************/ 226 static int vboxSvcClipboardClientStateInit(P VBOXCLIPBOARDCLIENTSTATE pClientState, uint32_t uClientID);227 static int vboxSvcClipboardClientStateDestroy(P VBOXCLIPBOARDCLIENTSTATE pClientState);228 static void vboxSvcClipboardClientStateReset(P VBOXCLIPBOARDCLIENTSTATE pClientState);226 static int vboxSvcClipboardClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID); 227 static int vboxSvcClipboardClientStateDestroy(PSHCLCLIENTSTATE pClientState); 228 static void vboxSvcClipboardClientStateReset(PSHCLCLIENTSTATE pClientState); 229 229 230 230 … … 241 241 242 242 /** Holds the service extension state. */ 243 VBOXCLIPBOARDEXTSTATE g_ExtState = { 0 };243 SHCLEXTSTATE g_ExtState = { 0 }; 244 244 245 245 /** Global map of all connected clients. */ … … 260 260 * @param puID Where to store the created event source ID on success. 261 261 */ 262 int vboxSvcClipboardEventSourceCreateID(P VBOXCLIPBOARDEVENTSOURCEID puID)262 int vboxSvcClipboardEventSourceCreateID(PSHCLEVENTSOURCEID puID) 263 263 { 264 264 AssertPtrReturn(puID, VERR_INVALID_POINTER); … … 266 266 for (uint32_t i = 0; i < 32; i++) /* Don't try too hard. */ 267 267 { 268 VBOXCLIPBOARDEVENTSOURCEID uID = RTRandU32() % VBOX_SHARED_CLIPBOARD_MAX_EVENT_SOURCES;268 SHCLEVENTSOURCEID uID = RTRandU32() % VBOX_SHARED_CLIPBOARD_MAX_EVENT_SOURCES; 269 269 if (g_mapEventSources.find(uID) == g_mapEventSources.end()) 270 270 { … … 343 343 * @param pClient Pointer to the client data structure to reset message queue for. 344 344 */ 345 void vboxSvcClipboardMsgQueueReset(P VBOXCLIPBOARDCLIENT pClient)345 void vboxSvcClipboardMsgQueueReset(PSHCLCLIENT pClient) 346 346 { 347 347 LogFlowFuncEnter(); … … 361 361 * @param cParms Number of HGCM parameters to allocate. 362 362 */ 363 P VBOXCLIPBOARDCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms)364 { 365 P VBOXCLIPBOARDCLIENTMSG pMsg = (PVBOXCLIPBOARDCLIENTMSG)RTMemAlloc(sizeof(VBOXCLIPBOARDCLIENTMSG));363 PSHCLCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms) 364 { 365 PSHCLCLIENTMSG pMsg = (PSHCLCLIENTMSG)RTMemAlloc(sizeof(SHCLCLIENTMSG)); 366 366 if (pMsg) 367 367 { … … 386 386 * The pointer will be invalid after calling this function. 387 387 */ 388 void vboxSvcClipboardMsgFree(P VBOXCLIPBOARDCLIENTMSG pMsg)388 void vboxSvcClipboardMsgFree(PSHCLCLIENTMSG pMsg) 389 389 { 390 390 if (!pMsg) … … 407 407 * @remarks ASSUMES the parameters has been cleared by clientMsgPeek. 408 408 */ 409 void vboxSvcClipboardMsgSetPeekReturn(P VBOXCLIPBOARDCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms)409 void vboxSvcClipboardMsgSetPeekReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms) 410 410 { 411 411 Assert(cDstParms >= 2); … … 437 437 * @param cDstParms The number of peek parameters (at least two). 438 438 */ 439 int vboxSvcClipboardMsgSetGetHostMsgOldReturn(P VBOXCLIPBOARDCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms)439 int vboxSvcClipboardMsgSetGetHostMsgOldReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms) 440 440 { 441 441 AssertPtrReturn(pMsg, VERR_INVALID_POINTER); … … 494 494 * @param fAppend Whether to append or prepend the message to the queue. 495 495 */ 496 int vboxSvcClipboardMsgAdd(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTMSG pMsg, bool fAppend)496 int vboxSvcClipboardMsgAdd(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg, bool fAppend) 497 497 { 498 498 AssertPtrReturn(pMsg, VERR_INVALID_POINTER); … … 527 527 * immediately. 528 528 */ 529 int vboxSvcClipboardMsgPeek(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[],529 int vboxSvcClipboardMsgPeek(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[], 530 530 bool fWait) 531 531 { … … 571 571 if (!pClient->queueMsg.isEmpty()) 572 572 { 573 P VBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();573 PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first(); 574 574 if (pFirstMsg) 575 575 { … … 616 616 * @param paParms Array of parameters. 617 617 */ 618 int vboxSvcClipboardMsgGetOld(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[])618 int vboxSvcClipboardMsgGetOld(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 619 619 { 620 620 int rc; … … 633 633 if (!pClient->queueMsg.isEmpty()) 634 634 { 635 P VBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();635 PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first(); 636 636 AssertPtr(pFirstMsg); 637 637 … … 692 692 * @param paParms Array of parameters. 693 693 */ 694 int vboxSvcClipboardMsgGet(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[])694 int vboxSvcClipboardMsgGet(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 695 695 { 696 696 /* … … 706 706 if (!pClient->queueMsg.isEmpty()) 707 707 { 708 P VBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();708 PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first(); 709 709 if (pFirstMsg) 710 710 { … … 807 807 * @param pClient Client to wake up. 808 808 */ 809 int vboxSvcClipboardClientWakeup(P VBOXCLIPBOARDCLIENT pClient)809 int vboxSvcClipboardClientWakeup(PSHCLCLIENT pClient) 810 810 { 811 811 int rc = VINF_NO_CHANGE; … … 819 819 if (!pClient->queueMsg.isEmpty()) 820 820 { 821 P VBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();821 PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first(); 822 822 if (pFirstMsg) 823 823 { … … 879 879 * @param puEvent Event ID for waiting for new data. Optional. 880 880 */ 881 int vboxSvcClipboardDataReadRequest(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDDATAREQ pDataReq,882 P VBOXCLIPBOARDEVENTID puEvent)881 int vboxSvcClipboardDataReadRequest(PSHCLCLIENT pClient, PSHCLDATAREQ pDataReq, 882 PSHCLEVENTID puEvent) 883 883 { 884 884 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 888 888 int rc; 889 889 890 P VBOXCLIPBOARDCLIENTMSG pMsgReadData = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,890 PSHCLCLIENTMSG pMsgReadData = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA, 891 891 VBOX_SHARED_CLIPBOARD_CPARMS_READ_DATA); 892 892 if (pMsgReadData) 893 893 { 894 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);894 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events); 895 895 896 896 HGCMSvcSetU32(&pMsgReadData->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pClient->Events.uID, uEvent)); … … 922 922 } 923 923 924 int vboxSvcClipboardDataReadSignal(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,925 PSH AREDCLIPBOARDDATABLOCK pData)926 { 927 VBOXCLIPBOARDEVENTID uEvent;924 int vboxSvcClipboardDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 925 PSHCLDATABLOCK pData) 926 { 927 SHCLEVENTID uEvent; 928 928 if (pClient->State.uProtocolVer == 0) 929 929 { … … 937 937 int rc = VINF_SUCCESS; 938 938 939 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload = NULL;939 PSHCLEVENTPAYLOAD pPayload = NULL; 940 940 if (pData->cbData) 941 941 rc = SharedClipboardPayloadAlloc(uEvent, pData->pvData, pData->cbData, &pPayload); … … 952 952 } 953 953 954 int vboxSvcClipboardFormatsReport(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDFORMATDATA pFormats)954 int vboxSvcClipboardFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats) 955 955 { 956 956 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 959 959 int rc; 960 960 961 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT, 3);961 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT, 3); 962 962 if (pMsg) 963 963 { 964 VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);964 SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events); 965 965 966 966 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pClient->Events.uID, uEvent)); … … 979 979 } 980 980 981 int vboxSvcClipboardGetDataWrite(P VBOXCLIPBOARDCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])981 int vboxSvcClipboardGetDataWrite(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 982 982 { 983 983 LogFlowFuncEnter(); … … 991 991 int rc; 992 992 993 SH AREDCLIPBOARDDATABLOCK dataBlock;993 SHCLDATABLOCK dataBlock; 994 994 RT_ZERO(dataBlock); 995 995 996 VBOXCLIPBOARDCLIENTCMDCTX cmdCtx;996 SHCLCLIENTCMDCTX cmdCtx; 997 997 RT_ZERO(cmdCtx); 998 998 … … 1044 1044 if (g_ExtState.pfnExtension) 1045 1045 { 1046 VBOXCLIPBOARDEXTPARMS parms;1046 SHCLEXTPARMS parms; 1047 1047 RT_ZERO(parms); 1048 1048 … … 1061 1061 } 1062 1062 1063 int vboxSvcClipboardSetSource(P VBOXCLIPBOARDCLIENT pClient, SHAREDCLIPBOARDSOURCE enmSource)1063 int vboxSvcClipboardSetSource(PSHCLCLIENT pClient, SHCLSOURCE enmSource) 1064 1064 { 1065 1065 if (!pClient) /* If no client connected (anymore), bail out. */ … … 1082 1082 1083 1083 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 1084 int vboxSvcClipboardURITransferStart(P VBOXCLIPBOARDCLIENT pClient,1085 SH AREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,1086 PSH AREDCLIPBOARDURITRANSFER *ppTransfer)1084 int vboxSvcClipboardURITransferStart(PSHCLCLIENT pClient, 1085 SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource, 1086 PSHCLURITRANSFER *ppTransfer) 1087 1087 { 1088 1088 LogFlowFuncEnter(); … … 1094 1094 if (!SharedClipboardURICtxTransfersMaximumReached(&pClient->URI)) 1095 1095 { 1096 PSH AREDCLIPBOARDURITRANSFER pTransfer;1096 PSHCLURITRANSFER pTransfer; 1097 1097 rc = SharedClipboardURITransferCreate(enmDir, enmSource, &pTransfer); 1098 1098 if (RT_SUCCESS(rc)) 1099 1099 { 1100 SH AREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;1100 SHCLPROVIDERCREATIONCTX creationCtx; 1101 1101 RT_ZERO(creationCtx); 1102 1102 1103 if (enmDir == SH AREDCLIPBOARDURITRANSFERDIR_READ)1103 if (enmDir == SHCLURITRANSFERDIR_READ) 1104 1104 { 1105 1105 rc = vboxSvcClipboardURIAreaRegister(&pClient->State, pTransfer); … … 1123 1123 } 1124 1124 } 1125 else if (enmDir == SH AREDCLIPBOARDURITRANSFERDIR_WRITE)1125 else if (enmDir == SHCLURITRANSFERDIR_WRITE) 1126 1126 { 1127 1127 AssertFailed(); /** @todo Implement this. */ … … 1129 1129 1130 1130 /* Register needed callbacks so that we can wait for the meta data to arrive here. */ 1131 SH AREDCLIPBOARDURITRANSFERCALLBACKS Callbacks;1131 SHCLURITRANSFERCALLBACKS Callbacks; 1132 1132 RT_ZERO(Callbacks); 1133 1133 … … 1210 1210 LogFunc(("u32ClientID=%RU32\n", u32ClientID)); 1211 1211 1212 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;1212 PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient; 1213 1213 AssertPtr(pClient); 1214 1214 1215 1215 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 1216 PSH AREDCLIPBOARDURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pClient->URI, 0 /* Index*/);1216 PSHCLURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pClient->URI, 0 /* Index*/); 1217 1217 if (pTransfer) 1218 1218 vboxSvcClipboardURIAreaDetach(&pClient->State, pTransfer); … … 1243 1243 RT_NOREF(fRequestor, fRestoring); 1244 1244 1245 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;1245 PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient; 1246 1246 AssertPtr(pvClient); 1247 1247 … … 1250 1250 1251 1251 /* Create the client's own event source. */ 1252 VBOXCLIPBOARDEVENTSOURCEID uEventSourceID;1252 SHCLEVENTSOURCEID uEventSourceID; 1253 1253 int rc = vboxSvcClipboardEventSourceCreateID(&uEventSourceID); 1254 1254 if (RT_SUCCESS(rc)) … … 1302 1302 int rc = VINF_SUCCESS; 1303 1303 1304 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;1304 PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient; 1305 1305 AssertPtr(pClient); 1306 1306 … … 1437 1437 else 1438 1438 { 1439 rc = vboxSvcClipboardSetSource(pClient, SH AREDCLIPBOARDSOURCE_REMOTE);1439 rc = vboxSvcClipboardSetSource(pClient, SHCLSOURCE_REMOTE); 1440 1440 if (RT_SUCCESS(rc)) 1441 1441 { 1442 1442 if (g_ExtState.pfnExtension) 1443 1443 { 1444 VBOXCLIPBOARDEXTPARMS parms;1444 SHCLEXTPARMS parms; 1445 1445 RT_ZERO(parms); 1446 1446 … … 1450 1450 } 1451 1451 1452 VBOXCLIPBOARDCLIENTCMDCTX cmdCtx;1452 SHCLCLIENTCMDCTX cmdCtx; 1453 1453 RT_ZERO(cmdCtx); 1454 1454 1455 SH AREDCLIPBOARDFORMATDATA formatData;1455 SHCLFORMATDATA formatData; 1456 1456 RT_ZERO(formatData); 1457 1457 … … 1499 1499 SharedClipboardURICtxTransfersCleanup(&pClient->URI); 1500 1500 1501 PSH AREDCLIPBOARDURITRANSFER pTransfer;1502 rc = SharedClipboardURITransferCreate(SH AREDCLIPBOARDURITRANSFERDIR_WRITE,1501 PSHCLURITRANSFER pTransfer; 1502 rc = SharedClipboardURITransferCreate(SHCLURITRANSFERDIR_WRITE, 1503 1503 pClient->State.enmSource, 1504 1504 &pTransfer); … … 1509 1509 if (RT_SUCCESS(rc)) 1510 1510 { 1511 SH AREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;1511 SHCLPROVIDERCREATIONCTX creationCtx; 1512 1512 RT_ZERO(creationCtx); 1513 1513 … … 1557 1557 if (g_ExtState.pfnExtension) 1558 1558 { 1559 VBOXCLIPBOARDEXTPARMS parms;1559 SHCLEXTPARMS parms; 1560 1560 RT_ZERO(parms); 1561 1561 … … 1577 1577 if (g_ExtState.fDelayedAnnouncement) 1578 1578 { 1579 SH AREDCLIPBOARDFORMATDATA formatData;1579 SHCLFORMATDATA formatData; 1580 1580 RT_ZERO(formatData); 1581 1581 … … 1600 1600 * so data which has been read above might get overridden by the host clipboard eventually. */ 1601 1601 1602 VBOXCLIPBOARDCLIENTCMDCTX cmdCtx;1602 SHCLCLIENTCMDCTX cmdCtx; 1603 1603 RT_ZERO(cmdCtx); 1604 1604 … … 1607 1607 if (RT_SUCCESS(rc)) 1608 1608 { 1609 SH AREDCLIPBOARDDATABLOCK dataBlock;1609 SHCLDATABLOCK dataBlock; 1610 1610 RT_ZERO(dataBlock); 1611 1611 … … 1660 1660 * @param uClientID Client ID (HGCM) to use for this client state. 1661 1661 */ 1662 static int vboxSvcClipboardClientStateInit(P VBOXCLIPBOARDCLIENTSTATE pClientState, uint32_t uClientID)1662 static int vboxSvcClipboardClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID) 1663 1663 { 1664 1664 LogFlowFuncEnter(); … … 1680 1680 * @param pClientState Client state to destroy. 1681 1681 */ 1682 static int vboxSvcClipboardClientStateDestroy(P VBOXCLIPBOARDCLIENTSTATE pClientState)1682 static int vboxSvcClipboardClientStateDestroy(PSHCLCLIENTSTATE pClientState) 1683 1683 { 1684 1684 RT_NOREF(pClientState); … … 1694 1694 * @param pClientState Client state to reset. 1695 1695 */ 1696 static void vboxSvcClipboardClientStateReset(P VBOXCLIPBOARDCLIENTSTATE pClientState)1696 static void vboxSvcClipboardClientStateReset(PSHCLCLIENTSTATE pClientState) 1697 1697 { 1698 1698 LogFlowFuncEnter(); 1699 1699 1700 1700 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 1701 pClientState->URI.enmTransferDir = SH AREDCLIPBOARDURITRANSFERDIR_UNKNOWN;1701 pClientState->URI.enmTransferDir = SHCLURITRANSFERDIR_UNKNOWN; 1702 1702 #else 1703 1703 RT_NOREF(pClientState); … … 1774 1774 #ifndef UNIT_TEST 1775 1775 /** 1776 * SSM descriptor table for the VBOXCLIPBOARDCLIENTSTATE structure.1776 * SSM descriptor table for the SHCLCLIENTSTATE structure. 1777 1777 */ 1778 1778 static SSMFIELD const s_aShClSSMClientState[] = 1779 1779 { 1780 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTSTATE, uProtocolVer),1781 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTSTATE, cbChunkSize),1782 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTSTATE, enmSource),1780 SSMFIELD_ENTRY(SHCLCLIENTSTATE, uProtocolVer), 1781 SSMFIELD_ENTRY(SHCLCLIENTSTATE, cbChunkSize), 1782 SSMFIELD_ENTRY(SHCLCLIENTSTATE, enmSource), 1783 1783 SSMFIELD_ENTRY_TERM() 1784 1784 }; 1785 1785 1786 1786 /** 1787 * SSM descriptor table for the VBOXCLIPBOARDCLIENTURISTATE structure.1787 * SSM descriptor table for the SHCLCLIENTURISTATE structure. 1788 1788 */ 1789 1789 static SSMFIELD const s_aShClSSMClientURIState[] = 1790 1790 { 1791 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTURISTATE, enmTransferDir),1791 SSMFIELD_ENTRY(SHCLCLIENTURISTATE, enmTransferDir), 1792 1792 SSMFIELD_ENTRY_TERM() 1793 1793 }; 1794 1794 1795 1795 /** 1796 * SSM descriptor table for the header of the VBOXCLIPBOARDCLIENTMSG structure.1796 * SSM descriptor table for the header of the SHCLCLIENTMSG structure. 1797 1797 * The actual message parameters will be serialized separately. 1798 1798 */ 1799 1799 static SSMFIELD const s_aShClSSMClientMsgHdr[] = 1800 1800 { 1801 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTMSG, m_uMsg),1802 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTMSG, m_cParms),1801 SSMFIELD_ENTRY(SHCLCLIENTMSG, m_uMsg), 1802 SSMFIELD_ENTRY(SHCLCLIENTMSG, m_cParms), 1803 1803 SSMFIELD_ENTRY_TERM() 1804 1804 }; … … 1827 1827 LogFunc(("u32ClientID=%RU32\n", u32ClientID)); 1828 1828 1829 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;1829 PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient; 1830 1830 AssertPtr(pClient); 1831 1831 … … 1845 1845 for (size_t i = 0; i < pClient->queueMsg.size(); i++) 1846 1846 { 1847 P VBOXCLIPBOARDCLIENTMSG pMsg = pClient->queueMsg.at(i);1847 PSHCLCLIENTMSG pMsg = pClient->queueMsg.at(i); 1848 1848 AssertPtr(pMsg); 1849 1849 1850 rc = SSMR3PutStructEx(pSSM, pMsg, sizeof( VBOXCLIPBOARDCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL);1850 rc = SSMR3PutStructEx(pSSM, pMsg, sizeof(SHCLCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL); 1851 1851 AssertRCReturn(rc, rc); 1852 1852 … … 1909 1909 LogFunc(("u32ClientID=%RU32\n", u32ClientID)); 1910 1910 1911 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;1911 PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient; 1912 1912 AssertPtr(pClient); 1913 1913 … … 1935 1935 for (uint64_t i = 0; i < cMsg; i++) 1936 1936 { 1937 P VBOXCLIPBOARDCLIENTMSG pMsg = (PVBOXCLIPBOARDCLIENTMSG)RTMemAlloc(sizeof(VBOXCLIPBOARDCLIENTMSG));1937 PSHCLCLIENTMSG pMsg = (PSHCLCLIENTMSG)RTMemAlloc(sizeof(SHCLCLIENTMSG)); 1938 1938 AssertPtrReturn(pMsg, VERR_NO_MEMORY); 1939 1939 1940 rc = SSMR3GetStructEx(pSSM, pMsg, sizeof( VBOXCLIPBOARDCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL);1940 rc = SSMR3GetStructEx(pSSM, pMsg, sizeof(SHCLCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL); 1941 1941 AssertRCReturn(rc, rc); 1942 1942 … … 1984 1984 if (itClient != g_mapClients.end()) 1985 1985 { 1986 P VBOXCLIPBOARDCLIENT pClient = itClient->second;1986 PSHCLCLIENT pClient = itClient->second; 1987 1987 AssertPtr(pClient); 1988 1988 … … 2000 2000 else 2001 2001 { 2002 SH AREDCLIPBOARDFORMATDATA formatData;2002 SHCLFORMATDATA formatData; 2003 2003 RT_ZERO(formatData); 2004 2004 … … 2014 2014 case VBOX_CLIPBOARD_EXT_FN_DATA_READ: 2015 2015 { 2016 SH AREDCLIPBOARDDATAREQ dataReq;2016 SHCLDATAREQ dataReq; 2017 2017 RT_ZERO(dataReq); 2018 2018 … … 2040 2040 LogFlowFunc(("pfnExtension=%p\n", pfnExtension)); 2041 2041 2042 VBOXCLIPBOARDEXTPARMS parms;2042 SHCLEXTPARMS parms; 2043 2043 RT_ZERO(parms); 2044 2044 … … 2089 2089 g_pHelpers = pTable->pHelpers; 2090 2090 2091 pTable->cbClient = sizeof( VBOXCLIPBOARDCLIENT);2091 pTable->cbClient = sizeof(SHCLCLIENT); 2092 2092 2093 2093 pTable->pfnUnload = svcUnload; -
trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
r80626 r80662 26 26 extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad (VBOXHGCMSVCFNTABLE *ptable); 27 27 28 static VBOXCLIPBOARDCLIENT g_Client;28 static SHCLCLIENT g_Client; 29 29 static VBOXHGCMSVCHELPERS g_Helpers = { NULL }; 30 30 … … 279 279 int VBoxClipboardSvcImplInit() { return VINF_SUCCESS; } 280 280 void VBoxClipboardSvcImplDestroy() { } 281 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT)281 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT) 282 282 { return VINF_SUCCESS; } 283 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT, bool)283 int VBoxClipboardSvcImplConnect(PSHCLCLIENT, bool) 284 284 { return VINF_SUCCESS; } 285 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT, PVBOXCLIPBOARDCLIENTCMDCTX, PSHAREDCLIPBOARDFORMATDATA)285 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLFORMATDATA) 286 286 { AssertFailed(); return VINF_SUCCESS; } 287 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT, PVBOXCLIPBOARDCLIENTCMDCTX, PSHAREDCLIPBOARDDATABLOCK, unsigned int *)287 int VBoxClipboardSvcImplReadData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLDATABLOCK, unsigned int *) 288 288 { AssertFailed(); return VERR_WRONG_ORDER; } 289 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT, PVBOXCLIPBOARDCLIENTCMDCTX, PSHAREDCLIPBOARDDATABLOCK)289 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLDATABLOCK) 290 290 { AssertFailed(); return VINF_SUCCESS; } 291 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT)291 int VBoxClipboardSvcImplSync(PSHCLCLIENT) 292 292 { AssertFailed(); return VERR_WRONG_ORDER; } 293 293 -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r80559 r80662 8421 8421 LogFlowFunc(("VBOX_CLIPBOARD_EXT_FN_FORMAT_ANNOUNCE\n")); 8422 8422 8423 VBOXCLIPBOARDEXTPARMS *pParms = (VBOXCLIPBOARDEXTPARMS *)pvParms;8423 SHCLEXTPARMS *pParms = (SHCLEXTPARMS *)pvParms; 8424 8424 AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER); 8425 8425 … … 8437 8437 LogFlowFunc(("VBOX_CLIPBOARD_EXT_FN_DATA_READ\n")); 8438 8438 8439 VBOXCLIPBOARDEXTPARMS *pParms = (VBOXCLIPBOARDEXTPARMS *)pvParms;8439 SHCLEXTPARMS *pParms = (SHCLEXTPARMS *)pvParms; 8440 8440 AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER); 8441 8441 … … 8456 8456 LogFlowFunc(("VBOX_CLIPBOARD_EXT_FN_DATA_WRITE\n")); 8457 8457 8458 VBOXCLIPBOARDEXTPARMS *pParms = (VBOXCLIPBOARDEXTPARMS *)pvParms;8458 SHCLEXTPARMS *pParms = (SHCLEXTPARMS *)pvParms; 8459 8459 AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER); 8460 8460 … … 8475 8475 if (SUCCEEDED(hrc)) 8476 8476 { 8477 P VBOXCLIPBOARDEXTAREAPARMS pParms = (PVBOXCLIPBOARDEXTAREAPARMS)pvParms;8477 PSHCLEXTAREAPARMS pParms = (PSHCLEXTAREAPARMS)pvParms; 8478 8478 AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER); 8479 8479 … … 8487 8487 case VBOX_CLIPBOARD_EXT_FN_AREA_UNREGISTER: 8488 8488 { 8489 P VBOXCLIPBOARDEXTAREAPARMS pParms = (PVBOXCLIPBOARDEXTAREAPARMS)pvParms;8489 PSHCLEXTAREAPARMS pParms = (PSHCLEXTAREAPARMS)pvParms; 8490 8490 AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER); 8491 8491 … … 8497 8497 case VBOX_CLIPBOARD_EXT_FN_AREA_ATTACH: 8498 8498 { 8499 P VBOXCLIPBOARDEXTAREAPARMS pParms = (PVBOXCLIPBOARDEXTAREAPARMS)pvParms;8499 PSHCLEXTAREAPARMS pParms = (PSHCLEXTAREAPARMS)pvParms; 8500 8500 AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER); 8501 8501 … … 8507 8507 case VBOX_CLIPBOARD_EXT_FN_AREA_DETACH: 8508 8508 { 8509 P VBOXCLIPBOARDEXTAREAPARMS pParms = (PVBOXCLIPBOARDEXTAREAPARMS)pvParms;8509 PSHCLEXTAREAPARMS pParms = (PSHCLEXTAREAPARMS)pvParms; 8510 8510 AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER); 8511 8511 -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r80623 r80662 230 230 { 231 231 SharedClipboardAreaData() 232 : uID(NIL_SH AREDCLIPBOARDAREAID) { }232 : uID(NIL_SHCLAREAID) { } 233 233 234 234 /** The area's (unique) ID. 235 * Set to NIL_SH AREDCLIPBOARDAREAID if not initialized yet. */235 * Set to NIL_SHCLAREAID if not initialized yet. */ 236 236 ULONG uID; 237 237 /** The actual Shared Clipboard area assigned to this ID. */ … … 248 248 { 249 249 SharedClipboardData() 250 : uMostRecentClipboardAreaID(NIL_SH AREDCLIPBOARDAREAID)250 : uMostRecentClipboardAreaID(NIL_SHCLAREAID) 251 251 , uMaxClipboardAreas(32) /** @todo Make this configurable. */ 252 252 { … … 271 271 ULONG GenerateAreaID(void) 272 272 { 273 ULONG uID = NIL_SH AREDCLIPBOARDAREAID;273 ULONG uID = NIL_SHCLAREAID; 274 274 275 275 int rc = RTCritSectEnter(&CritSect); … … 289 289 RTCRITSECT CritSect; 290 290 /** The most recent (last created) clipboard area ID. 291 * NIL_SH AREDCLIPBOARDAREAID if not initialized yet. */291 * NIL_SHCLAREAID if not initialized yet. */ 292 292 ULONG uMostRecentClipboardAreaID; 293 293 /** Maximum of concurrent clipboard areas. … … 3424 3424 if (pAreaData) 3425 3425 { 3426 vrc = pAreaData->Area.OpenTemp(uAreaID, SH AREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST);3426 vrc = pAreaData->Area.OpenTemp(uAreaID, SHCLAREA_OPEN_FLAGS_MUST_NOT_EXIST); 3427 3427 if (RT_SUCCESS(vrc)) 3428 3428 { … … 3635 3635 /** 3636 3636 * Returns the ID of the most recent (last created) clipboard area, 3637 * or NIL_SH AREDCLIPBOARDAREAID if no clipboard area has been created yet.3637 * or NIL_SHCLAREAID if no clipboard area has been created yet. 3638 3638 * 3639 3639 * @returns Most recent clipboard area ID.
Note:
See TracChangeset
for help on using the changeset viewer.