yumapro  25.10-2
YumaPro SDK
Loading...
Searching...
No Matches
agt_hook_util.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2025, 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_agt_hook_util
13#define _H_agt_hook_util
14
15/* FILE: agt_hook_util.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
28/*********************************************************************
29* *
30* C H A N G E H I S T O R Y *
31* *
32*********************************************************************
33
34date init comment
35----------------------------------------------------------------------
3604-jan-16 ma Begun
37
38
39*********************************************************************
40* *
41* I N C L U D E F I L E S *
42* *
43*********************************************************************/
44#ifndef _H_status
45#include "status.h"
46#endif
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52
94/********************************************************************
95* *
96* T Y P E S *
97* *
98*********************************************************************/
99
100/* Do NOT include agt_cb.h here because agt_cb.h already includes
101 * agt_hook_util.h and that creates an include cycle.
102 *
103 * Just forward-declare the struct so we can use pointers to it.
104 */
105struct agt_cb_fnset_t_; /* full definition lives in agt_cb.h */
106struct agt_cfg_transaction_t_; /* full definition lives in agt_cfg.h */
107
108
110typedef enum agt_hook_fmt_t_ {
115
116
117/********************************************************************
118* *
119* F U N C T I O N S *
120* *
121*********************************************************************/
122
123
130extern boolean
132
133
140extern boolean
142
143
150extern const xmlChar *
152
153
160extern agt_hook_type_t
161 agt_hook_get_type_enum (const xmlChar *type);
162
163
170extern const xmlChar *
172
173
180extern agt_hook_fmt_t
181 agt_hook_get_format_enum (const xmlChar *format);
182
183
193extern status_t
195 agt_hook_fmt_t format,
196 agt_hook_type_t type,
197 const xmlChar *defpath);
198
199
209extern status_t
211 const xmlChar *defpath);
212
213
221extern status_t
223 const xmlChar *defpath);
224
225
233extern boolean
235
236
244extern boolean
246
247
255extern boolean
257
258
266extern boolean
268
269
277extern boolean
279
280
281#ifdef WITH_YCONTROL
290extern status_t
291 agt_hook_post_sethook_subsys_register (const xmlChar *subsys_id,
292 const xmlChar *defpath);
293
294
305extern status_t
306 agt_hook_hooks_subsys_register (const xmlChar *subsys_id,
307 const xmlChar *defpath,
308 agt_hook_fmt_t format,
309 agt_hook_type_t type);
310#endif // WITH_YCONTROL
311
312
321extern boolean
322 agt_hook_skip_sethook (struct agt_cfg_transaction_t_ *txcb,
323 struct agt_cb_fnset_t_ *cbset);
324
325
329#ifdef __cplusplus
330} /* end extern 'C' */
331#endif
332
333#endif // _H_agt_hook_util
status_t agt_hook_order_obj_ok(obj_template_t *obj, const xmlChar *defpath)
Check if format of the callback is acceptable for the object.
Definition: agt_hook_util.c:396
status_t agt_hook_post_sethook_subsys_register(const xmlChar *subsys_id, const xmlChar *defpath)
Register an object specific SIL-SA Post Set Hook callback function.
Definition: agt_hook_util.c:689
boolean agt_hook_type_valid(agt_hook_type_t type)
Verify that the hook TYPE is valid.
Definition: agt_hook_util.c:155
boolean agt_hooks_callback_set(obj_template_t *obj)
Check if an any Hook callback is registered for this object for SIL-SA usage.
Definition: agt_hook_util.c:499
const xmlChar * agt_hook_get_format_name(agt_hook_fmt_t format)
Get the keyword for the specified agt_hook_fmt_t enumeration.
Definition: agt_hook_util.c:280
agt_hook_fmt_t
different hook formats dictates specific hook functionality
Definition: agt_hook_util.h:110
boolean agt_hook_fmt_valid(agt_hook_fmt_t format)
Verify that the hook format is valid.
Definition: agt_hook_util.c:191
status_t agt_hook_obj_ok(obj_template_t *obj, agt_hook_fmt_t format, agt_hook_type_t type, const xmlChar *defpath)
Check if format of the callback is acceptable for the object.
Definition: agt_hook_util.c:336
agt_hook_type_t agt_hook_get_type_enum(const xmlChar *type)
Get agt_hook_fmt_t enumeration structure from specified string.
Definition: agt_hook_util.c:251
boolean agt_hook_subtree_format(obj_template_t *obj)
Check if an Transaction Hook callback is registered for this object for SIL-SA usage.
Definition: agt_hook_util.c:645
agt_hook_fmt_t agt_hook_get_format_enum(const xmlChar *format)
Get agt_hook_fmt_t enumeration structure from specified string.
Definition: agt_hook_util.c:307
status_t agt_hook_hooks_subsys_register(const xmlChar *subsys_id, const xmlChar *defpath, agt_hook_fmt_t format, agt_hook_type_t type)
Register an object specific SIL-SA Post Set Hook callback function.
Definition: agt_hook_util.c:786
boolean agt_hook_skip_sethook(struct agt_cfg_transaction_t_ *txcb, struct agt_cb_fnset_t_ *cbset)
Check if a Set-Hook callback have to be skpped or not.
Definition: agt_hook_util.c:948
status_t agt_hook_post_sethook_obj_ok(obj_template_t *obj, const xmlChar *defpath)
Check if format of the callback is acceptable for the object.
Definition: agt_hook_util.c:445
const xmlChar * agt_hook_get_type_name(agt_hook_type_t type)
Get the keyword for the specified agt_hook_type_t enumeration.
Definition: agt_hook_util.c:222
boolean agt_txhook_callback_set(obj_template_t *obj)
Check if an Transaction Hook callback is registered for this object for SIL-SA usage.
Definition: agt_hook_util.c:609
boolean agt_sethook_callback_set(obj_template_t *obj)
Check if an Set Hook callback is registered for this object for SIL-SA usage.
Definition: agt_hook_util.c:573
boolean agt_post_sethook_callback_set(obj_template_t *obj)
Check if an Post Set Hook callback is registered for this object for SIL-SA usage.
Definition: agt_hook_util.c:537
@ AGT_HOOKFMT_NODE
node mode
Definition: agt_hook_util.h:113
@ AGT_HOOKFMT_SUBTREE
subtree mode
Definition: agt_hook_util.h:112
@ AGT_HOOKFMT_NONE
not set
Definition: agt_hook_util.h:111
agt_hook_type_t
Hook types enumeration to specify Hook type.
Definition: agt.h:854
status_t
global error return code
Definition: status_enum.h:219
Global error messages for status code enumerations.
One YANG data-def-stmt.
Definition: obj.h:1284