- Timestamp:
- Dec 6, 2019 11:52:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/SharedClipboard.h
r82462 r82476 122 122 /** Payload ID; currently unused. */ 123 123 uint32_t uID; 124 /** Size (in bytes) of actual payload data. */ 125 uint32_t cbData; 124 126 /** Pointer to actual payload data. */ 125 127 void *pvData; 126 /** Size (in bytes) of actual payload data. */127 uint32_t cbData;128 128 } SHCLEVENTPAYLOAD, *PSHCLEVENTPAYLOAD; 129 129 … … 155 155 156 156 /** Maximum number of concurrent Shared Clipboard client sessions a VM can have. */ 157 #define VBOX_SHCL_MAX_SESSIONS UINT16_MAX - 1157 #define VBOX_SHCL_MAX_SESSIONS (UINT16_MAX - 1) 158 158 /** Maximum number of concurrent Shared Clipboard transfers a single 159 159 * client can have. */ 160 #define VBOX_SHCL_MAX_TRANSFERS UINT16_MAX - 1160 #define VBOX_SHCL_MAX_TRANSFERS (UINT16_MAX - 1) 161 161 /** Maximum number of events a single Shared Clipboard transfer can have. */ 162 #define VBOX_SHCL_MAX_EVENTS UINT32_MAX - 1162 #define VBOX_SHCL_MAX_EVENTS (UINT32_MAX - 1) 163 163 164 164 /** 165 165 * Creates a context ID out of a client ID, a transfer ID and a count (can be an event ID). 166 166 */ 167 #define VBOX_SHCL_CONTEXTID_MAKE( uSessionID, uTransferID, uEventID) \168 ( ( uint64_t)((uSessionID) & 0xffff) << 48\169 | ( uint64_t)((uTransferID) & 0xffff) << 32\170 | ( uint32_t)((uEventID) & 0xffffffff) \167 #define VBOX_SHCL_CONTEXTID_MAKE(a_idSession, a_idTransfer, a_idEvent) \ 168 ( ((uint64_t)((a_idSession) & 0xffff) << 48) \ 169 | ((uint64_t)((a_idTransfer) & 0xffff) << 32) \ 170 | ((uint32_t) (a_idEvent)) \ 171 171 ) 172 172 /** Creates a context ID out of a session ID. */ 173 #define VBOX_SHCL_CONTEXTID_MAKE_SESSION(uSessionID) \ 174 ((uint32_t)((uSessionID) & 0xffff) << 48) 173 #define VBOX_SHCL_CONTEXTID_MAKE_SESSION(a_idSession) VBOX_SHCL_CONTEXTID_MAKE(a_idSession, 0, 0) 175 174 /** Gets the session ID out of a context ID. */ 176 #define VBOX_SHCL_CONTEXTID_GET_SESSION(uContextID) \ 177 (((uContextID) >> 48) & 0xffff) 175 #define VBOX_SHCL_CONTEXTID_GET_SESSION(a_idContext) ( (uint16_t)(((a_idContext) >> 48) & UINT16_MAX) ) 178 176 /** Gets the transfer ID out of a context ID. */ 179 #define VBOX_SHCL_CONTEXTID_GET_TRANSFER(uContextID) \ 180 (((uContextID) >> 32) & 0xffff) 177 #define VBOX_SHCL_CONTEXTID_GET_TRANSFER(a_idContext) ( (uint16_t)(((a_idContext) >> 32) & UINT16_MAX) ) 181 178 /** Gets the transfer event out of a context ID. */ 182 #define VBOX_SHCL_CONTEXTID_GET_EVENT(uContextID) \ 183 ((uContextID) & 0xffffffff) 184 185 /** 186 * Structure for maintaining a Shared Clipboard event. 179 #define VBOX_SHCL_CONTEXTID_GET_EVENT(a_idContext) ( (uint32_t)( (a_idContext) & UINT32_MAX) ) 180 181 /** 182 * Shared Clipboard event. 187 183 */ 188 184 typedef struct _SHCLEVENT … … 199 195 200 196 /** 201 * S tructure for maintaining a Shared Clipboard event source.202 * 203 * Each event source maintains an own counter for events, so that 204 * i t can be used in different contexts.205 */ 206 typedef struct _SHCLEVENTSOURCE207 { 208 /** The event source 'ID. */197 * Shared Clipboard event source. 198 * 199 * Each event source maintains an own counter for events, so that it can be used 200 * in different contexts. 201 */ 202 typedef struct SHCLEVENTSOURCE 203 { 204 /** The event source ID. */ 209 205 SHCLEVENTSOURCEID uID; 210 206 /** Next upcoming event ID. */ … … 224 220 * @{ 225 221 */ 226 int ShClEventSourceCreate(PSHCLEVENTSOURCE pSource, SHCLEVENTSOURCEID uID);222 int ShClEventSourceCreate(PSHCLEVENTSOURCE pSource, SHCLEVENTSOURCEID idEvtSrc); 227 223 void ShClEventSourceDestroy(PSHCLEVENTSOURCE pSource); 228 224 void ShClEventSourceReset(PSHCLEVENTSOURCE pSource); … … 234 230 SHCLEVENTID ShClEventIDGenerate(PSHCLEVENTSOURCE pSource); 235 231 SHCLEVENTID ShClEventGetLast(PSHCLEVENTSOURCE pSource); 236 int ShClEventRegister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID);237 int ShClEventUnregister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID);238 int ShClEventWait(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, RTMSINTERVAL uTimeoutMs, PSHCLEVENTPAYLOAD*ppPayload);239 int ShClEventSignal(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, PSHCLEVENTPAYLOAD pPayload);240 void ShClEventPayloadDetach(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID);232 int ShClEventRegister(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent); 233 int ShClEventUnregister(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent); 234 int ShClEventWait(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent, RTMSINTERVAL uTimeoutMs, PSHCLEVENTPAYLOAD *ppPayload); 235 int ShClEventSignal(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent, PSHCLEVENTPAYLOAD pPayload); 236 void ShClEventPayloadDetach(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent); 241 237 /** @} */ 242 238 243 239 /** 244 * Enumeration to specify theShared Clipboard transfer source type.240 * Shared Clipboard transfer source type. 245 241 */ 246 242 typedef enum SHCLSOURCE … … 253 249 SHCLSOURCE_REMOTE, 254 250 /** The usual 32-bit hack. */ 255 SHCLSOURCE_32B it_Hack= 0x7fffffff251 SHCLSOURCE_32BIT_HACK = 0x7fffffff 256 252 } SHCLSOURCE; 257 253
Note:
See TracChangeset
for help on using the changeset viewer.