Webdar 1.0.0
Web user interface to libdar
tokens.hpp
1/*********************************************************************/
2// webdar - a web server and interface program to libdar
3// Copyright (C) 2013-2025 Denis Corbin
4//
5// This file is part of Webdar
6//
7// Webdar is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// Webdar is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with Webdar. If not, see <http://www.gnu.org/licenses/>
19//
20//----
21// to contact the author: dar.linux@free.fr
22/*********************************************************************/
23
24#ifndef TOKENS_HPP
25#define TOKENS_HPP
26
27#include "my_config.h"
28
29 // C system header files
30
31extern "C"
32{
33
34}
35 // C++ system header files
36#include <dar/libdar.hpp>
37
38 // webdar headers
39
40
41 // WEBDAR Version
42#ifndef WEBDAR_VERSION
43#define WEBDAR_VERSION "unknown (BUG at compilation time?)"
44#endif
45
46 // DAR archive extension
47extern const char* EXTENSION;
48
49 // the different answer codes
50const unsigned int STATUS_CODE_CONTINUE = 101;
51const unsigned int STATUS_CODE_SWITCHING_PROTOCOLS = 101;
52const unsigned int STATUS_CODE_OK = 200;
53const unsigned int STATUS_CODE_CREATED = 201;
54const unsigned int STATUS_CODE_ACCEPTED = 202;
55const unsigned int STATUS_CODE_NON_AUTHORITATIVE_INFORMATION = 203;
56const unsigned int STATUS_CODE_NO_CONTENT = 204;
57const unsigned int STATUS_CODE_RESET_CONTENT = 205;
58const unsigned int STATUS_CODE_PARTIAL_CONTENT = 206;
59const unsigned int STATUS_CODE_MULTIPLE_CHOICES = 300;
60const unsigned int STATUS_CODE_MOVED_PERMANENTLY = 301;
61const unsigned int STATUS_CODE_MOVED_TEMPORARILY = 302;
62const unsigned int STATUS_CODE_NOT_MODIFIED = 304;
63const unsigned int STATUS_CODE_USE_PROXY = 305;
64const unsigned int STATUS_CODE_BAD_REQUEST = 400;
65const unsigned int STATUS_CODE_UNAUTHORIZED = 401;
66const unsigned int STATUS_CODE_FORBIDDEN = 403;
67const unsigned int STATUS_CODE_NOT_FOUND = 404;
68const unsigned int STATUS_CODE_METHOD_NOT_ALLOWED = 405;
69const unsigned int STATUS_CODE_NOT_ACCEPTABLE = 406;
70const unsigned int STATUS_CODE_PROXY_AUTHENTICATION_REQUIRED = 407;
71const unsigned int STATUS_CODE_REQUEST_TIME_OUT = 408;
72const unsigned int STATUS_CODE_CONFLICT = 409;
73const unsigned int STATUS_CODE_GONE = 410;
74const unsigned int STATUS_CODE_LENGTH_REQUIRED = 411;
75const unsigned int STATUS_CODE_PRECONDITION_FAILED = 412;
76const unsigned int STATUS_CODE_REQUEST_ENTITY_TOO_LARGE = 413;
77const unsigned int STATUS_CODE_REQUEST_URI_TOO_LARGE = 414;
78const unsigned int STATUS_CODE_UNSUPPORTED_MEDIA_TYPE = 415;
79const unsigned int STATUS_CODE_EXPECTATION_FAILED = 417;
80const unsigned int STATUS_CODE_INTERNAL_SERVER_ERROR = 500;
81const unsigned int STATUS_CODE_NOT_IMPLEMENTED = 501;
82const unsigned int STATUS_CODE_BAD_GATEWAY = 502;
83const unsigned int STATUS_CODE_SERVICE_UNAVAILABLE = 503;
84const unsigned int STATUS_CODE_GATEWAY_TIME_OUT = 504;
85const unsigned int STATUS_CODE_HTTP_VERSION_NOT_SUPPORTED = 505;
86
87
88 // HTTP headers
89
90extern const char* HDR_CONTENT_LENGTH;
91extern const char* HDR_IF_MODIFIED_SINCE;
92extern const char* HDR_LAST_MODIFIED;
93extern const char* HDR_CONTENT_TYPE;
94extern const char* HDR_DATE;
95extern const char* HDR_EXPIRES;
96extern const char* HDR_SERVER;
97extern const char* HDR_WWW_AUTHENTICATE;
98extern const char* HDR_AUTHORIZATION;
99extern const char* HDR_SET_COOKIE;
100extern const char* HDR_COOKIE;
101extern const char* HDR_LOCATION;
102
103 // HTTP header values
104extern const char* VAL_CONTENT_TYPE_FORM;
105
106
107 // HTML CSS colors by fonction
108extern const char* COLOR_BACK;
109extern const char* COLOR_TEXT;
110extern const char* COLOR_PADBACK;
111extern const char* COLOR_PADFRONT;
112extern const char* COLOR_PADBORD;
113extern const char* COLOR_MENU_FRONT_ON;
114extern const char* COLOR_MENU_BACK_ON;
115extern const char* COLOR_MENU_BORDER_ON;
116extern const char* COLOR_MENU_FRONT_OFF;
117extern const char* COLOR_MENU_BACK_OFF;
118extern const char* COLOR_MENU_BORDER_OFF;
119extern const char* COLOR_MENU_FRONT_GREY;
120extern const char* COLOR_MENU_BACK_GREY;
121extern const char* COLOR_MENU_BORDER_GREY;
122extern const char* COLOR_MENU_FRONT_HOVER_ON;
123extern const char* COLOR_MENU_FRONT_HOVER_OFF;
124extern const char* COLOR_MENU_FRONT_HOVER_GREY;
125extern const char* COLOR_MENU_FRONT_ACTIVE_ON;
126extern const char* COLOR_MENU_FRONT_ACTIVE_OFF;
127extern const char* COLOR_MENU_FRONT_ACTIVE_GREY;
128extern const char* COLOR_TOPBAR_BACK;
129
130extern const char* COLOR_ARED; // almost red
131extern const char* RED;
132extern const char* WHITE;
133extern const char* GREEN;
134extern const char* BLACK;
135extern const char* COLOR_DAR_GREYBLUE;
136
137extern const char* STATIC_PATH_ID;
138extern const char* STATIC_OBJ_LICENSING;
139extern const char* STATIC_LOGO;
140extern const char* STATIC_TITLE_LOGO;
141extern const char* STATIC_FAVICON;
142
143
144 // Webdar chosen min & max values
145extern const libdar::U_I tokens_min_compr_bs;
146
147#endif