Initial commit - from Precise source
[freerdp-ubuntu-pcb-backport.git] / libfreerdp-core / errinfo.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * Error Info
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 __ERRINFO_H
21 #define __ERRINFO_H
22
23 #include <freerdp/freerdp.h>
24
25 /* Protocol-independent codes */
26 #define ERRINFO_RPC_INITIATED_DISCONNECT                        0x00000001
27 #define ERRINFO_RPC_INITIATED_LOGOFF                            0x00000002
28 #define ERRINFO_IDLE_TIMEOUT                                    0x00000003
29 #define ERRINFO_LOGON_TIMEOUT                                   0x00000004
30 #define ERRINFO_DISCONNECTED_BY_OTHER_CONNECTION                0x00000005
31 #define ERRINFO_OUT_OF_MEMORY                                   0x00000006
32 #define ERRINFO_SERVER_DENIED_CONNECTION                        0x00000007
33 #define ERRINFO_SERVER_INSUFFICIENT_PRIVILEGES                  0x00000009
34 #define ERRINFO_SERVER_FRESH_CREDENTIALS_REQUIRED               0x0000000A
35 #define ERRINFO_RPC_INITIATED_DISCONNECT_BY_USER                0x0000000B
36
37 /* Protocol-independent licensing codes */
38 #define ERRINFO_LICENSE_INTERNAL                                0x00000100
39 #define ERRINFO_LICENSE_NO_LICENSE_SERVER                       0x00000101
40 #define ERRINFO_LICENSE_NO_LICENSE                              0x00000102
41 #define ERRINFO_LICENSE_BAD_CLIENT_MSG                          0x00000103
42 #define ERRINFO_LICENSE_HWID_DOESNT_MATCH_LICENSE               0x00000104
43 #define ERRINFO_LICENSE_BAD_CLIENT_LICENSE                      0x00000105
44 #define ERRINFO_LICENSE_CANT_FINISH_PROTOCOL                    0x00000106
45 #define ERRINFO_LICENSE_CLIENT_ENDED_PROTOCOL                   0x00000107
46 #define ERRINFO_LICENSE_BAD_CLIENT_ENCRYPTION                   0x00000108
47 #define ERRINFO_LICENSE_CANT_UPGRADE_LICENSE                    0x00000109
48 #define ERRINFO_LICENSE_NO_REMOTE_CONNECTIONS                   0x0000010A
49
50 /* RDP specific codes */
51 #define ERRINFO_UNKNOWN_DATA_PDU_TYPE                           0x000010C9
52 #define ERRINFO_UNKNOWN_PDU_TYPE                                0x000010CA
53 #define ERRINFO_DATA_PDU_SEQUENCE                               0x000010CB
54 #define ERRINFO_CONTROL_PDU_SEQUENCE                            0x000010CD
55 #define ERRINFO_INVALID_CONTROL_PDU_ACTION                      0x000010CE
56 #define ERRINFO_INVALID_INPUT_PDU_TYPE                          0x000010CF
57 #define ERRINFO_INVALID_INPUT_PDU_MOUSE                         0x000010D0
58 #define ERRINFO_INVALID_REFRESH_RECT_PDU                        0x000010D1
59 #define ERRINFO_CREATE_USER_DATA_FAILED                         0x000010D2
60 #define ERRINFO_CONNECT_FAILED                                  0x000010D3
61 #define ERRINFO_CONFIRM_ACTIVE_HAS_WRONG_SHAREID                0x000010D4
62 #define ERRINFO_CONFIRM_ACTIVE_HAS_WRONG_ORIGINATOR             0x000010D5
63 #define ERRINFO_PERSISTENT_KEY_PDU_BAD_LENGTH                   0x000010DA
64 #define ERRINFO_PERSISTENT_KEY_PDU_ILLEGAL_FIRST                0x000010DB
65 #define ERRINFO_PERSISTENT_KEY_PDU_TOO_MANY_TOTAL_KEYS          0x000010DC
66 #define ERRINFO_PERSISTENT_KEY_PDU_TOO_MANY_CACHE_KEYS          0x000010DD
67 #define ERRINFO_INPUT_PDU_BAD_LENGTH                            0x000010DE
68 #define ERRINFO_BITMAP_CACHE_ERROR_PDU_BAD_LENGTH               0x000010DF
69 #define ERRINFO_SECURITY_DATA_TOO_SHORT                         0x000010E0
70 #define ERRINFO_VCHANNEL_DATA_TOO_SHORT                         0x000010E1
71 #define ERRINFO_SHARE_DATA_TOO_SHORT                            0x000010E2
72 #define ERRINFO_BAD_SUPPRESS_OUTPUT_PDU                         0x000010E3
73 #define ERRINFO_CONFIRM_ACTIVE_PDU_TOO_SHORT                    0x000010E5
74 #define ERRINFO_CAPABILITY_SET_TOO_SMALL                        0x000010E7
75 #define ERRINFO_CAPABILITY_SET_TOO_LARGE                        0x000010E8
76 #define ERRINFO_NO_CURSOR_CACHE                                 0x000010E9
77 #define ERRINFO_BAD_CAPABILITIES                                0x000010EA
78 #define ERRINFO_VIRTUAL_CHANNEL_DECOMPRESSION                   0x000010EC
79 #define ERRINFO_INVALID_VC_COMPRESSION_TYPE                     0x000010ED
80 #define ERRINFO_INVALID_CHANNEL_ID                              0x000010EF
81 #define ERRINFO_VCHANNELS_TOO_MANY                              0x000010F0
82 #define ERRINFO_REMOTEAPP_NOT_ENABLED                           0x000010F3
83 #define ERRINFO_CACHE_CAP_NOT_SET                               0x000010F4
84 #define ERRINFO_BITMAP_CACHE_ERROR_PDU_BAD_LENGTH2              0x000010F5
85 #define ERRINFO_OFFSCREEN_CACHE_ERROR_PDU_BAD_LENGTH            0x000010F6
86 #define ERRINFO_DRAWNINEGRID_CACHE_ERROR_PDU_BAD_LENGTH         0x000010F7
87 #define ERRINFO_GDIPLUS_PDU_BAD_LENGTH                          0x000010F8
88 #define ERRINFO_SECURITY_DATA_TOO_SHORT2                        0x00001111
89 #define ERRINFO_SECURITY_DATA_TOO_SHORT3                        0x00001112
90 #define ERRINFO_SECURITY_DATA_TOO_SHORT4                        0x00001113
91 #define ERRINFO_SECURITY_DATA_TOO_SHORT5                        0x00001114
92 #define ERRINFO_SECURITY_DATA_TOO_SHORT6                        0x00001115
93 #define ERRINFO_SECURITY_DATA_TOO_SHORT7                        0x00001116
94 #define ERRINFO_SECURITY_DATA_TOO_SHORT8                        0x00001117
95 #define ERRINFO_SECURITY_DATA_TOO_SHORT9                        0x00001118
96 #define ERRINFO_SECURITY_DATA_TOO_SHORT10                       0x00001119
97 #define ERRINFO_SECURITY_DATA_TOO_SHORT11                       0x0000111A
98 #define ERRINFO_SECURITY_DATA_TOO_SHORT12                       0x0000111B
99 #define ERRINFO_SECURITY_DATA_TOO_SHORT13                       0x0000111C
100 #define ERRINFO_SECURITY_DATA_TOO_SHORT14                       0x0000111D
101 #define ERRINFO_SECURITY_DATA_TOO_SHORT15                       0x0000111E
102 #define ERRINFO_SECURITY_DATA_TOO_SHORT16                       0x0000111F
103 #define ERRINFO_SECURITY_DATA_TOO_SHORT17                       0x00001120
104 #define ERRINFO_SECURITY_DATA_TOO_SHORT18                       0x00001121
105 #define ERRINFO_SECURITY_DATA_TOO_SHORT19                       0x00001122
106 #define ERRINFO_SECURITY_DATA_TOO_SHORT20                       0x00001123
107 #define ERRINFO_SECURITY_DATA_TOO_SHORT21                       0x00001124
108 #define ERRINFO_SECURITY_DATA_TOO_SHORT22                       0x00001125
109 #define ERRINFO_SECURITY_DATA_TOO_SHORT23                       0x00001126
110 #define ERRINFO_BAD_MONITOR_DATA                                0x00001129
111 #define ERRINFO_VC_DECOMPRESSED_REASSEMBLE_FAILED               0x0000112A
112 #define ERRINFO_VC_DATA_TOO_LONG                                0x0000112B
113 #define ERRINFO_GRAPHICS_MODE_NOT_SUPPORTED                     0x0000112D
114 #define ERRINFO_GRAPHICS_SUBSYSTEM_RESET_FAILED                 0x0000112E
115 #define ERRINFO_UPDATE_SESSION_KEY_FAILED                       0x00001191
116 #define ERRINFO_DECRYPT_FAILED                                  0x00001192
117 #define ERRINFO_ENCRYPT_FAILED                                  0x00001193
118 #define ERRINFO_ENCRYPTION_PACKAGE_MISMATCH                     0x00001194
119 #define ERRINFO_DECRYPT_FAILED2                                 0x00001195
120
121 #define ERRINFO_SUCCESS                                         0x00000000
122 #define ERRINFO_NONE                                            0xFFFFFFFF
123
124 struct _ERRINFO
125 {
126         uint32 code;
127         char* name;
128         char* info;
129 };
130 typedef struct _ERRINFO ERRINFO;
131
132 #define ERRINFO_DEFINE(_code)   { ERRINFO_##_code , "ERRINFO_" #_code , ERRINFO_##_code##_STRING }
133
134 void rdp_print_errinfo(uint32 code);
135
136 #endif