Debian Codegraph @

modules/lsp-runtime-lib/include/lsp-plug.in/fmt/xml/const.h

raw
1 /*
2 * Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3 * (C) 2020 Vladimir Sadovnikov <[email protected]>
4 *
5 * This file is part of lsp-runtime-lib
6 * Created on: 24 окт. 2019 г.
7 *
8 * lsp-runtime-lib is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * any later version.
12 *
13 * lsp-runtime-lib is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with lsp-runtime-lib. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 #ifndef LSP_PLUG_IN_FMT_XML_CONST_H_
23 #define LSP_PLUG_IN_FMT_XML_CONST_H_
24
25 #include <lsp-plug.in/runtime/version.h>
26 #include <lsp-plug.in/common/types.h>
27
28 namespace lsp
29 {
30 namespace xml
31 {
32 enum xml_version_t
33 {
34 XML_VERSION_1_0,
35 XML_VERSION_1_1
36 };
37
38 enum xml_token_t
39 {
40 XT_ATTRIBUTE,
41 XT_CDATA,
42 XT_CHARACTERS,
43 XT_COMMENT,
44 XT_DTD,
45 XT_END_DOCUMENT,
46 XT_END_ELEMENT,
47 XT_ENTITY_RESOLVE,
48 XT_PROCESSING_INSTRUCTION,
49 XT_START_DOCUMENT,
50 XT_START_ELEMENT
51 };
52
53 bool is_valid_char(lsp_swchar_t c, xml_version_t version);
54 bool is_name_first(lsp_swchar_t c);
55 bool is_name_next(lsp_swchar_t c);
56 bool is_whitespace(lsp_swchar_t c);
57 bool is_pubid_char(lsp_swchar_t c);
58 bool is_restricted_char(lsp_swchar_t c, xml_version_t version);
59 bool is_encoding_first(lsp_swchar_t c);
60 bool is_encoding_next(lsp_swchar_t c);
61 }
62 }
63
64 #endif /* LSP_PLUG_IN_FMT_XML_CONST_H_ */