yumapro  20.10-14
YumaPro SDK
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 
35 date init comment
36 ----------------------------------------------------------------------
37 30-dec-05 abb Begun
38 11-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
56 extern "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 
110 typedef boolean (*top_handler_t) (ses_cb_t *scb,
111  xml_node_t *top);
112 
113 
117 typedef enum top_mode_t_ {
121 } top_mode_t;
122 
123 
124 /********************************************************************
125 * *
126 * F U N C T I O N S *
127 * *
128 *********************************************************************/
129 
130 
135 extern void
136  top_init (void);
137 
138 
143 extern void
144  top_cleanup (void);
145 
146 
156 extern status_t
157  top_register_node (const xmlChar *owner,
158  const xmlChar *elname,
159  top_handler_t handler,
160  top_mode_t topmode);
161 
162 
174 extern void
175  top_unregister_node (const xmlChar *owner,
176  const xmlChar *elname,
177  top_mode_t topmode);
178 
179 
188 extern top_handler_t
189  top_find_handler (const xmlChar *owner,
190  const xmlChar *elname,
191  top_mode_t topmode);
192 
193 
197 #ifdef __cplusplus
198 } /* end extern 'C' */
199 #endif
200 
201 #endif /* _H_top */
gather node data into a simple struct.
Definition: xml_util.h:203
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:307
void top_init(void)
Initialize the Top Elelment Handler.
Definition: top.c:159
NETCONF Session Common definitions module.
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:202
void top_unregister_node(const xmlChar *owner, const xmlChar *elname, top_mode_t topmode)
Remove a top entry handler function.
Definition: top.c:265
XML Utilities.
boolean(* top_handler_t)(ses_cb_t *scb, xml_node_t *top)
callback function template for a top handler
Definition: top.h:110
top client mode
Definition: top.h:120
top_mode_t
top used by client and server differently yp-controller uses both at the same time ...
Definition: top.h:117
Session Control Block.
Definition: ses.h:542
top server mode
Definition: top.h:119
status_t
global error return code
Definition: status_enum.h:186
not set
Definition: top.h:118
Global error messages for status code enumerations.
void top_cleanup(void)
cleanup Top Element Handler
Definition: top.c:174