FreeRDP
client/drdynvc_main.h
1 
22 #ifndef FREERDP_CHANNEL_DRDYNVC_CLIENT_MAIN_H
23 #define FREERDP_CHANNEL_DRDYNVC_CLIENT_MAIN_H
24 
25 #include <winpr/wlog.h>
26 #include <winpr/synch.h>
27 #include <freerdp/settings.h>
28 #include <winpr/collections.h>
29 
30 #include <freerdp/api.h>
31 #include <freerdp/svc.h>
32 #include <freerdp/dvc.h>
33 #include <freerdp/addin.h>
34 #include <freerdp/channels/log.h>
35 #include <freerdp/client/drdynvc.h>
36 #include <freerdp/freerdp.h>
37 
38 typedef struct drdynvc_plugin drdynvcPlugin;
39 
40 typedef struct
41 {
42  IWTSVirtualChannelManager iface;
43 
44  drdynvcPlugin* drdynvc;
45 
46  wArrayList* plugin_names;
47  wArrayList* plugins;
48 
49  wHashTable* listeners;
50  wHashTable* channelsById;
51  wStreamPool* pool;
52 } DVCMAN;
53 
54 typedef struct
55 {
56  IWTSListener iface;
57 
58  DVCMAN* dvcman;
59  char* channel_name;
60  UINT32 flags;
61  IWTSListenerCallback* listener_callback;
63 
64 typedef struct
65 {
66  IDRDYNVC_ENTRY_POINTS iface;
67 
68  DVCMAN* dvcman;
69  const ADDIN_ARGV* args;
70  rdpContext* context;
72 
73 typedef enum
74 {
75  DVC_CHANNEL_INIT,
76  DVC_CHANNEL_RUNNING,
77  DVC_CHANNEL_CLOSED
78 } DVC_CHANNEL_STATE;
79 
80 typedef struct
81 {
82  IWTSVirtualChannel iface;
83 
84  volatile LONG refCounter;
85  DVC_CHANNEL_STATE state;
86  DVCMAN* dvcman;
87  void* pInterface;
88  UINT32 channel_id;
89  char* channel_name;
90  IWTSVirtualChannelCallback* channel_callback;
91 
92  wStream* dvc_data;
93  UINT32 dvc_data_length;
94  CRITICAL_SECTION lock;
96 
97 typedef enum
98 {
99  DRDYNVC_STATE_INITIAL,
100  DRDYNVC_STATE_CAPABILITIES,
101  DRDYNVC_STATE_READY,
102  DRDYNVC_STATE_OPENING_CHANNEL,
103  DRDYNVC_STATE_SEND_RECEIVE,
104  DRDYNVC_STATE_FINAL
105 } DRDYNVC_STATE;
106 
108 {
109  CHANNEL_DEF channelDef;
110  CHANNEL_ENTRY_POINTS_FREERDP_EX channelEntryPoints;
111 
112  wLog* log;
113  HANDLE thread;
114  BOOL async;
115  wStream* data_in;
116  void* InitHandle;
117  DWORD OpenHandle;
118  wMessageQueue* queue;
119 
120  DRDYNVC_STATE state;
121  DrdynvcClientContext* context;
122 
123  UINT16 version;
124  int PriorityCharge0;
125  int PriorityCharge1;
126  int PriorityCharge2;
127  int PriorityCharge3;
128  rdpContext* rdpcontext;
129 
130  IWTSVirtualChannelManager* channel_mgr;
131 };
132 
133 #endif /* FREERDP_CHANNEL_DRDYNVC_CLIENT_MAIN_H */
Definition: svc.h:61