Changeset 45109 in vbox for trunk/include/VBox/HostServices
- Timestamp:
- Mar 20, 2013 4:41:00 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84401
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HostServices/GuestControlSvc.h
r45076 r45109 330 330 */ 331 331 GUEST_EXEC_IO_NOTIFY = 210, 332 /** Guest notifies the host about a file event, like opening,333 * closing, seeking etc.332 /** 333 * Guest notifies the host about some file event. 334 334 */ 335 335 GUEST_FILE_NOTIFY = 240 … … 363 363 /** 364 364 * Guest file notification types. 365 * @sa HGCMMsgFileNotify. 365 366 */ 366 367 enum GUEST_FILE_NOTIFYTYPE … … 377 378 378 379 /** 379 * Guest file seeking types. 380 * Guest file seeking types. Has to 381 * match FileSeekType in Main. 380 382 */ 381 383 enum GUEST_FILE_SEEKTYPE … … 693 695 /** File handle to read from. */ 694 696 HGCMFunctionParameter handle; 695 /** Actual size of data (in bytes). */697 /** Size (in bytes) to read. */ 696 698 HGCMFunctionParameter size; 697 /** Where to put the read data into. */698 HGCMFunctionParameter data;699 699 700 700 } HGCMMsgFileRead; … … 714 714 /** Actual size of data (in bytes). */ 715 715 HGCMFunctionParameter size; 716 /** Where to put the read data into. */717 HGCMFunctionParameter data;718 716 719 717 } HGCMMsgFileReadAt; … … 785 783 } HGCMMsgFileTell; 786 784 787 typedef struct HGCMMsgFileNotify 785 /****************************************************************************** 786 * HGCM replies from the guest. These are handled in Main's low-level HGCM * 787 * callbacks and dispatched to the appropriate guest object. * 788 ******************************************************************************/ 789 790 typedef struct HGCMReplyFileNotify 788 791 { 789 792 VBoxGuestHGCMCallInfo hdr; … … 792 795 /** Notification type. */ 793 796 HGCMFunctionParameter type; 794 /** Notification payload. */ 795 HGCMFunctionParameter payload; 796 797 } HGCMMsgFileNotify; 797 /** IPRT result of overall operation. */ 798 HGCMFunctionParameter rc; 799 union 800 { 801 struct 802 { 803 /** Guest file handle. */ 804 HGCMFunctionParameter handle; 805 } open; 806 /** Note: Close does not have any additional data (yet). */ 807 struct 808 { 809 /** Actual data read (if any). */ 810 HGCMFunctionParameter data; 811 } read; 812 struct 813 { 814 /** How much data (in bytes) have been successfully written. */ 815 HGCMFunctionParameter written; 816 } write; 817 struct 818 { 819 HGCMFunctionParameter offset; 820 } seek; 821 struct 822 { 823 HGCMFunctionParameter offset; 824 } tell; 825 } u; 826 827 } HGCMReplyFileNotify; 798 828 799 829 #pragma pack () … … 832 862 /** Notification type. */ 833 863 uint32_t uType; 834 /** Notification result. */864 /** Notification result. Note: int vs. uint32! */ 835 865 uint32_t uResult; 836 866 } CALLBACKDATA_SESSION_NOTIFY, *PCALLBACKDATA_SESSION_NOTIFY; … … 882 912 } CALLBACKDATA_PROC_INPUT, *PCALLBACKDATA_PROC_INPUT; 883 913 914 /** 915 * General guest file notification callback. 916 */ 884 917 typedef struct CALLBACKDATA_FILE_NOTIFY 885 918 { 886 919 /** Callback data header. */ 887 920 CALLBACKDATA_HEADER hdr; 888 /** The file handle. */ 889 uint32_t uHandle; 921 /** Notification type. */ 922 uint32_t uType; 923 /** IPRT result of overall operation. */ 924 uint32_t rc; 925 union 926 { 927 struct 928 { 929 /** Guest file handle. */ 930 uint32_t uHandle; 931 } open; 932 /** Note: Close does not have any additional data (yet). */ 933 struct 934 { 935 /** How much data (in bytes) have been read. */ 936 uint32_t cbData; 937 /** Actual data read (if any). */ 938 void *pvData; 939 } read; 940 struct 941 { 942 /** How much data (in bytes) have been successfully written. */ 943 uint32_t cbWritten; 944 } write; 945 struct 946 { 947 /** New file offset after successful seek. */ 948 uint64_t uOffActual; 949 } seek; 950 struct 951 { 952 /** New file offset after successful tell. */ 953 uint64_t uOffActual; 954 } tell; 955 } u; 890 956 } CALLBACKDATA_FILE_NOTIFY, *PCALLBACKDATA_FILE_NOTIFY; 891 957 892 /******************************************************************************893 * Callback payload structures. *894 ******************************************************************************/895 896 /*897 * These structures contain the actual payload, based of the given payload898 * type the HGCM message includes.899 */900 901 typedef struct CALLBACKPAYLOAD_FILE_NOTIFY_OPEN902 {903 /** IPRT result of overall operation. */904 int32_t rc;905 /** File handle on successful opening. */906 uint32_t uHandle;907 } CALLBACKPAYLOAD_FILE_NOTIFY_OPEN, *PCALLBACKPAYLOAD_FILE_NOTIFY_OPEN;908 909 typedef struct CALLBACKPAYLOAD_FILE_NOTIFY_CLOSE910 {911 /** IPRT result of overall operation. */912 int32_t rc;913 } CALLBACKPAYLOAD_FILE_NOTIFY_CLOSE, *PCALLBACKPAYLOAD_FILE_NOTIFY_CLOSE;914 915 typedef struct CALLBACKPAYLOAD_FILE_NOTIFY_READ916 {917 /** IPRT result of overall operation. */918 int32_t rc;919 /** How much data (in bytes) have been read. */920 uint32_t cbData;921 /** Actual data read (if any). */922 void *pvData;923 } CALLBACKPAYLOAD_FILE_NOTIFY_READ, *PCALLBACKPAYLOAD_FILE_NOTIFY_READ;924 925 typedef struct CALLBACKPAYLOAD_FILE_NOTIFY_WRITE926 {927 /** IPRT result of overall operation. */928 int32_t rc;929 /** How much data (in bytes) have been successfully written. */930 uint32_t cbWritten;931 } CALLBACKPAYLOAD_FILE_NOTIFY_WRITE, *PCALLBACKPAYLOAD_FILE_NOTIFY_WRITE;932 933 typedef struct CALLBACKPAYLOAD_FILE_NOTFIY_SEEK934 {935 /** IPRT result of overall operation. */936 int32_t rc;937 /** New file offset after successful seek. */938 uint64_t uOffActual;939 } CALLBACKPAYLOAD_FILE_NOTFIY_SEEK, *PCALLBACKPAYLOAD_FILE_NOTIFY_SEEK;940 941 typedef struct CALLBACKPAYLOAD_FILE_NOTFIY_TELL942 {943 /** IPRT result of overall operation. */944 int32_t rc;945 /** Current file offset after successful tell. */946 uint64_t uOffActual;947 } CALLBACKPAYLOAD_FILE_NOTFIY_TELL, *PCALLBACKPAYLOAD_FILE_NOTIFY_TELL;948 949 958 } /* namespace guestControl */ 950 959
Note:
See TracChangeset
for help on using the changeset viewer.