FreeRDP
shadow_mcevent.h
1 
19 #ifndef FREERDP_SERVER_SHADOW_MCEVENT_H
20 #define FREERDP_SERVER_SHADOW_MCEVENT_H
21 
22 #include <freerdp/server/shadow.h>
23 
24 #include <winpr/crt.h>
25 #include <winpr/synch.h>
26 #include <winpr/collections.h>
27 
28 /*
29  * This file implemented a model that an event is consumed
30  * by multiple clients. All clients should wait others before continue
31  * Server should wait for all clients before continue
32  */
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
39  void shadow_multiclient_free(rdpShadowMultiClientEvent* event);
40 
41  WINPR_ATTR_MALLOC(shadow_multiclient_free, 1)
42  rdpShadowMultiClientEvent* shadow_multiclient_new(void);
43 
44  void shadow_multiclient_publish(rdpShadowMultiClientEvent* event);
45  void shadow_multiclient_wait(rdpShadowMultiClientEvent* event);
46  void shadow_multiclient_publish_and_wait(rdpShadowMultiClientEvent* event);
47  void* shadow_multiclient_get_subscriber(rdpShadowMultiClientEvent* event);
48  void shadow_multiclient_release_subscriber(void* subscriber);
49  BOOL shadow_multiclient_consume(void* subscriber);
50  HANDLE shadow_multiclient_getevent(void* subscriber);
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif /* FREERDP_SERVER_SHADOW_MCEVENT_H */