FreeRDP
server/rail.h
1 
20 #ifndef FREERDP_CHANNEL_RAIL_SERVER_RAIL_H
21 #define FREERDP_CHANNEL_RAIL_SERVER_RAIL_H
22 
23 #include <freerdp/api.h>
24 #include <freerdp/types.h>
25 
26 #include <freerdp/rail.h>
27 #include <freerdp/channels/rail.h>
28 
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33 
34  typedef struct s_rail_server_context RailServerContext;
35  typedef struct s_rail_server_private RailServerPrivate;
36 
37  typedef UINT (*psRailStart)(RailServerContext* context);
38  typedef BOOL (*psRailStop)(RailServerContext* context);
39 
40  /* Client side callback types */
41  typedef UINT (*psRailClientHandshake)(RailServerContext* context,
42  const RAIL_HANDSHAKE_ORDER* handshake);
43  typedef UINT (*psRailClientClientStatus)(RailServerContext* context,
44  const RAIL_CLIENT_STATUS_ORDER* clientStatus);
45  typedef UINT (*psRailClientExec)(RailServerContext* context, const RAIL_EXEC_ORDER* exec);
46  typedef UINT (*psRailClientSysparam)(RailServerContext* context,
47  const RAIL_SYSPARAM_ORDER* sysparam);
48  typedef UINT (*psRailClientActivate)(RailServerContext* context,
49  const RAIL_ACTIVATE_ORDER* activate);
50  typedef UINT (*psRailClientSysmenu)(RailServerContext* context,
51  const RAIL_SYSMENU_ORDER* sysmenu);
52  typedef UINT (*psRailClientSyscommand)(RailServerContext* context,
53  const RAIL_SYSCOMMAND_ORDER* syscommand);
54  typedef UINT (*psRailClientNotifyEvent)(RailServerContext* context,
55  const RAIL_NOTIFY_EVENT_ORDER* notifyEvent);
56  typedef UINT (*psRailClientGetAppidReq)(RailServerContext* context,
57  const RAIL_GET_APPID_REQ_ORDER* getAppidReq);
58  typedef UINT (*psRailClientWindowMove)(RailServerContext* context,
59  const RAIL_WINDOW_MOVE_ORDER* windowMove);
60  typedef UINT (*psRailClientSnapArrange)(RailServerContext* context,
61  const RAIL_SNAP_ARRANGE* snapArrange);
62  typedef UINT (*psRailClientLangbarInfo)(RailServerContext* context,
63  const RAIL_LANGBAR_INFO_ORDER* langbarInfo);
64  typedef UINT (*psRailClientLanguageImeInfo)(RailServerContext* context,
65  const RAIL_LANGUAGEIME_INFO_ORDER* languageImeInfo);
66  typedef UINT (*psRailClientCompartmentInfo)(RailServerContext* context,
67  const RAIL_COMPARTMENT_INFO_ORDER* compartmentInfo);
68  typedef UINT (*psRailClientCloak)(RailServerContext* context, const RAIL_CLOAK* cloak);
69  typedef UINT (*psRailClientTextScale)(RailServerContext* context, UINT32 TextScale);
70  typedef UINT (*psRailClientCaretBlinkRate)(RailServerContext* context, UINT32 CaretBlinkRate);
71 
72  /* Server side messages sending methods */
73  typedef UINT (*psRailServerHandshake)(RailServerContext* context,
74  const RAIL_HANDSHAKE_ORDER* handshake);
75  typedef UINT (*psRailServerHandshakeEx)(RailServerContext* context,
76  const RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
77  typedef UINT (*psRailServerSysparam)(RailServerContext* context,
78  const RAIL_SYSPARAM_ORDER* sysparam);
79  typedef UINT (*psRailServerLocalMoveSize)(RailServerContext* context,
80  const RAIL_LOCALMOVESIZE_ORDER* localMoveSize);
81  typedef UINT (*psRailServerMinMaxInfo)(RailServerContext* context,
82  const RAIL_MINMAXINFO_ORDER* minMaxInfo);
83  typedef UINT (*psRailServerTaskbarInfo)(RailServerContext* context,
84  const RAIL_TASKBAR_INFO_ORDER* taskbarInfo);
85  typedef UINT (*psRailServerLangbarInfo)(RailServerContext* context,
86  const RAIL_LANGBAR_INFO_ORDER* langbarInfo);
87  typedef UINT (*psRailServerExecResult)(RailServerContext* context,
88  const RAIL_EXEC_RESULT_ORDER* execResult);
89  typedef UINT (*psRailServerGetAppidResp)(RailServerContext* context,
90  const RAIL_GET_APPID_RESP_ORDER* getAppIdResp);
91  typedef UINT (*psRailServerZOrderSync)(RailServerContext* context,
92  const RAIL_ZORDER_SYNC* zOrderSync);
93  typedef UINT (*psRailServerCloak)(RailServerContext* context, const RAIL_CLOAK* cloak);
94  typedef UINT (*psRailServerPowerDisplayRequest)(
95  RailServerContext* context, const RAIL_POWER_DISPLAY_REQUEST* PowerDisplayRequest);
96  typedef UINT (*psRailServerGetAppidRespEx)(RailServerContext* context,
97  const RAIL_GET_APPID_RESP_EX* GetAppidRespEx);
98 
100  {
101  HANDLE vcm;
102  void* custom;
103 
104  psRailStart Start;
105  psRailStop Stop;
106 
107  /* Callbacks from client */
108  psRailClientHandshake ClientHandshake;
109  psRailClientClientStatus ClientClientStatus;
110  psRailClientExec ClientExec;
111  psRailClientSysparam ClientSysparam;
112  psRailClientActivate ClientActivate;
113  psRailClientSysmenu ClientSysmenu;
114  psRailClientSyscommand ClientSyscommand;
115  psRailClientNotifyEvent ClientNotifyEvent;
116  psRailClientGetAppidReq ClientGetAppidReq;
117  psRailClientWindowMove ClientWindowMove;
118  psRailClientSnapArrange ClientSnapArrange;
119  psRailClientLangbarInfo ClientLangbarInfo;
120  psRailClientLanguageImeInfo ClientLanguageImeInfo;
121  psRailClientCompartmentInfo ClientCompartmentInfo;
122  psRailClientCloak ClientCloak;
123  psRailClientTextScale ClientTextScale;
124  psRailClientCaretBlinkRate ClientCaretBlinkRate;
125 
126  /* Methods for sending server side messages */
127  psRailServerHandshake ServerHandshake;
128  psRailServerHandshakeEx ServerHandshakeEx;
129  psRailServerSysparam ServerSysparam;
130  psRailServerLocalMoveSize ServerLocalMoveSize;
131  psRailServerMinMaxInfo ServerMinMaxInfo;
132  psRailServerTaskbarInfo ServerTaskbarInfo;
133  psRailServerLangbarInfo ServerLangbarInfo;
134  psRailServerExecResult ServerExecResult;
135  psRailServerZOrderSync ServerZOrderSync;
136  psRailServerCloak ServerCloak;
137  psRailServerPowerDisplayRequest ServerPowerDisplayRequest;
138  psRailServerGetAppidResp ServerGetAppidResp;
139  psRailServerGetAppidRespEx ServerGetAppidRespEx;
140 
141  RailServerPrivate* priv;
142  rdpContext* rdpcontext;
143  };
144 
145  FREERDP_API void rail_server_context_free(RailServerContext* context);
146 
147  WINPR_ATTR_MALLOC(rail_server_context_free, 1)
148  FREERDP_API RailServerContext* rail_server_context_new(HANDLE vcm);
149 
150  FREERDP_API UINT rail_server_handle_messages(RailServerContext* context);
151  FREERDP_API void rail_server_set_handshake_ex_flags(RailServerContext* context, DWORD flags);
152 
153 #ifdef __cplusplus
154 }
155 #endif
156 
157 #endif /* FREERDP_CHANNEL_RAIL_SERVER_RAIL_H */