xref: /freebsd-13-stable/contrib/subversion/subversion/include/svn_types_impl.h (revision b7ec5dea64b6513b41316a38cc72efa9139bc4ae)
1 /**
2  * @copyright
3  * ====================================================================
4  *    Licensed to the Apache Software Foundation (ASF) under one
5  *    or more contributor license agreements.  See the NOTICE file
6  *    distributed with this work for additional information
7  *    regarding copyright ownership.  The ASF licenses this file
8  *    to you under the Apache License, Version 2.0 (the
9  *    "License"); you may not use this file except in compliance
10  *    with the License.  You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  *    Unless required by applicable law or agreed to in writing,
15  *    software distributed under the License is distributed on an
16  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  *    KIND, either express or implied.  See the License for the
18  *    specific language governing permissions and limitations
19  *    under the License.
20  * ====================================================================
21  * @endcopyright
22  *
23  * @file svn_types_impl.h
24  * @brief Subversion's data types (common implementation)
25  *
26  * @warning This is a @b private implementation-specific header file.
27  *          User code should include @ref svn_types.h instead.
28  */
29 
30 /* NOTE:
31  * This file *must not* include or depend on any other header except
32  * the C standard library headers.
33  */
34 
35 #ifndef SVN_TYPES_IMPL_H
36 #define SVN_TYPES_IMPL_H
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif /* __cplusplus */
41 
42 
43 #ifndef DOXYGEN
44 /* Forward declaration of the error object. */
45 struct svn_error_t;
46 #endif
47 
48 
49 /** The various types of nodes in the Subversion filesystem. */
50 typedef enum svn_node_kind_t
51 {
52   /** absent */
53   svn_node_none,
54 
55   /** regular file */
56   svn_node_file,
57 
58   /** directory */
59   svn_node_dir,
60 
61   /** something's here, but we don't know what */
62   svn_node_unknown,
63 
64   /**
65    * symbolic link
66    * @note This value is not currently used by the public API.
67    * @since New in 1.8.
68    */
69   svn_node_symlink
70 } svn_node_kind_t;
71 
72 
73 /** Generic three-state property to represent an unknown value for values
74  * that are just like booleans.  The values have been set deliberately to
75  * make tristates disjoint from #svn_boolean_t.
76  *
77  * @note It is unsafe to use apr_pcalloc() to allocate these, since '0' is
78  * not a valid value.
79  *
80  * @since New in 1.7. */
81 /* NOTE: Update svnxx/tristate.hpp when changing this enum. */
82 typedef enum svn_tristate_t
83 {
84   /** state known to be false (the constant does not evaulate to false) */
85   svn_tristate_false = 2,
86   /** state known to be true */
87   svn_tristate_true,
88   /** state could be true or false */
89   svn_tristate_unknown
90 } svn_tristate_t;
91 
92 
93 /** A revision number. */
94 /* NOTE: Update svnxx/revision.hpp when changing this typedef. */
95 typedef long int svn_revnum_t;
96 
97 /** The 'official' invalid revision number. */
98 /* NOTE: Update svnxx/revision.hpp when changing this definition. */
99 #define SVN_INVALID_REVNUM ((svn_revnum_t) -1)
100 
101 
102 /** The concept of depth for directories.
103  *
104  * @note This is similar to, but not exactly the same as, the WebDAV
105  * and LDAP concepts of depth.
106  *
107  * @since New in 1.5.
108  */
109 /* NOTE: Update svnxx/depth.hpp when changing this enum. */
110 typedef enum svn_depth_t
111 {
112   /* The order of these depths is important: the higher the number,
113      the deeper it descends.  This allows us to compare two depths
114      numerically to decide which should govern. */
115 
116   /** Depth undetermined or ignored.  In some contexts, this means the
117       client should choose an appropriate default depth.  The server
118       will generally treat it as #svn_depth_infinity. */
119   svn_depth_unknown    = -2,
120 
121   /** Exclude (i.e., don't descend into) directory D.
122       @note In Subversion 1.5, svn_depth_exclude is *not* supported
123       anywhere in the client-side (libsvn_wc/libsvn_client/etc) code;
124       it is only supported as an argument to set_path functions in the
125       ra and repos reporters.  (This will enable future versions of
126       Subversion to run updates, etc, against 1.5 servers with proper
127       svn_depth_exclude behavior, once we get a chance to implement
128       client-side support for svn_depth_exclude.)
129   */
130   svn_depth_exclude    = -1,
131 
132   /** Just the named directory D, no entries.  Updates will not pull in
133       any files or subdirectories not already present. */
134   svn_depth_empty      =  0,
135 
136   /** D + its file children, but not subdirs.  Updates will pull in any
137       files not already present, but not subdirectories. */
138   svn_depth_files      =  1,
139 
140   /** D + immediate children (D and its entries).  Updates will pull in
141       any files or subdirectories not already present; those
142       subdirectories' this_dir entries will have depth-empty. */
143   svn_depth_immediates =  2,
144 
145   /** D + all descendants (full recursion from D).  Updates will pull
146       in any files or subdirectories not already present; those
147       subdirectories' this_dir entries will have depth-infinity.
148       Equivalent to the pre-1.5 default update behavior. */
149   svn_depth_infinity   =  3
150 
151 } svn_depth_t;
152 
153 #ifdef __cplusplus
154 }
155 #endif /* __cplusplus */
156 
157 #endif /* SVN_TYPES_IMPL_H */
158