Changeset 49349 in vbox for trunk/include/VBox/HostServices
- Timestamp:
- Oct 31, 2013 4:40:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HostServices/GuestControlSvc.h
r47817 r49349 121 121 122 122 /** 123 * Guest directory removement flags. 124 * Essentially using what IPRT's RTDIRRMREC_F_ 125 * defines have to offer. 126 */ 127 #define DIRREMOVE_FLAG_RECURSIVE RT_BIT(0) 128 /** Delete the content of the directory and the directory itself. */ 129 #define DIRREMOVE_FLAG_CONTENT_AND_DIR RT_BIT(1) 130 /** Only delete the content of the directory, omit the directory it self. */ 131 #define DIRREMOVE_FLAG_CONTENT_ONLY RT_BIT(2) 132 /** Mask of valid flags. */ 133 #define DIRREMOVE_FLAG_VALID_MASK UINT32_C(0x00000003) 134 135 /** 123 136 * Guest process creation flags. 124 137 * Note: Has to match Main's ProcessCreateFlag_* flags! … … 140 153 #define OUTPUT_HANDLE_ID_STDOUT 1 141 154 #define OUTPUT_HANDLE_ID_STDERR 2 155 156 /** 157 * Guest path rename flags. 158 * Essentially using what IPRT's RTPATHRENAME_FLAGS_ 159 * defines have to offer. 160 */ 161 /** Do not replace anything. */ 162 #define PATHRENAME_FLAG_NO_REPLACE UINT32_C(0) 163 /** This will replace attempt any target which isn't a directory. */ 164 #define PATHRENAME_FLAG_REPLACE RT_BIT(0) 165 /** Don't allow symbolic links as part of the path. */ 166 #define PATHRENAME_FLAG_NO_SYMLINKS RT_BIT(1) 167 /** Mask of valid flags. */ 168 #define PATHRENAME_FLAG_VALID_MASK UINT32_C(0x00000002) 142 169 143 170 /** … … 203 230 : mParms(cParms), mpaParms(paParms) { } 204 231 232 /** Number of HGCM parameters. */ 205 233 uint32_t mParms; 234 /** Actual HGCM parameters. */ 206 235 PVBOXHGCMSVCPARM mpaParms; 207 236 … … 284 313 * Gets the current file position of an opened guest file. 285 314 */ 286 HOST_FILE_TELL = 271 315 HOST_FILE_TELL = 271, 316 /** 317 * Removes a directory on the guest. 318 */ 319 HOST_DIR_REMOVE = 320, 320 /** 321 * Renames a path on the guest. 322 */ 323 HOST_PATH_RENAME = 330 287 324 }; 288 325 … … 290 327 * The service functions which are called by guest. The numbers may not change, 291 328 * so we hardcode them. 292 *293 * Note: Callbacks start at 100. See CALLBACKTYPE enum.294 329 */ 295 330 enum eGuestFn … … 328 363 GUEST_MSG_SKIP = 10, 329 364 /** 365 * General reply to a host message. Only contains basic data 366 * along with a simple payload. 367 */ 368 GUEST_MSG_REPLY = 11, 369 /** 370 * General message for updating a pending progress for 371 * a long task. 372 */ 373 GUEST_MSG_PROGRESS_UPDATE = 12, 374 /** 330 375 * Guest reports back a guest session status. 331 376 */ 332 377 GUEST_SESSION_NOTIFY = 20, 378 /** 379 * Guest wants to close a specific guest session. 380 */ 381 GUEST_SESSION_CLOSE = 21, 333 382 /** 334 383 * Guests sends output from an executed process. … … 350 399 */ 351 400 GUEST_EXEC_IO_NOTIFY = 210, 401 /** 402 * Guest notifies the host about some directory event. 403 */ 404 GUEST_DIR_NOTIFY = 230, 352 405 /** 353 406 * Guest notifies the host about some file event. … … 382 435 383 436 /** 437 * Guest directory notification types. 438 * @sa HGCMMsgDirNotify. 439 */ 440 enum GUEST_DIR_NOTIFYTYPE 441 { 442 GUEST_DIR_NOTIFYTYPE_UNKNOWN = 0, 443 /** Something went wrong (see rc). */ 444 GUEST_DIR_NOTIFYTYPE_ERROR = 1, 445 /** Guest directory opened. */ 446 GUEST_DIR_NOTIFYTYPE_OPEN = 10, 447 /** Guest directory closed. */ 448 GUEST_DIR_NOTIFYTYPE_CLOSE = 20, 449 /** Information about an open guest directory. */ 450 GUEST_DIR_NOTIFYTYPE_INFO = 40, 451 /** Guest directory created. */ 452 GUEST_DIR_NOTIFYTYPE_CREATE = 70, 453 /** Guest directory deleted. */ 454 GUEST_DIR_NOTIFYTYPE_REMOVE = 80 455 }; 456 457 /** 384 458 * Guest file notification types. 385 459 * @sa HGCMMsgFileNotify. … … 421 495 { 422 496 VBoxGuestHGCMCallInfo hdr; 423 424 497 /** 425 498 * The returned command the host wants to … … 429 502 /** Number of parameters the message needs. */ 430 503 HGCMFunctionParameter num_parms; /* OUT uint32_t */ 431 432 504 } HGCMMsgCmdWaitFor; 433 505 … … 441 513 { 442 514 VBoxGuestHGCMCallInfo hdr; 443 444 515 /** Value to filter for after filter mask 445 516 * was applied. */ … … 451 522 /** Filter flags; currently unused. */ 452 523 HGCMFunctionParameter flags; /* IN uint32_t */ 453 454 524 } HGCMMsgCmdFilterSet; 455 525 … … 461 531 { 462 532 VBoxGuestHGCMCallInfo hdr; 463 464 533 /** Unset flags; currently unused. */ 465 534 HGCMFunctionParameter flags; /* IN uint32_t */ … … 474 543 { 475 544 VBoxGuestHGCMCallInfo hdr; 476 477 545 /** Skip flags; currently unused. */ 478 546 HGCMFunctionParameter flags; /* IN uint32_t */ … … 487 555 VBoxGuestHGCMCallInfo hdr; 488 556 } HGCMMsgCancelPendingWaits; 557 558 typedef struct HGCMMsgCmdReply 559 { 560 VBoxGuestHGCMCallInfo hdr; 561 /** Context ID. */ 562 HGCMFunctionParameter context; 563 /** Message type. */ 564 HGCMFunctionParameter type; 565 /** IPRT result of overall operation. */ 566 HGCMFunctionParameter rc; 567 /** Optional payload to this reply. */ 568 HGCMFunctionParameter payload; 569 } HGCMMsgCmdReply; 489 570 490 571 /** … … 534 615 HGCMFunctionParameter result; 535 616 } HGCMMsgSessionNotify; 617 618 typedef struct HGCMMsgPathRename 619 { 620 VBoxGuestHGCMCallInfo hdr; 621 /** UInt32: Context ID. */ 622 HGCMFunctionParameter context; 623 /** Source to rename. */ 624 HGCMFunctionParameter source; 625 /** Destination to rename source to. */ 626 HGCMFunctionParameter dest; 627 /** UInt32: Rename flags. */ 628 HGCMFunctionParameter flags; 629 } HGCMMsgPathRename; 536 630 537 631 /** … … 575 669 struct 576 670 { 577 /** Timeout (in ms ec) which either specifies the671 /** Timeout (in ms) which either specifies the 578 672 * overall lifetime of the process or how long it 579 673 * can take to bring the process up and running - … … 588 682 } v2; 589 683 } u; 590 591 684 } HGCMMsgProcExec; 592 685 … … 607 700 /** Actual size of data (in bytes). */ 608 701 HGCMFunctionParameter size; 609 610 702 } HGCMMsgProcInput; 611 703 … … 627 719 /** Data buffer. */ 628 720 HGCMFunctionParameter data; 629 630 721 } HGCMMsgProcOutput; 631 722 … … 646 737 /** Optional data buffer (not used atm). */ 647 738 HGCMFunctionParameter data; 648 649 739 } HGCMMsgProcStatus; 650 740 … … 665 755 /** Data written. */ 666 756 HGCMFunctionParameter written; 667 668 757 } HGCMMsgProcStatusInput; 669 758 … … 682 771 /** The process ID (PID). */ 683 772 HGCMFunctionParameter pid; 684 685 773 } HGCMMsgProcTerminate; 686 774 … … 699 787 /** Timeout (in ms). */ 700 788 HGCMFunctionParameter timeout; 701 702 789 } HGCMMsgProcWaitFor; 790 791 typedef struct HGCMMsgDirRemove 792 { 793 VBoxGuestHGCMCallInfo hdr; 794 /** UInt32: Context ID. */ 795 HGCMFunctionParameter context; 796 /** Directory to remove. */ 797 HGCMFunctionParameter path; 798 /** UInt32: Removement flags. */ 799 HGCMFunctionParameter flags; 800 } HGCMMsgDirRemove; 703 801 704 802 /** … … 722 820 /** UInt64: Initial offset. */ 723 821 HGCMFunctionParameter offset; 724 725 822 } HGCMMsgFileOpen; 726 823 … … 735 832 /** File handle to close. */ 736 833 HGCMFunctionParameter handle; 737 738 834 } HGCMMsgFileClose; 739 835 … … 750 846 /** Size (in bytes) to read. */ 751 847 HGCMFunctionParameter size; 752 753 848 } HGCMMsgFileRead; 754 849 … … 767 862 /** Actual size of data (in bytes). */ 768 863 HGCMFunctionParameter size; 769 770 864 } HGCMMsgFileReadAt; 771 865 … … 784 878 /** Data buffer to write to the file. */ 785 879 HGCMFunctionParameter data; 786 787 880 } HGCMMsgFileWrite; 788 881 … … 803 896 /** Data buffer to write to the file. */ 804 897 HGCMFunctionParameter data; 805 806 898 } HGCMMsgFileWriteAt; 807 899 … … 820 912 /** The seeking offset. */ 821 913 HGCMFunctionParameter offset; 822 823 914 } HGCMMsgFileSeek; 824 915 … … 833 924 /** File handle to get the current position for. */ 834 925 HGCMFunctionParameter handle; 835 836 926 } HGCMMsgFileTell; 837 927 … … 877 967 } tell; 878 968 } u; 879 880 969 } HGCMReplyFileNotify; 970 971 typedef struct HGCMReplyDirNotify 972 { 973 VBoxGuestHGCMCallInfo hdr; 974 /** Context ID. */ 975 HGCMFunctionParameter context; 976 /** Notification type. */ 977 HGCMFunctionParameter type; 978 /** IPRT result of overall operation. */ 979 HGCMFunctionParameter rc; 980 union 981 { 982 struct 983 { 984 /** Directory information. */ 985 HGCMFunctionParameter objInfo; 986 } info; 987 struct 988 { 989 /** Guest directory handle. */ 990 HGCMFunctionParameter handle; 991 } open; 992 struct 993 { 994 /** Current read directory entry. */ 995 HGCMFunctionParameter entry; 996 /** Extended entry object information. Optional. */ 997 HGCMFunctionParameter objInfo; 998 } read; 999 } u; 1000 } HGCMReplyDirNotify; 881 1001 882 1002 #pragma pack () … … 908 1028 CALLBACKDATA_HEADER hdr; 909 1029 } CALLBACKDATA_CLIENT_DISCONNECTED, *PCALLBACKDATA_CLIENT_DISCONNECTED; 1030 1031 typedef struct CALLBACKDATA_MSG_REPLY 1032 { 1033 /** Callback data header. */ 1034 CALLBACKDATA_HEADER hdr; 1035 /** Notification type. */ 1036 uint32_t uType; 1037 /** Notification result. Note: int vs. uint32! */ 1038 uint32_t rc; 1039 /** Pointer to optional payload. */ 1040 void *pvPayload; 1041 /** Payload size (in bytes). */ 1042 uint32_t cbPayload; 1043 } CALLBACKDATA_MSG_REPLY, *PCALLBACKDATA_MSG_REPLY; 910 1044 911 1045 typedef struct CALLBACKDATA_SESSION_NOTIFY … … 966 1100 967 1101 /** 968 * General guest filenotification callback.969 */ 970 typedef struct CALLBACKDATA_ FILE_NOTIFY1102 * General guest directory notification callback. 1103 */ 1104 typedef struct CALLBACKDATA_DIR_NOTIFY 971 1105 { 972 1106 /** Callback data header. */ … … 980 1114 struct 981 1115 { 1116 /** Size (in bytes) of directory information. */ 1117 uint32_t cbObjInfo; 1118 /** Pointer to directory information. */ 1119 void *pvObjInfo; 1120 } info; 1121 struct 1122 { 1123 /** Guest directory handle. */ 1124 uint32_t uHandle; 1125 } open; 1126 /** Note: Close does not have any additional data (yet). */ 1127 struct 1128 { 1129 /** Size (in bytes) of directory entry information. */ 1130 uint32_t cbEntry; 1131 /** Pointer to directory entry information. */ 1132 void *pvEntry; 1133 /** Size (in bytes) of directory entry object information. */ 1134 uint32_t cbObjInfo; 1135 /** Pointer to directory entry object information. */ 1136 void *pvObjInfo; 1137 } read; 1138 } u; 1139 } CALLBACKDATA_DIR_NOTIFY, *PCALLBACKDATA_DIR_NOTIFY; 1140 1141 /** 1142 * General guest file notification callback. 1143 */ 1144 typedef struct CALLBACKDATA_FILE_NOTIFY 1145 { 1146 /** Callback data header. */ 1147 CALLBACKDATA_HEADER hdr; 1148 /** Notification type. */ 1149 uint32_t uType; 1150 /** IPRT result of overall operation. */ 1151 uint32_t rc; 1152 union 1153 { 1154 struct 1155 { 982 1156 /** Guest file handle. */ 983 1157 uint32_t uHandle;
Note:
See TracChangeset
for help on using the changeset viewer.