2 * FreeRDP: A Remote Desktop Protocol Client
5 * Copyright 2011 Vic Lee
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
24 #include <freerdp/utils/stream.h>
26 typedef struct rdp_fastpath rdpFastPath;
28 enum FASTPATH_INPUT_ACTION_TYPE
30 FASTPATH_INPUT_ACTION_FASTPATH = 0x0,
31 FASTPATH_INPUT_ACTION_X224 = 0x3
34 enum FASTPATH_OUTPUT_ACTION_TYPE
36 FASTPATH_OUTPUT_ACTION_FASTPATH = 0x0,
37 FASTPATH_OUTPUT_ACTION_X224 = 0x3
40 enum FASTPATH_INPUT_ENCRYPTION_FLAGS
42 FASTPATH_INPUT_SECURE_CHECKSUM = 0x1,
43 FASTPATH_INPUT_ENCRYPTED = 0x2
46 enum FASTPATH_OUTPUT_ENCRYPTION_FLAGS
48 FASTPATH_OUTPUT_SECURE_CHECKSUM = 0x1,
49 FASTPATH_OUTPUT_ENCRYPTED = 0x2
52 enum FASTPATH_UPDATETYPE
54 FASTPATH_UPDATETYPE_ORDERS = 0x0,
55 FASTPATH_UPDATETYPE_BITMAP = 0x1,
56 FASTPATH_UPDATETYPE_PALETTE = 0x2,
57 FASTPATH_UPDATETYPE_SYNCHRONIZE = 0x3,
58 FASTPATH_UPDATETYPE_SURFCMDS = 0x4,
59 FASTPATH_UPDATETYPE_PTR_NULL = 0x5,
60 FASTPATH_UPDATETYPE_PTR_DEFAULT = 0x6,
61 FASTPATH_UPDATETYPE_PTR_POSITION = 0x8,
62 FASTPATH_UPDATETYPE_COLOR = 0x9,
63 FASTPATH_UPDATETYPE_CACHED = 0xA,
64 FASTPATH_UPDATETYPE_POINTER = 0xB
67 enum FASTPATH_FRAGMENT
69 FASTPATH_FRAGMENT_SINGLE = 0x0,
70 FASTPATH_FRAGMENT_LAST = 0x1,
71 FASTPATH_FRAGMENT_FIRST = 0x2,
72 FASTPATH_FRAGMENT_NEXT = 0x3
75 enum FASTPATH_OUTPUT_COMPRESSION
77 FASTPATH_OUTPUT_COMPRESSION_USED = 0x2
80 /* FastPath Input Events */
81 enum FASTPATH_INPUT_EVENT_CODE
83 FASTPATH_INPUT_EVENT_SCANCODE = 0x0,
84 FASTPATH_INPUT_EVENT_MOUSE = 0x1,
85 FASTPATH_INPUT_EVENT_MOUSEX = 0x2,
86 FASTPATH_INPUT_EVENT_SYNC = 0x3,
87 FASTPATH_INPUT_EVENT_UNICODE = 0x4
90 /* FastPath Keyboard Event Flags */
91 enum FASTPATH_INPUT_KBDFLAGS
93 FASTPATH_INPUT_KBDFLAGS_RELEASE = 0x01,
94 FASTPATH_INPUT_KBDFLAGS_EXTENDED = 0x02
100 uint8 encryptionFlags;
105 uint16 fastpath_header_length(STREAM* s);
106 uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s);
107 uint16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s);
108 boolean fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s);
109 boolean fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s);
111 STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, uint8 eventFlags, uint8 eventCode);
112 boolean fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s);
114 STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath);
115 boolean fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s);
117 boolean fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, uint16 frameAction, uint32 frameId);
119 rdpFastPath* fastpath_new(rdpRdp* rdp);
120 void fastpath_free(rdpFastPath* fastpath);