yumapro  20.10-12
YumaPro SDK
errmsg_dict.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 - 2021, YumaWorks, Inc., All Rights Reserved.
3  *
4  * Unless required by applicable law or agreed to in writing,
5  * software distributed under the License is distributed on an
6  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
7  * KIND, either express or implied. See the License for the
8  * specific language governing permissions and limitations
9  * under the License.
10  */
11 #ifndef _H_errmsg_dict
12 #define _H_errmsg_dict
13 
14 /* FILE: errmsg_dict.h
15 *********************************************************************
16 * *
17 * P U R P O S E *
18 * *
19 *********************************************************************/
20 
29 /*********************************************************************
30 * *
31 * C H A N G E H I S T O R Y *
32 * *
33 *********************************************************************
34 
35 date init comment
36 ----------------------------------------------------------------------
37 26-mar-18 abb Begun; start from val_tree.c
38 
39 */
40 
41 #include <xmlstring.h>
42 
43 #include "dict.h"
44 #include "ncxtypes.h"
45 #include "status_enum.h"
46 
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 
53 /********************************************************************
54 * *
55 * T Y P E S *
56 * *
57 *********************************************************************/
58 
59 
60 
61 /********************************************************************
62 * *
63 * F U N C T I O N S *
64 * *
65 *********************************************************************/
66 
67 
79 extern void errmsg_dict_init (void);
80 
81 
86 extern void errmsg_dict_cleanup (void);
87 
88 
100 extern status_t
101  errmsg_dict_insert (const xmlChar *lang,
102  ncx_errmsg_t *errmsg);
103 
112 extern ncx_errmsg_t *
113  errmsg_dict_find (const xmlChar *lang,
114  status_t findres);
115 
116 
119 #ifdef __cplusplus
120 } /* end extern 'C' */
121 #endif
122 
123 #endif /* _H_errmsg_dict */
xml_strlen
uint32 xml_strlen(const xmlChar *str)
Get the String len for xmlChar.
Definition: xml_util.c:1406
val.h
Value Node Basic Support.
status_enum.h
global error status code enumerations
ncx_free_errmsg
void ncx_free_errmsg(ncx_errmsg_t *msg)
Clean and free an ncx_errmsg_t struct.
Definition: ncx.c:14536
ERR_NCX_DUP_ENTRY
@ ERR_NCX_DUP_ENTRY
224
Definition: status_enum.h:263
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
val_util.h
Value Node Utilities.
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
errmsg_dict_cleanup
void errmsg_dict_cleanup(void)
Cleanup this module.
Definition: errmsg_dict.c:244
errmsg_dict_insert
status_t errmsg_dict_insert(const xmlChar *lang, ncx_errmsg_t *errmsg)
Add a list entry to the errmsg_dict.
Definition: errmsg_dict.c:268
errmsg_dict_find
ncx_errmsg_t * errmsg_dict_find(const xmlChar *lang, status_t findres)
Find a value node from the specified language tree.
Definition: errmsg_dict.c:315
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
errmsg_dict_init
void errmsg_dict_init(void)
Initialize this module.
Definition: errmsg_dict.c:226
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
MAX_LANG_TAGLEN
#define MAX_LANG_TAGLEN
Max length of language tag accepted.
Definition: ncxconst.h:298
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
xml_strcpy
uint32 xml_strcpy(xmlChar *copyTo, const xmlChar *copyFrom)
String copy for xmlChar.
Definition: xml_util.c:1486
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
ncx.h
YANG module utility functions.
obj.h
Data Object Support.
dlq_enque
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:246
dlq.h
dlq provides general double-linked list and queue support:
errmsg_dict.h
AVL Tree storage of Language Specific Error Messages.