1 /**
2  * FreeRDP: A Remote Desktop Protocol Implementation
3  * Remote Applications Integrated Locally (RAIL)
4  *
5  * Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *	 http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #ifndef FREERDP_CHANNEL_RAIL_CLIENT_RAIL_H
21 #define FREERDP_CHANNEL_RAIL_CLIENT_RAIL_H
22 
23 #include <freerdp/api.h>
24 #include <freerdp/types.h>
25 
26 #include <freerdp/rail.h>
27 #include <freerdp/message.h>
28 #include <freerdp/channels/rail.h>
29 
30 /**
31  * Client Interface
32  */
33 
34 typedef struct _rail_client_context RailClientContext;
35 
36 typedef UINT (*pcRailOnOpen)(RailClientContext* context, BOOL* sendHandshake);
37 
38 typedef UINT (*pcRailClientExecute)(RailClientContext* context, const RAIL_EXEC_ORDER* exec);
39 typedef UINT (*pcRailClientActivate)(RailClientContext* context,
40                                      const RAIL_ACTIVATE_ORDER* activate);
41 typedef UINT (*pcRailClientSystemParam)(RailClientContext* context,
42                                         const RAIL_SYSPARAM_ORDER* sysparam);
43 typedef UINT (*pcRailServerSystemParam)(RailClientContext* context,
44                                         const RAIL_SYSPARAM_ORDER* sysparam);
45 typedef UINT (*pcRailClientSystemCommand)(RailClientContext* context,
46                                           const RAIL_SYSCOMMAND_ORDER* syscommand);
47 typedef UINT (*pcRailClientHandshake)(RailClientContext* context,
48                                       const RAIL_HANDSHAKE_ORDER* handshake);
49 typedef UINT (*pcRailServerHandshake)(RailClientContext* context,
50                                       const RAIL_HANDSHAKE_ORDER* handshake);
51 typedef UINT (*pcRailServerHandshakeEx)(RailClientContext* context,
52                                         const RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
53 typedef UINT (*pcRailClientNotifyEvent)(RailClientContext* context,
54                                         const RAIL_NOTIFY_EVENT_ORDER* notifyEvent);
55 typedef UINT (*pcRailClientWindowMove)(RailClientContext* context,
56                                        const RAIL_WINDOW_MOVE_ORDER* windowMove);
57 typedef UINT (*pcRailServerLocalMoveSize)(RailClientContext* context,
58                                           const RAIL_LOCALMOVESIZE_ORDER* localMoveSize);
59 typedef UINT (*pcRailServerMinMaxInfo)(RailClientContext* context,
60                                        const RAIL_MINMAXINFO_ORDER* minMaxInfo);
61 typedef UINT (*pcRailClientInformation)(RailClientContext* context,
62                                         const RAIL_CLIENT_STATUS_ORDER* clientStatus);
63 typedef UINT (*pcRailClientSystemMenu)(RailClientContext* context,
64                                        const RAIL_SYSMENU_ORDER* sysmenu);
65 typedef UINT (*pcRailServerTaskBarInfo)(RailClientContext* context,
66                                         const RAIL_TASKBAR_INFO_ORDER* taskBarInfo);
67 typedef UINT (*pcRailClientLanguageBarInfo)(RailClientContext* context,
68                                             const RAIL_LANGBAR_INFO_ORDER* langBarInfo);
69 typedef UINT (*pcRailServerLanguageBarInfo)(RailClientContext* context,
70                                             const RAIL_LANGBAR_INFO_ORDER* langBarInfo);
71 typedef UINT (*pcRailClientLanguageIMEInfo)(RailClientContext* context,
72                                             const RAIL_LANGUAGEIME_INFO_ORDER* langImeInfo);
73 typedef UINT (*pcRailServerExecuteResult)(RailClientContext* context,
74                                           const RAIL_EXEC_RESULT_ORDER* execResult);
75 typedef UINT (*pcRailClientGetAppIdRequest)(RailClientContext* context,
76                                             const RAIL_GET_APPID_REQ_ORDER* getAppIdReq);
77 typedef UINT (*pcRailServerGetAppIdResponse)(RailClientContext* context,
78                                              const RAIL_GET_APPID_RESP_ORDER* getAppIdResp);
79 typedef UINT (*pcRailServerZOrderSync)(RailClientContext* context, const RAIL_ZORDER_SYNC* zorder);
80 typedef UINT (*pcRailServerCloak)(RailClientContext* context, const RAIL_CLOAK* cloak);
81 typedef UINT (*pcRailClientCloak)(RailClientContext* context, const RAIL_CLOAK* cloak);
82 typedef UINT (*pcRailServerPowerDisplayRequest)(RailClientContext* context,
83                                                 const RAIL_POWER_DISPLAY_REQUEST* power);
84 typedef UINT (*pcRailClientSnapArrange)(RailClientContext* context, const RAIL_SNAP_ARRANGE* snap);
85 typedef UINT (*pcRailServerGetAppidResponseExtended)(RailClientContext* context,
86                                                      const RAIL_GET_APPID_RESP_EX* id);
87 typedef UINT (*pcRailClientCompartmentInfo)(RailClientContext* context,
88                                             const RAIL_COMPARTMENT_INFO_ORDER* compartmentInfo);
89 
90 struct _rail_client_context
91 {
92 	void* handle;
93 	void* custom;
94 
95 	pcRailClientExecute ClientExecute;
96 	pcRailClientActivate ClientActivate;
97 	pcRailClientSystemParam ClientSystemParam;
98 	pcRailServerSystemParam ServerSystemParam;
99 	pcRailClientSystemCommand ClientSystemCommand;
100 	pcRailClientHandshake ClientHandshake;
101 	pcRailServerHandshake ServerHandshake;
102 	pcRailServerHandshakeEx ServerHandshakeEx;
103 	pcRailClientNotifyEvent ClientNotifyEvent;
104 	pcRailClientWindowMove ClientWindowMove;
105 	pcRailServerLocalMoveSize ServerLocalMoveSize;
106 	pcRailServerMinMaxInfo ServerMinMaxInfo;
107 	pcRailClientInformation ClientInformation;
108 	pcRailClientSystemMenu ClientSystemMenu;
109 	pcRailServerTaskBarInfo ServerTaskBarInfo;
110 	pcRailClientLanguageBarInfo ClientLanguageBarInfo;
111 	pcRailServerLanguageBarInfo ServerLanguageBarInfo;
112 	pcRailClientLanguageIMEInfo ClientLanguageIMEInfo;
113 	pcRailServerExecuteResult ServerExecuteResult;
114 	pcRailClientGetAppIdRequest ClientGetAppIdRequest;
115 	pcRailServerGetAppIdResponse ServerGetAppIdResponse;
116 	pcRailServerZOrderSync ServerZOrderSync;
117 	pcRailClientCloak ClientCloak;
118 	pcRailServerCloak ServerCloak;
119 	pcRailServerPowerDisplayRequest ServerPowerDisplayRequest;
120 	pcRailClientSnapArrange ClientSnapArrange;
121 	pcRailServerGetAppidResponseExtended ServerGetAppidResponseExtended;
122 	pcRailClientCompartmentInfo ClientCompartmentInfo;
123 	pcRailOnOpen OnOpen;
124 };
125 
126 #endif /* FREERDP_CHANNEL_RAIL_CLIENT_RAIL_H */
127