yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
top.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2021, 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_top
13#define _H_top
14
15/* FILE: top.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
29/*********************************************************************
30* *
31* C H A N G E H I S T O R Y *
32* *
33*********************************************************************
34
35date init comment
36----------------------------------------------------------------------
3730-dec-05 abb Begun
3811-feb-07 abb Move some common fns back to ncx/top.h
39*/
40
41#include <xmlstring.h>
42
43#ifndef _H_ses
44#include "ses.h"
45#endif
46
47#ifndef _H_status
48#include "status.h"
49#endif
50
51#ifndef _H_xml_util
52#include "xml_util.h"
53#endif
54
55#ifdef __cplusplus
56extern "C" {
57#endif
58
59/********************************************************************
60* *
61* C O N S T A N T S *
62* *
63*********************************************************************/
64
65
66/********************************************************************
67* *
68* T Y P E S *
69* *
70*********************************************************************/
71
72/* Header only */
73
110typedef boolean (*top_handler_t) (ses_cb_t *scb,
111 xml_node_t *top);
112
113
114
115
130typedef boolean
132 val_value_t *msgval);
133
134
138typedef enum top_mode_t_ {
143
144
145/********************************************************************
146* *
147* F U N C T I O N S *
148* *
149*********************************************************************/
150
151
156extern void
157 top_init (void);
158
159
164extern void
165 top_cleanup (void);
166
167
177extern status_t
178 top_register_node (const xmlChar *owner,
179 const xmlChar *elname,
180 top_handler_t handler,
181 top_mode_t topmode);
182
183
195extern void
196 top_unregister_node (const xmlChar *owner,
197 const xmlChar *elname,
198 top_mode_t topmode);
199
200
209extern top_handler_t
210 top_find_handler (const xmlChar *owner,
211 const xmlChar *elname,
212 top_mode_t topmode);
213
214
215
225extern status_t
226 top_register_val_node (const xmlChar *owner,
227 const xmlChar *elname,
228 top_val_handler_t handler,
229 top_mode_t topmode);
230
231
243extern void
244 top_unregister_val_node (const xmlChar *owner,
245 const xmlChar *elname,
246 top_mode_t topmode);
247
248
258 top_find_val_handler (const xmlChar *owner,
259 const xmlChar *elname,
260 top_mode_t topmode);
261
262
263
264
268#ifdef __cplusplus
269} /* end extern 'C' */
270#endif
271
272#endif /* _H_top */
status_t
global error return code
Definition: status_enum.h:210
boolean(* top_val_handler_t)(ses_cb_t *scb, val_value_t *msgval)
callback function template for a top VAL handler
Definition: top.h:131
void top_unregister_val_node(const xmlChar *owner, const xmlChar *elname, top_mode_t topmode)
Remove a top entry VAL handler function.
Definition: top.c:424
void top_unregister_node(const xmlChar *owner, const xmlChar *elname, top_mode_t topmode)
Remove a top entry handler function.
Definition: top.c:334
top_mode_t
top used by client and server differently yp-controller uses both at the same time
Definition: top.h:138
void top_init(void)
Initialize the Top Elelment Handler.
Definition: top.c:189
status_t top_register_val_node(const xmlChar *owner, const xmlChar *elname, top_val_handler_t handler, top_mode_t topmode)
Register a top entry VAL handler function.
Definition: top.c:393
void top_cleanup(void)
cleanup Top Element Handler
Definition: top.c:204
top_val_handler_t top_find_val_handler(const xmlChar *owner, const xmlChar *elname, top_mode_t topmode)
Find the top_val_handler in the topQ.
Definition: top.c:460
top_handler_t top_find_handler(const xmlChar *owner, const xmlChar *elname, top_mode_t topmode)
Find the top_handler in the topQ.
Definition: top.c:370
status_t top_register_node(const xmlChar *owner, const xmlChar *elname, top_handler_t handler, top_mode_t topmode)
Register a top entry handler function.
Definition: top.c:303
boolean(* top_handler_t)(ses_cb_t *scb, xml_node_t *top)
callback function template for a top handler
Definition: top.h:110
@ TOP_MODE_NONE
not set
Definition: top.h:139
@ TOP_MODE_CLIENT
top client mode
Definition: top.h:141
@ TOP_MODE_SERVER
top server mode
Definition: top.h:140
NETCONF Session Common definitions module.
Global error messages for status code enumerations.
Session Control Block.
Definition: ses.h:573
one value to match one type
Definition: val.h:912
gather node data into a simple struct.
Definition: xml_util.h:207
XML Utilities.