Changeset 58212 in vbox for trunk/include/VBox/HostServices
- Timestamp:
- Oct 13, 2015 11:49:33 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 103344
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HostServices/DragAndDropSvc.h
r57500 r58212 22 22 * You may elect to license modified versions of this file under the 23 23 * terms and conditions of either the GPL or the CDDL or both. 24 */ 25 26 /** 27 * Protocol handling and notes: 28 * All client/server components should be backwards compatible. 29 * 30 ****************************************************************************** 31 * 32 * Protocol changelog: 33 * 34 * Protocol v1 (VBox < 5.0): 35 * - Initial implementation which only implemented host to guest transfers. 36 * - For file transfers all file information such as the file name and file size were 37 * transferred with every file data chunk being sent. 38 * 39 * Protocol v2 (VBox 5.0): 40 * - Added support for guest to host transfers. 41 * - Added protocol version support through VBOXDNDCONNECTMSG. The host takes the installed 42 * Guest Additions version as indicator which protocol to use for communicating with the guest. 43 * The guest itself uses VBOXDNDCONNECTMSG to report its supported protocol version to the DnD service. 44 * 45 * Protocol v3 (VBox 5.0+): 46 * - Added VBOXDNDSNDDATAHDR and VBOXDNDCBSNDDATAHDRDATA to support (simple) accounting of objects 47 * being transferred, along with supplying separate meta data size (which is part of the total size being sent). 48 * - Added new HOST_DND_HG_SND_DATA_HDR + GUEST_DND_GH_SND_DATA_HDR commands which now allow specifying an optional 49 * compression type and defining a checksum for the overall data transfer. 50 * - Enhannced VBOXDNDGHSENDDATAMSG to support (rolling) checksums for the supplied data block. 51 * - VBOXDNDHGSENDFILEDATAMSG and VBOXDNDGHSENDFILEDATAMSG are now sharing the same HGCM mesasge. 52 * - VBOXDNDHGSENDDATAMSG and VBOXDNDGHSENDDATAMSG can now contain an optional checksum for the current data block. 53 * - Removed unused HOST_DND_GH_RECV_DIR, HOST_DND_GH_RECV_FILE_DATA and HOST_DND_GH_RECV_FILE_HDR commands. 24 54 */ 25 55 … … 106 136 /** The host requested to cancel the current DnD operation. */ 107 137 HOST_DND_HG_EVT_CANCEL = 204, 108 /** Gets the actual MIME data, based on 109 * the format(s) specified by HOST_DND_HG_EVT_ENTER. If the guest 110 * supplied buffer too small to send the actual data, the host 111 * will send a HOST_DND_HG_SND_MORE_DATA message as follow-up. */ 138 /** Sends the data header at the beginning of a (new) 139 * data transfer. */ 140 HOST_DND_HG_SND_DATA_HDR = 210, 141 /** 142 * Sends the actual meta data, based on 143 * the format(s) specified by HOST_DND_HG_EVT_ENTER. 144 * 145 * Protocol v1/v2: If the guest supplied buffer too small to send 146 * the actual data, the host will send a HOST_DND_HG_SND_MORE_DATA 147 * message as follow-up. 148 * Protocol v3+: The incoming meta data size is specified upfront in the 149 * HOST_DND_HG_SND_DATA_HDR message and must be handled accordingly. 150 */ 112 151 HOST_DND_HG_SND_DATA = 205, 113 /** Sent when the actual buffer for HOST_DND_HG_SND_DATA 114 * was too small, issued by the DnD host service. */152 /** Sent when the actual buffer for HOST_DND_HG_SND_DATA was too small. */ 153 /** @todo Deprecated function; do not use anymore. */ 115 154 HOST_DND_HG_SND_MORE_DATA = 206, 116 155 /** Directory entry to be sent to the guest. */ … … 133 172 * a specific MIME type. */ 134 173 HOST_DND_GH_EVT_DROPPED = 601, 135 /** Creates a directory on the guest. */136 HOST_DND_GH_RECV_DIR = 650,137 /** Retrieves file data from the guest. */138 HOST_DND_GH_RECV_FILE_DATA = 670,139 /** Retrieves a file header from the guest.140 * Note: Only for protocol version 2 and up (>= VBox 5.0). */141 HOST_DND_GH_RECV_FILE_HDR = 671,142 174 /** Blow the type up to 32-bit. */ 143 175 HOST_DND_32BIT_HACK = 0x7fffffff … … 185 217 */ 186 218 GUEST_DND_GH_ACK_PENDING = 500, 219 /** Sends the data header at the beginning of a (new) 220 * data transfer. */ 221 GUEST_DND_GH_SND_DATA_HDR = 503, 187 222 /** 188 223 * Sends data of the requested format to the host. There can … … 227 262 */ 228 263 264 /** 265 * Action message for telling the guest about the currently ongoing 266 * drag and drop action when entering the guest's area, moving around in it 267 * and dropping content into it from the host. 268 * 269 * Used by: 270 * HOST_DND_HG_EVT_ENTER 271 * HOST_DND_HG_EVT_MOVE 272 * HOST_DND_HG_EVT_DROPPED 273 */ 229 274 typedef struct VBOXDNDHGACTIONMSG 230 275 { 231 276 VBoxGuestHGCMCallInfo hdr; 232 277 233 /**234 * HG Action event.235 *236 * Used by:237 * HOST_DND_HG_EVT_ENTER238 * HOST_DND_HG_EVT_MOVE239 * HOST_DND_HG_EVT_DROPPED240 */241 278 HGCMFunctionParameter uScreenId; /* OUT uint32_t */ 242 279 HGCMFunctionParameter uX; /* OUT uint32_t */ … … 248 285 } VBOXDNDHGACTIONMSG; 249 286 287 /** 288 * Tells the guest that the host has left its drag and drop area on the guest. 289 * 290 * Used by: 291 * HOST_DND_HG_EVT_LEAVE 292 */ 250 293 typedef struct VBOXDNDHGLEAVEMSG 251 294 { 252 295 VBoxGuestHGCMCallInfo hdr; 296 } VBOXDNDHGLEAVEMSG; 297 298 299 /** 300 * Tells the guest that the host wants to cancel the current drag and drop operation. 301 * 302 * Used by: 303 * HOST_DND_HG_EVT_CANCEL 304 */ 305 typedef struct VBOXDNDHGCANCELMSG 306 { 307 VBoxGuestHGCMCallInfo hdr; 308 } VBOXDNDHGCANCELMSG; 309 310 /** 311 * Sends the header of an incoming (meta) data block. 312 * 313 * Used by: 314 * HOST_DND_HG_SND_DATA_HDR 315 * GUEST_DND_GH_SND_DATA_HDR 316 * 317 * New since protocol v3. 318 */ 319 typedef struct VBOXDNDHGSENDDATAHDRMSG 320 { 321 VBoxGuestHGCMCallInfo hdr; 322 323 /** Context ID. Unused at the moment. */ 324 HGCMFunctionParameter uContext; /* OUT uint32_t */ 325 /** Data transfer flags. Not yet used and must be 0. */ 326 HGCMFunctionParameter uFlags; /* OUT uint32_t */ 327 /** Screen ID where the data originates from. */ 328 HGCMFunctionParameter uScreenId; /* OUT uint32_t */ 329 /** Total size (in bytes) to transfer. */ 330 HGCMFunctionParameter cbTotal; /* OUT uint64_t */ 253 331 /** 254 * HG Leave event. 332 * Total meta data size (in bytes) to transfer. 333 * This size also is part of cbTotal already, so: 255 334 * 256 * Used by: 257 * HOST_DND_HG_EVT_LEAVE 335 * cbTotal = cbMeta + additional size for files etc. 258 336 */ 259 } VBOXDNDHGLEAVEMSG; 260 261 typedef struct VBOXDNDHGCANCELMSG 262 { 263 VBoxGuestHGCMCallInfo hdr; 264 265 /** 266 * HG Cancel return event. 267 * 268 * Used by: 269 * HOST_DND_HG_EVT_CANCEL 270 */ 271 } VBOXDNDHGCANCELMSG; 272 337 HGCMFunctionParameter cbMeta; /* OUT uint64_t */ 338 /** Meta data format. */ 339 HGCMFunctionParameter pvMetaFmt; /* OUT ptr */ 340 /** Size (in bytes) of meta data format. */ 341 HGCMFunctionParameter cbMetaFmt; /* OUT uint32_t */ 342 /* Number of objects (files/directories) to transfer. */ 343 HGCMFunctionParameter cObjects; /* OUT uint64_t */ 344 /** Compression type. */ 345 HGCMFunctionParameter enmCompression; /* OUT uint32_t */ 346 /** Checksum type. */ 347 HGCMFunctionParameter enmChecksumType; /* OUT uint32_t */ 348 /** Checksum buffer for the entire data to be transferred. */ 349 HGCMFunctionParameter pvChecksum; /* OUT ptr */ 350 /** Size (in bytes) of checksum. */ 351 HGCMFunctionParameter cbChecksum; /* OUT uint32_t */ 352 } VBOXDNDHGSENDDATAHDRMSG; 353 354 /** 355 * Sends a (meta) data block to the guest. 356 * 357 * Used by: 358 * HOST_DND_HG_SND_DATA 359 */ 273 360 typedef struct VBOXDNDHGSENDDATAMSG 274 361 { 275 362 VBoxGuestHGCMCallInfo hdr; 276 363 277 /** 278 * HG Send Data event. 279 * 280 * Used by: 281 * HOST_DND_HG_SND_DATA 282 */ 283 HGCMFunctionParameter uScreenId; /* OUT uint32_t */ 284 HGCMFunctionParameter pvFormat; /* OUT ptr */ 285 HGCMFunctionParameter cFormat; /* OUT uint32_t */ 286 HGCMFunctionParameter pvData; /* OUT ptr */ 287 HGCMFunctionParameter cbData; /* OUT uint32_t */ 364 union 365 { 366 struct 367 { 368 HGCMFunctionParameter uScreenId; /* OUT uint32_t */ 369 HGCMFunctionParameter pvFormat; /* OUT ptr */ 370 HGCMFunctionParameter cbFormat; /* OUT uint32_t */ 371 HGCMFunctionParameter pvData; /* OUT ptr */ 372 HGCMFunctionParameter cbData; /* OUT uint32_t */ 373 } v1; 374 /* No changes in v2. */ 375 struct 376 { 377 /** Context ID. Unused at the moment. */ 378 HGCMFunctionParameter uContext; /* OUT uint32_t */ 379 /** Data block to send. */ 380 HGCMFunctionParameter pvData; /* OUT ptr */ 381 /** Size (in bytes) of data block to send. */ 382 HGCMFunctionParameter cbData; /* OUT uint32_t */ 383 /** Checksum of data block, based on the checksum 384 * type in the data header. Optional. */ 385 HGCMFunctionParameter pvChecksum; /* OUT ptr */ 386 /** Size (in bytes) of checksum to send. */ 387 HGCMFunctionParameter cbChecksum; /* OUT uint32_t */ 388 } v3; 389 } u; 288 390 } VBOXDNDHGSENDDATAMSG; 289 391 392 /** 393 * Sends more (meta) data in case the data didn't fit 394 * into the current XXX_DND_HG_SND_DATA message. 395 * 396 ** @todo Deprecated since protocol v3. Don't use! Will be removed. 397 * 398 * Used by: 399 * HOST_DND_HG_SND_MORE_DATA 400 */ 290 401 typedef struct VBOXDNDHGSENDMOREDATAMSG 291 402 { 292 403 VBoxGuestHGCMCallInfo hdr; 293 404 294 /**295 * HG Send More Data event.296 *297 * Used by:298 * HOST_DND_HG_SND_MORE_DATA299 */300 405 HGCMFunctionParameter pvData; /* OUT ptr */ 301 406 HGCMFunctionParameter cbData; /* OUT uint32_t */ 302 407 } VBOXDNDHGSENDMOREDATAMSG; 303 408 409 /** 410 * Directory entry event. 411 * 412 * Used by: 413 * HOST_DND_HG_SND_DIR 414 * GUEST_DND_GH_SND_DIR 415 */ 304 416 typedef struct VBOXDNDHGSENDDIRMSG 305 417 { 306 418 VBoxGuestHGCMCallInfo hdr; 307 419 308 /** 309 * HG Directory event. 310 * 311 * Used by: 312 * HOST_DND_HG_SND_DIR 313 */ 420 /** Directory name. */ 314 421 HGCMFunctionParameter pvName; /* OUT ptr */ 422 /** Size (in bytes) of directory name. */ 315 423 HGCMFunctionParameter cbName; /* OUT uint32_t */ 424 /** Directory mode. */ 316 425 HGCMFunctionParameter fMode; /* OUT uint32_t */ 317 426 } VBOXDNDHGSENDDIRMSG; 318 427 319 428 /** 320 * File header event.429 * File header message, marking the start of transferring a new file. 321 430 * Note: Only for protocol version 2 and up. 322 431 * 323 432 * Used by: 324 433 * HOST_DND_HG_SND_FILE_HDR 325 * HOST_DND_GH_SND_FILE_HDR434 * GUEST_DND_GH_SND_FILE_HDR 326 435 */ 327 436 typedef struct VBOXDNDHGSENDFILEHDRMSG … … 341 450 /** Total size (in bytes). */ 342 451 HGCMFunctionParameter cbTotal; /* OUT uint64_t */ 343 344 452 } VBOXDNDHGSENDFILEHDRMSG; 345 453 … … 360 468 struct 361 469 { 470 /** File name. */ 362 471 HGCMFunctionParameter pvName; /* OUT ptr */ 472 /** Size (in bytes) of file name. */ 363 473 HGCMFunctionParameter cbName; /* OUT uint32_t */ 474 /** Current data chunk. */ 364 475 HGCMFunctionParameter pvData; /* OUT ptr */ 476 /** Size (in bytes) of current data chunk. */ 365 477 HGCMFunctionParameter cbData; /* OUT uint32_t */ 478 /** File mode. */ 366 479 HGCMFunctionParameter fMode; /* OUT uint32_t */ 367 480 } v1; … … 372 485 /** Context ID. Unused at the moment. */ 373 486 HGCMFunctionParameter uContext; /* OUT uint32_t */ 487 /** Current data chunk. */ 374 488 HGCMFunctionParameter pvData; /* OUT ptr */ 489 /** Size (in bytes) of current data chunk. */ 375 490 HGCMFunctionParameter cbData; /* OUT uint32_t */ 376 491 /** Note: fMode is now part of the VBOXDNDHGSENDFILEHDRMSG message. */ 377 492 } v2; 493 struct 494 { 495 /** Context ID. Unused at the moment. */ 496 HGCMFunctionParameter uContext; /* OUT uint32_t */ 497 /** Current data chunk. */ 498 HGCMFunctionParameter pvData; /* OUT ptr */ 499 /** Size (in bytes) of current data chunk. */ 500 HGCMFunctionParameter cbData; /* OUT uint32_t */ 501 /** Checksum of data block, based on the checksum 502 * type in the data header. Optional. */ 503 HGCMFunctionParameter pvChecksum; /* OUT ptr */ 504 /** Size (in bytes) of curren data chunk checksum. */ 505 HGCMFunctionParameter cbChecksum; /* OUT uint32_t */ 506 } v3; 378 507 } u; 379 380 508 } VBOXDNDHGSENDFILEDATAMSG; 381 509 510 /** 511 * Asks the guest if a guest->host DnD operation is in progress. 512 * 513 * Used by: 514 * HOST_DND_GH_REQ_PENDING 515 */ 382 516 typedef struct VBOXDNDGHREQPENDINGMSG 383 517 { 384 518 VBoxGuestHGCMCallInfo hdr; 385 519 386 /** 387 * GH Request Pending event. 388 * 389 * Used by: 390 * HOST_DND_GH_REQ_PENDING 391 */ 520 /** Screen ID. */ 392 521 HGCMFunctionParameter uScreenId; /* OUT uint32_t */ 393 522 } VBOXDNDGHREQPENDINGMSG; 394 523 524 /** 525 * Tells the guest that the host has dropped the ongoing guest->host 526 * DnD operation on a valid target on the host. 527 * 528 * Used by: 529 * HOST_DND_GH_EVT_DROPPED 530 */ 395 531 typedef struct VBOXDNDGHDROPPEDMSG 396 532 { 397 533 VBoxGuestHGCMCallInfo hdr; 398 534 399 /** 400 * GH Dropped event. 401 * 402 * Used by: 403 * HOST_DND_GH_EVT_DROPPED 404 */ 535 /** Requested format for sending the data. */ 405 536 HGCMFunctionParameter pvFormat; /* OUT ptr */ 406 HGCMFunctionParameter cFormat; /* OUT uint32_t */ 537 /** Size (in bytes) of requested format. */ 538 HGCMFunctionParameter cbFormat; /* OUT uint32_t */ 539 /** Drop action peformed on the host. */ 407 540 HGCMFunctionParameter uAction; /* OUT uint32_t */ 408 541 } VBOXDNDGHDROPPEDMSG; … … 423 556 VBoxGuestHGCMCallInfo hdr; 424 557 425 HGCMFunctionParameter msg; /* OUT uint32_t */ 558 /** Message ID. */ 559 HGCMFunctionParameter uMsg; /* OUT uint32_t */ 426 560 /** Number of parameters the message needs. */ 427 HGCMFunctionParameter num_parms; /* OUT uint32_t */561 HGCMFunctionParameter cParms; /* OUT uint32_t */ 428 562 /** Whether or not to block (wait) for a 429 563 * new message to arrive. */ 430 HGCMFunctionParameter block; /* OUT uint32_t */ 431 564 HGCMFunctionParameter fBlock; /* OUT uint32_t */ 432 565 } VBOXDNDNEXTMSGMSG; 433 566 434 567 /** 435 * Connection request. Used to tell the DnD protocol568 * Guest connection request. Used to tell the DnD protocol 436 569 * version to the (host) service. 437 570 * … … 447 580 /** Connection flags. Optional. */ 448 581 HGCMFunctionParameter uFlags; /* OUT uint32_t */ 449 450 582 } VBOXDNDCONNECTMSG; 451 583 … … 486 618 487 619 /** 488 * GH Acknowledge Pending event. 620 * Acknowledges a pending drag and drop event 621 * to the host. 489 622 * 490 623 * Used by: … … 501 634 502 635 /** 503 * GH Send Data event. 636 * Sends the header of an incoming data block 637 * to the host. 638 * 639 * Used by: 640 * GUEST_DND_GH_SND_DATA_HDR 641 * 642 * New since protocol v3. 643 */ 644 typedef struct VBOXDNDHGSENDDATAHDRMSG VBOXDNDGHSENDDATAHDRMSG; 645 646 /** 647 * Sends a (meta) data block to the host. 504 648 * 505 649 * Used by: … … 507 651 */ 508 652 typedef struct VBOXDNDGHSENDDATAMSG 509 {510 VBoxGuestHGCMCallInfo hdr;511 512 HGCMFunctionParameter pvData; /* OUT ptr */513 /** Total bytes to send. This can be more than514 * the data block specified in pvData above, e.g.515 * when sending over file objects afterwards. */516 HGCMFunctionParameter cbTotalBytes; /* OUT uint32_t */517 } VBOXDNDGHSENDDATAMSG;518 519 /**520 * GH Directory event.521 *522 * Used by:523 * GUEST_DND_GH_SND_DIR524 */525 typedef struct VBOXDNDGHSENDDIRMSG526 {527 VBoxGuestHGCMCallInfo hdr;528 529 HGCMFunctionParameter pvName; /* OUT ptr */530 HGCMFunctionParameter cbName; /* OUT uint32_t */531 HGCMFunctionParameter fMode; /* OUT uint32_t */532 } VBOXDNDGHSENDDIRMSG;533 534 /**535 * GH File header event.536 * Note: Only for protocol version 2 and up.537 *538 * Used by:539 * HOST_DND_GH_SND_FILE_HDR540 */541 typedef struct VBOXDNDHGSENDFILEHDRMSG VBOXDNDGHSENDFILEHDRMSG;542 543 /**544 * GH File data event.545 *546 * Used by:547 * GUEST_DND_HG_SND_FILE_DATA548 */549 typedef struct VBOXDNDGHSENDFILEDATAMSG550 653 { 551 654 VBoxGuestHGCMCallInfo hdr; … … 553 656 union 554 657 { 555 /* Note: Protocol v1 sends the file name + file mode 556 * every time a file data chunk is being sent. */ 557 struct 558 { 559 HGCMFunctionParameter pvName; /* OUT ptr */ 560 HGCMFunctionParameter cbName; /* OUT uint32_t */ 561 HGCMFunctionParameter fMode; /* OUT uint32_t */ 562 HGCMFunctionParameter pvData; /* OUT ptr */ 563 HGCMFunctionParameter cbData; /* OUT uint32_t */ 658 struct 659 { 660 HGCMFunctionParameter pvData; /* OUT ptr */ 661 /** Total bytes to send. This can be more than 662 * the data block specified in pvData above, e.g. 663 * when sending over file objects afterwards. */ 664 HGCMFunctionParameter cbTotalBytes; /* OUT uint32_t */ 564 665 } v1; 565 666 struct 566 667 { 567 /** Note: pvName is now part of the VBOXDNDHGSENDFILEHDRMSG message. */568 /** Note: cbName is now part of the VBOXDNDHGSENDFILEHDRMSG message. */569 668 /** Context ID. Unused at the moment. */ 570 HGCMFunctionParameter uContext; /* OUT uint32_t */ 571 HGCMFunctionParameter pvData; /* OUT ptr */ 572 HGCMFunctionParameter cbData; /* OUT uint32_t */ 573 /** Note: fMode is now part of the VBOXDNDHGSENDFILEHDRMSG message. */ 574 } v2; 669 HGCMFunctionParameter uContext; /* OUT uint32_t */ 670 /** Data block to send. */ 671 HGCMFunctionParameter pvData; /* OUT ptr */ 672 /** Size (in bytes) of data block to send. */ 673 HGCMFunctionParameter cbData; /* OUT uint32_t */ 674 /** (Rolling) Checksum, based on checksum type in data header. */ 675 HGCMFunctionParameter pvChecksum; /* OUT ptr */ 676 /** Size (in bytes) of checksum. */ 677 HGCMFunctionParameter cbChecksum; /* OUT uint32_t */ 678 } v3; 575 679 } u; 576 577 } VBOXDNDGHSENDFILEDATAMSG; 578 579 /** 580 * GH Error event. 680 } VBOXDNDGHSENDDATAMSG; 681 682 /** 683 * Sends a directory entry to the host. 684 * 685 * Used by: 686 * GUEST_DND_GH_SND_DIR 687 */ 688 typedef struct VBOXDNDHGSENDDIRMSG VBOXDNDGHSENDDIRMSG; 689 690 /** 691 * Sends a file header to the host. 692 * 693 * Used by: 694 * GUEST_DND_GH_SND_FILE_HDR 695 * 696 * New since protocol v2. 697 */ 698 typedef struct VBOXDNDHGSENDFILEHDRMSG VBOXDNDGHSENDFILEHDRMSG; 699 700 /** 701 * Sends file data to the host. 702 * 703 * Used by: 704 * GUEST_DND_GH_SND_FILE_DATA 705 */ 706 typedef struct VBOXDNDHGSENDFILEDATAMSG VBOXDNDGHSENDFILEDATAMSG; 707 708 /** 709 * Sends a guest error event to the host. 581 710 * 582 711 * Used by: … … 604 733 CB_MAGIC_DND_GH_ACK_PENDING = 0xbe975a14, 605 734 CB_MAGIC_DND_GH_SND_DATA = 0x4eb61bff, 735 CB_MAGIC_DND_GH_SND_DATA_HDR = 0x4631ee4f, 606 736 CB_MAGIC_DND_GH_SND_DIR = 0x411ca754, 607 737 CB_MAGIC_DND_GH_SND_FILE_HDR = 0x65e35eaf, … … 669 799 } VBOXDNDCBGHACKPENDINGDATA, *PVBOXDNDCBGHACKPENDINGDATA; 670 800 801 /** 802 * Data header. 803 * New since protocol v3. 804 */ 805 typedef struct VBOXDNDDATAHDR 806 { 807 /** Data transfer flags. Not yet used and must be 0. */ 808 uint32_t uFlags; 809 /** Screen ID where the data originates from. */ 810 uint32_t uScreenId; 811 /** Total size (in bytes) to transfer. */ 812 uint64_t cbTotal; 813 /** Meta data size (in bytes) to transfer. 814 * This size also is part of cbTotal already. */ 815 uint32_t cbMeta; 816 /** Meta format buffer. */ 817 void *pvMetaFmt; 818 /** Size (in bytes) of meta format buffer. */ 819 uint32_t cbMetaFmt; 820 /** Number of objects (files/directories) to transfer. */ 821 uint64_t cObjects; 822 /** Compression type. Currently unused, so specify 0. 823 **@todo Add IPRT compression type enumeration as soon as it's available. */ 824 uint32_t enmCompression; 825 /** Checksum type. Currently unused, so specify RTDIGESTTYPE_INVALID. */ 826 RTDIGESTTYPE enmChecksumType; 827 /** The actual checksum buffer for the entire data to be transferred, 828 * based on enmChksumType. If RTDIGESTTYPE_INVALID is specified, 829 * no checksum is being used and pvChecksum will be NULL. */ 830 void *pvChecksum; 831 /** Size (in bytes) of checksum. */ 832 uint32_t cbChecksum; 833 } VBOXDNDDATAHDR, *PVBOXDNDSNDDATAHDR; 834 835 /* New since protocol v3. */ 836 typedef struct VBOXDNDCBSNDDATAHDRDATA 837 { 838 /** Callback data header. */ 839 VBOXDNDCBHEADERDATA hdr; 840 /** Actual header data. */ 841 VBOXDNDDATAHDR data; 842 } VBOXDNDCBSNDDATAHDRDATA, *PVBOXDNDCBSNDDATAHDRDATA; 843 844 typedef struct VBOXDNDSNDDATA 845 { 846 union 847 { 848 struct 849 { 850 /** Data block buffer. */ 851 void *pvData; 852 /** Size (in bytes) of data block. */ 853 uint32_t cbData; 854 /** Total metadata size (in bytes). This is transmitted 855 * with every message because the size can change. */ 856 uint32_t cbTotalSize; 857 } v1; 858 /* Protocol v2: No changes. */ 859 struct 860 { 861 /** Data block buffer. */ 862 void *pvData; 863 /** Size (in bytes) of data block. */ 864 uint32_t cbData; 865 /** (Rolling) Checksum. Not yet implemented. */ 866 void *pvChecksum; 867 /** Size (in bytes) of checksum. Not yet implemented. */ 868 uint32_t cbChecksum; 869 } v3; 870 } u; 871 } VBOXDNDSNDDATA, *PVBOXDNDSNDDATA; 872 671 873 typedef struct VBOXDNDCBSNDDATADATA 672 874 { 673 875 /** Callback data header. */ 674 876 VBOXDNDCBHEADERDATA hdr; 675 void *pvData; 676 uint32_t cbData; 677 /** Total metadata size (in bytes). This is transmitted 678 * with every message because the size can change. */ 679 uint32_t cbTotalSize; 877 /** Actual data. */ 878 VBOXDNDSNDDATA data; 680 879 } VBOXDNDCBSNDDATADATA, *PVBOXDNDCBSNDDATADATA; 681 880 … … 684 883 /** Callback data header. */ 685 884 VBOXDNDCBHEADERDATA hdr; 885 /** Directory path. */ 686 886 char *pszPath; 887 /** Size (in bytes) of path. */ 687 888 uint32_t cbPath; 889 /** Directory creation mode. */ 688 890 uint32_t fMode; 689 891 } VBOXDNDCBSNDDIRDATA, *PVBOXDNDCBSNDDIRDATA; 690 892 691 /* 893 /* Note: Only for protocol version 2 and up (>= VBox 5.0). */ 692 894 typedef struct VBOXDNDCBSNDFILEHDRDATA 693 895 { … … 725 927 uint32_t fMode; 726 928 } v1; 727 /* Note: Protocol version 2 has the file attributes (name, size, 728 mode, ...) in the VBOXDNDCBSNDFILEHDRDATA structure. */ 929 /* Protocol v2 + v3: Have the file attributes (name, size, mode, ...) 930 in the VBOXDNDCBSNDFILEHDRDATA structure. */ 931 struct 932 { 933 /** Checksum for current file data chunk. */ 934 void *pvChecksum; 935 /** Size (in bytes) of current data chunk. */ 936 uint32_t cbChecksum; 937 } v3; 729 938 } u; 730 939 } VBOXDNDCBSNDFILEDATADATA, *PVBOXDNDCBSNDFILEDATADATA;
Note:
See TracChangeset
for help on using the changeset viewer.