FreeRDP
client/rdpdr_main.h
1 
25 #ifndef FREERDP_CHANNEL_RDPDR_CLIENT_MAIN_H
26 #define FREERDP_CHANNEL_RDPDR_CLIENT_MAIN_H
27 
28 #include <winpr/crt.h>
29 #include <winpr/synch.h>
30 #include <winpr/thread.h>
31 #include <winpr/stream.h>
32 #include <winpr/collections.h>
33 
34 #include <freerdp/api.h>
35 #include <freerdp/svc.h>
36 #include <freerdp/addin.h>
37 
38 #include <freerdp/channels/rdpdr.h>
39 #include <freerdp/channels/log.h>
40 
41 #ifdef __MACOSX__
42 #include <CoreServices/CoreServices.h>
43 #endif
44 
45 enum RDPDR_CHANNEL_STATE
46 {
47  RDPDR_CHANNEL_STATE_INITIAL = 0,
48  RDPDR_CHANNEL_STATE_ANNOUNCE,
49  RDPDR_CHANNEL_STATE_ANNOUNCE_REPLY,
50  RDPDR_CHANNEL_STATE_NAME_REQUEST,
51  RDPDR_CHANNEL_STATE_SERVER_CAPS,
52  RDPDR_CHANNEL_STATE_CLIENT_CAPS,
53  RDPDR_CHANNEL_STATE_CLIENTID_CONFIRM,
54  RDPDR_CHANNEL_STATE_READY,
55  RDPDR_CHANNEL_STATE_USER_LOGGEDON
56 };
57 
58 typedef struct
59 {
60  CHANNEL_DEF channelDef;
61  CHANNEL_ENTRY_POINTS_FREERDP_EX channelEntryPoints;
62 
63  enum RDPDR_CHANNEL_STATE state;
64  HANDLE thread;
65  wStream* data_in;
66  void* InitHandle;
67  DWORD OpenHandle;
68  wMessageQueue* queue;
69 
70  DEVMAN* devman;
71  BOOL ignoreInvalidDevices;
72 
73  UINT32 serverOsType;
74  UINT32 serverOsVersion;
75  UINT16 serverVersionMajor;
76  UINT16 serverVersionMinor;
77  UINT32 serverExtendedPDU;
78  UINT32 serverIOCode1;
79  UINT32 serverIOCode2;
80  UINT32 serverExtraFlags1;
81  UINT32 serverExtraFlags2;
82  UINT32 serverSpecialTypeDeviceCap;
83 
84  UINT32 clientOsType;
85  UINT32 clientOsVersion;
86  UINT16 clientVersionMajor;
87  UINT16 clientVersionMinor;
88  UINT32 clientExtendedPDU;
89  UINT32 clientIOCode1;
90  UINT32 clientIOCode2;
91  UINT32 clientExtraFlags1;
92  UINT32 clientExtraFlags2;
93  UINT32 clientSpecialTypeDeviceCap;
94 
95  UINT32 clientID;
96  char computerName[256];
97 
98  UINT32 sequenceId;
99  BOOL userLoggedOn;
100 
101  /* hotplug support */
102  HANDLE hotplugThread;
103 #ifdef _WIN32
104  HWND hotplug_wnd;
105 #endif
106 #ifdef __MACOSX__
107  CFRunLoopRef runLoop;
108 #endif
109 #ifndef _WIN32
110  HANDLE stopEvent;
111 #endif
112  rdpContext* rdpcontext;
113  wStreamPool* pool;
114  wLog* log;
115  BOOL async;
116  BOOL capabilities[6];
117 } rdpdrPlugin;
118 
119 BOOL rdpdr_state_advance(rdpdrPlugin* rdpdr, enum RDPDR_CHANNEL_STATE next);
120 UINT rdpdr_send(rdpdrPlugin* rdpdr, wStream* s);
121 
122 #endif /* FREERDP_CHANNEL_RDPDR_CLIENT_MAIN_H */
Definition: svc.h:61