2 * ====================================================================
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
19 * ====================================================================
21 * This header is parsed by transform-sql.py to allow SQLite
22 * statements to refer to string values by symbolic names.
25 #ifndef SVN_WC_TOKEN_MAP_H
26 #define SVN_WC_TOKEN_MAP_H
28 #include "svn_types.h"
30 #include "private/svn_token.h"
36 /* The kind values used on NODES */
37 static const svn_token_map_t kind_map[] = {
38 { "file", svn_node_file }, /* MAP_FILE */
39 { "dir", svn_node_dir }, /* MAP_DIR */
40 { "symlink", svn_node_symlink }, /* MAP_SYMLINK */
41 { "unknown", svn_node_unknown }, /* MAP_UNKNOWN */
45 /* Like kind_map, but also supports 'none' */
46 static const svn_token_map_t kind_map_none[] = {
47 { "none", svn_node_none },
48 { "file", svn_node_file },
49 { "dir", svn_node_dir },
50 { "symlink", svn_node_symlink },
51 { "unknown", svn_node_unknown },
55 /* Note: we only decode presence values from the database. These are a
56 subset of all the status values. */
57 static const svn_token_map_t presence_map[] = {
58 { "normal", svn_wc__db_status_normal }, /* MAP_NORMAL */
59 { "server-excluded", svn_wc__db_status_server_excluded }, /* MAP_SERVER_EXCLUDED */
60 { "excluded", svn_wc__db_status_excluded }, /* MAP_EXCLUDED */
61 { "not-present", svn_wc__db_status_not_present }, /* MAP_NOT_PRESENT */
62 { "incomplete", svn_wc__db_status_incomplete }, /* MAP_INCOMPLETE */
63 { "base-deleted", svn_wc__db_status_base_deleted }, /* MAP_BASE_DELETED */
67 /* The subset of svn_depth_t used in the database. */
68 static const svn_token_map_t depth_map[] = {
69 { "unknown", svn_depth_unknown }, /* MAP_DEPTH_UNKNOWN */
70 { "empty", svn_depth_empty },
71 { "files", svn_depth_files },
72 { "immediates", svn_depth_immediates },
73 { "infinity", svn_depth_infinity }, /* MAP_DEPTH_INFINITY */