Initial commit - from Precise source
[freerdp-ubuntu-pcb-backport.git] / channels / rail / rail_main.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * RAIL Virtual Channel Plugin
4  *
5  * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
6  * Copyright 2011 Roman Barabanov <romanbarabanov@gmail.com>
7  * Copyright 2011 Vic Lee
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *     http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22 #ifndef __RAIL_MAIN_H
23 #define __RAIL_MAIN_H
24
25 #include <freerdp/rail.h>
26 #include <freerdp/utils/debug.h>
27 #include <freerdp/utils/stream.h>
28 #include <freerdp/utils/svc_plugin.h>
29
30 struct rdp_rail_order
31 {
32         UNICONV* uniconv;
33         RDP_PLUGIN_DATA* plugin_data;
34         void* plugin;
35         RAIL_HANDSHAKE_ORDER handshake;
36         RAIL_CLIENT_STATUS_ORDER client_status;
37         RAIL_EXEC_ORDER exec;
38         RAIL_EXEC_RESULT_ORDER exec_result;
39         RAIL_SYSPARAM_ORDER sysparam;
40         RAIL_ACTIVATE_ORDER activate;
41         RAIL_SYSMENU_ORDER sysmenu;
42         RAIL_SYSCOMMAND_ORDER syscommand;
43         RAIL_NOTIFY_EVENT_ORDER notify_event;
44         RAIL_MINMAXINFO_ORDER minmaxinfo;
45         RAIL_LOCALMOVESIZE_ORDER localmovesize;
46         RAIL_WINDOW_MOVE_ORDER window_move;
47         RAIL_LANGBAR_INFO_ORDER langbar_info;
48         RAIL_GET_APPID_REQ_ORDER get_appid_req;
49         RAIL_GET_APPID_RESP_ORDER get_appid_resp;
50 };
51 typedef struct rdp_rail_order rdpRailOrder;
52
53 struct rail_plugin
54 {
55         rdpSvcPlugin plugin;
56         rdpRailOrder* rail_order;
57 };
58 typedef struct rail_plugin railPlugin;
59
60 void rail_send_channel_event(void* rail_object, uint16 event_type, void* param);
61 void rail_send_channel_data(void* rail_object, void* data, size_t length);
62
63 #ifdef WITH_DEBUG_RAIL
64 #define DEBUG_RAIL(fmt, ...) DEBUG_CLASS(RAIL, fmt, ## __VA_ARGS__)
65 #else
66 #define DEBUG_RAIL(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
67 #endif
68
69 #endif /* __RAIL_MAIN_H */