Changeset 86000 in vbox for trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
- Timestamp:
- Sep 2, 2020 2:43:13 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
r85986 r86000 35 35 36 36 37 /********************************************************************************************************************************* 38 * Prototypes * 39 *********************************************************************************************************************************/ 40 DECLINLINE(PSHCLEVENT) shclEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent); 41 42 43 /********************************************************************************************************************************* 44 * Implementation * 45 *********************************************************************************************************************************/ 46 37 47 /** 38 48 * Allocates a new event payload. … … 178 188 pEvIt = NULL; 179 189 } 180 }181 182 /**183 * Returns a specific event of a event source.184 *185 * @returns Pointer to event if found, or NULL if not found.186 * @param pSource Event source to get event from.187 * @param uID Event ID to get.188 */189 DECLINLINE(PSHCLEVENT) shclEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent)190 {191 PSHCLEVENT pEvent;192 RTListForEach(&pSource->lstEvents, pEvent, SHCLEVENT, Node)193 {194 if (pEvent->idEvent == idEvent)195 return pEvent;196 }197 198 return NULL;199 190 } 200 191 … … 244 235 RTMemFree(pEvent); 245 236 return NIL_SHCLEVENTID; 237 } 238 239 /** 240 * Returns a specific event of a event source. Inlined version. 241 * 242 * @returns Pointer to event if found, or NULL if not found. 243 * @param pSource Event source to get event from. 244 * @param uID Event ID to get. 245 */ 246 DECLINLINE(PSHCLEVENT) shclEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent) 247 { 248 PSHCLEVENT pEvent; 249 RTListForEach(&pSource->lstEvents, pEvent, SHCLEVENT, Node) 250 { 251 if (pEvent->idEvent == idEvent) 252 return pEvent; 253 } 254 255 return NULL; 256 } 257 258 /** 259 * Returns a specific event of a event source. 260 * 261 * @returns Pointer to event if found, or NULL if not found. 262 * @param pSource Event source to get event from. 263 * @param uID Event ID to get. 264 */ 265 PSHCLEVENT ShClEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent) 266 { 267 return shclEventGet(pSource, idEvent); 246 268 } 247 269
Note:
See TracChangeset
for help on using the changeset viewer.