Initial commit - from Precise source
[freerdp-ubuntu-pcb-backport.git] / libfreerdp-core / gcc.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * T.124 Generic Conference Control (GCC)
4  *
5  * Copyright 2011 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 __GCC_H
21 #define __GCC_H
22
23 #include "per.h"
24 #include "mcs.h"
25
26 #include <freerdp/freerdp.h>
27 #include <freerdp/settings.h>
28 #include <freerdp/utils/stream.h>
29
30 /* Client to Server (CS) data blocks */
31 #define CS_CORE         0xC001
32 #define CS_SECURITY     0xC002
33 #define CS_NET          0xC003
34 #define CS_CLUSTER      0xC004
35 #define CS_MONITOR      0xC005
36
37 /* Server to Client (SC) data blocks */
38 #define SC_CORE         0x0C01
39 #define SC_SECURITY     0x0C02
40 #define SC_NET          0x0C03
41
42 /* RDP version */
43 #define RDP_VERSION_4           0x00080001
44 #define RDP_VERSION_5_PLUS      0x00080004
45
46 /* Color depth */
47 #define RNS_UD_COLOR_4BPP       0xCA00
48 #define RNS_UD_COLOR_8BPP       0xCA01
49 #define RNS_UD_COLOR_16BPP_555  0xCA02
50 #define RNS_UD_COLOR_16BPP_565  0xCA03
51 #define RNS_UD_COLOR_24BPP      0xCA04
52
53 /* Secure Access Sequence */
54 #define RNS_UD_SAS_DEL          0xAA03
55
56 /* Supported Color Depths */
57 #define RNS_UD_24BPP_SUPPORT    0x0001
58 #define RNS_UD_16BPP_SUPPORT    0x0002
59 #define RNS_UD_15BPP_SUPPORT    0x0004
60 #define RNS_UD_32BPP_SUPPORT    0x0008
61
62 /* Early Capability Flags */
63 #define RNS_UD_CS_SUPPORT_ERRINFO_PDU           0x0001
64 #define RNS_UD_CS_WANT_32BPP_SESSION            0x0002
65 #define RNS_UD_CS_SUPPORT_STATUSINFO_PDU        0x0004
66 #define RNS_UD_CS_STRONG_ASYMMETRIC_KEYS        0x0008
67 #define RNS_UD_CS_VALID_CONNECTION_TYPE         0x0020
68 #define RNS_UD_CS_SUPPORT_MONITOR_LAYOUT_PDU    0x0040
69
70 /* Cluster Information Flags */
71 #define REDIRECTION_SUPPORTED                   0x00000001
72 #define REDIRECTED_SESSIONID_FIELD_VALID        0x00000002
73 #define REDIRECTED_SMARTCARD                    0x00000040
74
75 #define REDIRECTION_VERSION1                    0x00
76 #define REDIRECTION_VERSION2                    0x01
77 #define REDIRECTION_VERSION3                    0x02
78 #define REDIRECTION_VERSION4                    0x03
79 #define REDIRECTION_VERSION5                    0x04
80
81 /* Monitor Flags */
82 #define MONITOR_PRIMARY                         0x00000001
83
84 boolean gcc_read_conference_create_request(STREAM* s, rdpSettings* settings);
85 void gcc_write_conference_create_request(STREAM* s, STREAM* user_data);
86 boolean gcc_read_conference_create_response(STREAM* s, rdpSettings* settings);
87 void gcc_write_conference_create_response(STREAM* s, STREAM* user_data);
88 boolean gcc_read_client_data_blocks(STREAM* s, rdpSettings *settings, int length);
89 void gcc_write_client_data_blocks(STREAM* s, rdpSettings *settings);
90 boolean gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length);
91 void gcc_write_server_data_blocks(STREAM* s, rdpSettings *settings);
92 boolean gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length);
93 void gcc_write_user_data_header(STREAM* s, uint16 type, uint16 length);
94 boolean gcc_read_client_core_data(STREAM* s, rdpSettings *settings, uint16 blockLength);
95 void gcc_write_client_core_data(STREAM* s, rdpSettings *settings);
96 boolean gcc_read_server_core_data(STREAM* s, rdpSettings *settings);
97 void gcc_write_server_core_data(STREAM* s, rdpSettings *settings);
98 boolean gcc_read_client_security_data(STREAM* s, rdpSettings *settings, uint16 blockLength);
99 void gcc_write_client_security_data(STREAM* s, rdpSettings *settings);
100 boolean gcc_read_server_security_data(STREAM* s, rdpSettings *settings);
101 void gcc_write_server_security_data(STREAM* s, rdpSettings *settings);
102 boolean gcc_read_client_network_data(STREAM* s, rdpSettings *settings, uint16 blockLength);
103 void gcc_write_client_network_data(STREAM* s, rdpSettings *settings);
104 boolean gcc_read_server_network_data(STREAM* s, rdpSettings *settings);
105 void gcc_write_server_network_data(STREAM* s, rdpSettings *settings);
106 boolean gcc_read_client_cluster_data(STREAM* s, rdpSettings *settings, uint16 blockLength);
107 void gcc_write_client_cluster_data(STREAM* s, rdpSettings *settings);
108 boolean gcc_read_client_monitor_data(STREAM* s, rdpSettings *settings, uint16 blockLength);
109 void gcc_write_client_monitor_data(STREAM* s, rdpSettings *settings);
110
111 #endif /* __GCC_H */