]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/protocols/include/FreeRTOS_HTTP_commands.h
e8f6567b7787ba5977b4cd69430d1f03aac954ea
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-TCP / protocols / include / FreeRTOS_HTTP_commands.h
1 /*\r
2  * FreeRTOS+TCP Labs Build 160919 (C) 2016 Real Time Engineers ltd.\r
3  * Authors include Hein Tibosch and Richard Barry\r
4  *\r
5  *******************************************************************************\r
6  ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ***\r
7  ***                                                                         ***\r
8  ***                                                                         ***\r
9  ***   FREERTOS+TCP IS STILL IN THE LAB (mainly because the FTP and HTTP     ***\r
10  ***   demos have a dependency on FreeRTOS+FAT, which is only in the Labs    ***\r
11  ***   download):                                                            ***\r
12  ***                                                                         ***\r
13  ***   FreeRTOS+TCP is functional and has been used in commercial products   ***\r
14  ***   for some time.  Be aware however that we are still refining its       ***\r
15  ***   design, the source code does not yet quite conform to the strict      ***\r
16  ***   coding and style standards mandated by Real Time Engineers ltd., and  ***\r
17  ***   the documentation and testing is not necessarily complete.            ***\r
18  ***                                                                         ***\r
19  ***   PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE    ***\r
20  ***   URL: http://www.FreeRTOS.org/contact  Active early adopters may, at   ***\r
21  ***   the sole discretion of Real Time Engineers Ltd., be offered versions  ***\r
22  ***   under a license other than that described below.                      ***\r
23  ***                                                                         ***\r
24  ***                                                                         ***\r
25  ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ***\r
26  *******************************************************************************\r
27  *\r
28  * FreeRTOS+TCP can be used under two different free open source licenses.  The\r
29  * license that applies is dependent on the processor on which FreeRTOS+TCP is\r
30  * executed, as follows:\r
31  *\r
32  * If FreeRTOS+TCP is executed on one of the processors listed under the Special\r
33  * License Arrangements heading of the FreeRTOS+TCP license information web\r
34  * page, then it can be used under the terms of the FreeRTOS Open Source\r
35  * License.  If FreeRTOS+TCP is used on any other processor, then it can be used\r
36  * under the terms of the GNU General Public License V2.  Links to the relevant\r
37  * licenses follow:\r
38  *\r
39  * The FreeRTOS+TCP License Information Page: http://www.FreeRTOS.org/tcp_license\r
40  * The FreeRTOS Open Source License: http://www.FreeRTOS.org/license\r
41  * The GNU General Public License Version 2: http://www.FreeRTOS.org/gpl-2.0.txt\r
42  *\r
43  * FreeRTOS+TCP is distributed in the hope that it will be useful.  You cannot\r
44  * use FreeRTOS+TCP unless you agree that you use the software 'as is'.\r
45  * FreeRTOS+TCP is provided WITHOUT ANY WARRANTY; without even the implied\r
46  * warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR\r
47  * PURPOSE. Real Time Engineers Ltd. disclaims all conditions and terms, be they\r
48  * implied, expressed, or statutory.\r
49  *\r
50  * 1 tab == 4 spaces!\r
51  *\r
52  * http://www.FreeRTOS.org\r
53  * http://www.FreeRTOS.org/plus\r
54  * http://www.FreeRTOS.org/labs\r
55  *\r
56  */\r
57 #ifndef FREERTOS_HTTP_COMMANDS_H\r
58 #define FREERTOS_HTTP_COMMANDS_H\r
59 \r
60 enum {\r
61         WEB_REPLY_OK = 200,\r
62         WEB_NO_CONTENT = 204,\r
63         WEB_BAD_REQUEST = 400,\r
64         WEB_UNAUTHORIZED = 401,\r
65         WEB_NOT_FOUND = 404,\r
66         WEB_GONE = 410,\r
67         WEB_PRECONDITION_FAILED = 412,\r
68         WEB_INTERNAL_SERVER_ERROR = 500,\r
69 };\r
70 \r
71 enum EWebCommand {\r
72         ECMD_GET,\r
73         ECMD_HEAD,\r
74         ECMD_POST,\r
75         ECMD_PUT,\r
76         ECMD_DELETE,\r
77         ECMD_TRACE,\r
78         ECMD_OPTIONS,\r
79         ECMD_CONNECT,\r
80         ECMD_PATCH,\r
81         ECMD_UNK,\r
82 };\r
83 \r
84 struct xWEB_COMMAND\r
85 {\r
86         BaseType_t xCommandLength;\r
87         const char *pcCommandName;\r
88         const unsigned char ucCommandType;\r
89 };\r
90 \r
91 #define WEB_CMD_COUNT   (ECMD_UNK+1)\r
92 \r
93 extern const struct xWEB_COMMAND xWebCommands[WEB_CMD_COUNT];\r
94 \r
95 extern const char *webCodename (int aCode);\r
96 \r
97 #endif  /* FREERTOS_HTTP_COMMANDS_H */\r
98 \r
99 \r