yumapro  20.10-12
YumaPro SDK
yangconst.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012, YumaWorks, Inc., All Rights Reserved.
4  *
5  * Unless required by applicable law or agreed to in writing,
6  * software distributed under the License is distributed on an
7  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations
10  * under the License.
11  */
12 #ifndef _H_yangconst
13 #define _H_yangconst
14 
15 /* FILE: yangconst.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
27 /*********************************************************************
28 * *
29 * C H A N G E H I S T O R Y *
30 * *
31 *********************************************************************
32 
33 date init comment
34 ----------------------------------------------------------------------
35 27-oct-07 abb Begun; started from ncxconst.h
36 */
37 
38 #include <math.h>
39 #include <xmlstring.h>
40 
41 #include "xmlns.h"
42 #include "status.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /********************************************************************
49 * *
50 * C O N S T A N T S *
51 * *
52 *********************************************************************/
53 
64 #define YANG_URN (const xmlChar *)"urn:ietf:params:xml:ns:yang:1"
65 
67 #define YANG_PREFIX (const xmlChar *)"y"
68 
70 #define YANG_MODULE (const xmlChar *)"yang-attributes"
71 
73 #define YANG_SUFFIX (const xmlChar *)"yang"
74 
76 #define YIN_URN (const xmlChar *)"urn:ietf:params:xml:ns:yang:yin:1"
77 
79 #define YIN_PREFIX (const xmlChar *)"yin"
80 
82 #define YIN_MODULE (const xmlChar *)"yin"
83 
85 #define YIN_SUFFIX (const xmlChar *)"yin"
86 
88 #define YANG_VERSION_STR (const xmlChar *)"1"
89 
91 #define YANG_VERSION_NUM 1
92 
94 #define YANG11_VERSION_STR (const xmlChar *)"1.1"
95 
97 #define YANG11_VERSION_NUM 11
98 
100 #define YANG_FILE_SEPCHAR '@'
101 
103 #define YANG_SII_STRING \
104  (const xmlChar *)"schema-instance-identifier"
105 
108 #define YANG_K_ACTION (const xmlChar *)"action"
109 #define YANG_K_ADD (const xmlChar *)"add"
110 #define YANG_K_AFTER (const xmlChar *)"after"
111 #define YANG_K_ARGUMENT (const xmlChar *)"argument"
112 #define YANG_K_AUGMENT (const xmlChar *)"augment"
113 #define YANG_K_ANYDATA (const xmlChar *)"anydata"
114 #define YANG_K_ANYXML (const xmlChar *)"anyxml"
115 #define YANG_K_BASE (const xmlChar *)"base"
116 #define YANG_K_BEFORE (const xmlChar *)"before"
117 #define YANG_K_BELONGS_TO (const xmlChar *)"belongs-to"
118 #define YANG_K_BIT (const xmlChar *)"bit"
119 #define YANG_K_CASE (const xmlChar *)"case"
120 #define YANG_K_CHOICE (const xmlChar *)"choice"
121 #define YANG_K_CONDITION (const xmlChar *)"condition"
122 #define YANG_K_CONFIG (const xmlChar *)"config"
123 #define YANG_K_CONTACT (const xmlChar *)"contact"
124 #define YANG_K_CONTAINER (const xmlChar *)"container"
125 #define YANG_K_DATE (const xmlChar *)"date"
126 #define YANG_K_DEFAULT (const xmlChar *)"default"
127 #define YANG_K_DELETE (const xmlChar *)"delete"
128 #define YANG_K_DESCRIPTION (const xmlChar *)"description"
129 #define YANG_K_DEVIATE (const xmlChar *)"deviate"
130 #define YANG_K_DEVIATION (const xmlChar *)"deviation"
131 #define YANG_K_DEVIATIONS (const xmlChar *)"deviations"
132 #define YANG_K_ENUM (const xmlChar *)"enum"
133 #define YANG_K_ERROR_APP_TAG (const xmlChar *)"error-app-tag"
134 #define YANG_K_ERROR_MESSAGE (const xmlChar *)"error-message"
135 #define YANG_K_EXTENSION (const xmlChar *)"extension"
136 #define YANG_K_FEATURE (const xmlChar *)"feature"
137 #define YANG_K_FEATURES (const xmlChar *)"features"
138 #define YANG_K_FIRST (const xmlChar *)"first"
139 #define YANG_K_FRACTION_DIGITS (const xmlChar *)"fraction-digits"
140 #define YANG_K_GROUPING (const xmlChar *)"grouping"
141 #define YANG_K_IDENTITY (const xmlChar *)"identity"
142 #define YANG_K_IDENTITYREF (const xmlChar *)"identityref"
143 #define YANG_K_IF_FEATURE (const xmlChar *)"if-feature"
144 #define YANG_K_IMPORT (const xmlChar *)"import"
145 #define YANG_K_INCLUDE (const xmlChar *)"include"
146 #define YANG_K_INFO (const xmlChar *)"info"
147 #define YANG_K_INPUT (const xmlChar *)"input"
148 #define YANG_K_INSERT (const xmlChar *)"insert"
149 #define YANG_K_INVERT_MATCH (const xmlChar *)"invert-match"
150 #define YANG_K_KEY (const xmlChar *)"key"
151 #define YANG_K_LAST (const xmlChar *)"last"
152 #define YANG_K_LEAF (const xmlChar *)"leaf"
153 #define YANG_K_LEAF_LIST (const xmlChar *)"leaf-list"
154 #define YANG_K_LENGTH (const xmlChar *)"length"
155 #define YANG_K_LIST (const xmlChar *)"list"
156 #define YANG_K_MANDATORY (const xmlChar *)"mandatory"
157 #define YANG_K_MAX (const xmlChar *)"max"
158 #define YANG_K_MAX_ELEMENTS (const xmlChar *)"max-elements"
159 #define YANG_K_MIN (const xmlChar *)"min"
160 #define YANG_K_MIN_ELEMENTS (const xmlChar *)"min-elements"
161 #define YANG_K_MODIFIER (const xmlChar *)"modifier"
162 #define YANG_K_MODULE (const xmlChar *)"module"
163 #define YANG_K_MUST (const xmlChar *)"must"
164 #define YANG_K_NAME (const xmlChar *)"name"
165 #define YANG_K_NAMESPACE (const xmlChar *)"namespace"
166 #define YANG_K_NAN (const xmlChar *)"NaN"
167 #define YANG_K_NEGINF (const xmlChar *)"-INF"
168 #define YANG_K_NOTIFICATION (const xmlChar *)"notification"
169 #define YANG_K_NOT_SUPPORTED (const xmlChar *)"not-supported"
170 #define YANG_K_ORDERED_BY (const xmlChar *)"ordered-by"
171 #define YANG_K_ORGANIZATION (const xmlChar *)"organization"
172 #define YANG_K_OUTPUT (const xmlChar *)"output"
173 #define YANG_K_PATH (const xmlChar *)"path"
174 #define YANG_K_PATTERN (const xmlChar *)"pattern"
175 #define YANG_K_POSITION (const xmlChar *)"position"
176 #define YANG_K_POSINF (const xmlChar *)"INF"
177 #define YANG_K_PREFIX (const xmlChar *)"prefix"
178 #define YANG_K_PRESENCE (const xmlChar *)"presence"
179 #define YANG_K_RANGE (const xmlChar *)"range"
180 #define YANG_K_REFERENCE (const xmlChar *)"reference"
181 #define YANG_K_REFINE (const xmlChar *)"refine"
182 #define YANG_K_REPLACE (const xmlChar *)"replace"
183 #define YANG_K_REQUIRE_INSTANCE (const xmlChar *)"require-instance"
184 #define YANG_K_REVISION (const xmlChar *)"revision"
185 #define YANG_K_REVISION_DATE (const xmlChar *)"revision-date"
186 #define YANG_K_RPC (const xmlChar *)"rpc"
187 #define YANG_K_STATUS (const xmlChar *)"status"
188 #define YANG_K_SUBMODULE (const xmlChar *)"submodule"
189 #define YANG_K_SYSTEM (const xmlChar *)"system"
190 #define YANG_K_TAG (const xmlChar *)"tag"
191 #define YANG_K_TEXT (const xmlChar *)"text"
192 #define YANG_K_TARGET_NODE (const xmlChar *)"target-node"
193 #define YANG_K_TYPE (const xmlChar *)"type"
194 #define YANG_K_TYPEDEF (const xmlChar *)"typedef"
195 #define YANG_K_UNBOUNDED (const xmlChar *)"unbounded"
196 #define YANG_K_UNION (const xmlChar *)"union"
197 #define YANG_K_UNIQUE (const xmlChar *)"unique"
198 #define YANG_K_UNITS (const xmlChar *)"units"
199 #define YANG_K_URI (const xmlChar *)"uri"
200 #define YANG_K_USER (const xmlChar *)"user"
201 #define YANG_K_USES (const xmlChar *)"uses"
202 #define YANG_K_VALUE (const xmlChar *)"value"
203 #define YANG_K_WHEN (const xmlChar *)"when"
204 #define YANG_K_YANG_VERSION (const xmlChar *)"yang-version"
205 #define YANG_K_YIN_ELEMENT (const xmlChar *)"yin-element"
206 
213 static inline boolean terminate_parse( status_t res )
214 {
215  return ( res != NO_ERR && ( res < ERR_LAST_SYS_ERR || res==ERR_NCX_EOF ));
216 }
217 
221 #define CHK_EXIT(res, retres) \
222  if (res != NO_ERR) { \
223  if (terminate_parse(res)) { \
224  return res; \
225  } else { \
226  retres = res; \
227  } \
228  }
229 
234 #define NEED_EXIT(res) \
235  ((res == NO_ERR) ? FALSE : \
236  (res < ERR_LAST_SYS_ERR || res==ERR_NCX_EOF) ? \
237  TRUE : FALSE)
238 
239 
242 #ifdef __cplusplus
243 } /* end extern 'C' */
244 #endif
245 
246 #endif /* _H_yangconst */
ERR_LAST_SYS_ERR
@ ERR_LAST_SYS_ERR
124 – not really used
Definition: status_enum.h:236
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
ERR_NCX_EOF
@ ERR_NCX_EOF
244
Definition: status_enum.h:283
xmlns.h
XML namespace support.
status.h
Global error messages for status code enumerations.