Changeset 47620 in vbox for trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
- Timestamp:
- Aug 8, 2013 8:09:42 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
r45415 r47620 50 50 * 51 51 * @returns VBox status code 52 * @param puClientId Where to put the client id on success. The client id52 * @param puClientId Where to put The client ID on success. The client ID 53 53 * must be passed to all the other calls to the service. 54 54 */ … … 77 77 * 78 78 * @returns VBox status code. 79 * @param uClientId The client idreturned by VbglR3GuestCtrlConnect().79 * @param uClientId The client ID returned by VbglR3GuestCtrlConnect(). 80 80 */ 81 81 VBGLR3DECL(int) VbglR3GuestCtrlDisconnect(uint32_t uClientId) … … 97 97 * 98 98 * @returns VBox status code. 99 * @param uClientId The client idreturned by VbglR3GuestCtrlConnect().99 * @param uClientId The client ID returned by VbglR3GuestCtrlConnect(). 100 100 * @param puMsg Where to store the message id. 101 101 * @param puNumParms Where to store the number of parameters which will be received … … 134 134 * Asks the host guest control service to set a command filter to this 135 135 * client so that it only will receive certain commands in the future. 136 * The filter(s) are a bitmask for the context IDs, served from the host. 136 137 * 137 138 * @return IPRT status code. 138 * @param uClientId The client idreturned by VbglR3GuestCtrlConnect().139 * @param uFilterAdd Filter mask to add.140 * @param uFilterRemove Filter mask to remove.141 */ 142 VBGLR3DECL(int) VbglR3GuestCtrlMsg SetFilter(uint32_t uClientId,139 * @param uClientId The client ID returned by VbglR3GuestCtrlConnect(). 140 * @param uFilterAdd Context ID filter mask to add. 141 * @param uFilterRemove Context ID filter mask to remove. 142 */ 143 VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterSet(uint32_t uClientId, 143 144 uint32_t uFilterAdd, uint32_t uFilterRemove) 144 145 { 145 HGCMMsgCmd SetFilterMsg;146 HGCMMsgCmdFilterSet Msg; 146 147 147 148 Msg.hdr.result = VERR_WRONG_ORDER; 148 149 Msg.hdr.u32ClientID = uClientId; 149 Msg.hdr.u32Function = GUEST_MSG_FILTER ; /* Tell the host we want to set a filter. */150 Msg.hdr.cParms = 2;150 Msg.hdr.u32Function = GUEST_MSG_FILTER_SET; /* Tell the host we want to set a filter. */ 151 Msg.hdr.cParms = 3; 151 152 152 153 VbglHGCMParmUInt32Set(&Msg.add, uFilterAdd); 153 154 VbglHGCMParmUInt32Set(&Msg.remove, uFilterRemove); 155 VbglHGCMParmUInt32Set(&Msg.flags, 0 /* Flags, unused */); 156 157 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); 158 if (RT_SUCCESS(rc)) 159 rc = Msg.hdr.result; 160 return rc; 161 } 162 163 164 /** 165 * Disables a previously set message filter. 166 * 167 * @return IPRT status code. 168 * @param uClientId The client ID returned by VbglR3GuestCtrlConnect(). 169 */ 170 VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterUnset(uint32_t uClientId) 171 { 172 HGCMMsgCmdFilterUnset Msg; 173 174 Msg.hdr.result = VERR_WRONG_ORDER; 175 Msg.hdr.u32ClientID = uClientId; 176 Msg.hdr.u32Function = GUEST_MSG_FILTER_UNSET; /* Tell the host we want to unset the filter. */ 177 Msg.hdr.cParms = 1; 178 179 VbglHGCMParmUInt32Set(&Msg.flags, 0 /* Flags, unused */); 154 180 155 181 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); … … 165 191 * 166 192 * @return IPRT status code. 167 * @param uClientId The client idreturned by VbglR3GuestCtrlConnect().193 * @param uClientId The client ID returned by VbglR3GuestCtrlConnect(). 168 194 */ 169 195 VBGLR3DECL(int) VbglR3GuestCtrlMsgSkip(uint32_t uClientId) … … 175 201 Msg.hdr.u32Function = GUEST_MSG_SKIP; /* Tell the host we want to skip 176 202 the current assigned command. */ 177 Msg.hdr.cParms = 0; /* No parameters needed. */ 203 Msg.hdr.cParms = 1; 204 205 VbglHGCMParmUInt32Set(&Msg.flags, 0 /* Flags, unused */); 178 206 179 207 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); … … 189 217 * 190 218 * @returns VBox status code. 191 * @param uClientId The client idreturned by VbglR3GuestCtrlConnect().219 * @param uClientId The client ID returned by VbglR3GuestCtrlConnect(). 192 220 */ 193 221 VBGLR3DECL(int) VbglR3GuestCtrlCancelPendingWaits(uint32_t uClientId)
Note:
See TracChangeset
for help on using the changeset viewer.