yumapro  24.10-1
YumaPro SDK
Loading...
Searching...
No Matches

This file contains functions to support validation of callbacks and some supplemental functions. More...

Collaboration diagram for Hook Utilities:

Enumerations

enum  agt_hook_fmt_t {
  AGT_HOOKFMT_NONE ,
  AGT_HOOKFMT_SUBTREE ,
  AGT_HOOKFMT_NODE
}
 different hook formats dictates specific hook functionality More...
 

Functions

boolean agt_hook_type_valid (agt_hook_type_t type)
 Verify that the hook TYPE is valid. More...
 
boolean agt_hook_fmt_valid (agt_hook_fmt_t format)
 Verify that the hook format is valid. More...
 
const xmlChar * agt_hook_get_type_name (agt_hook_type_t type)
 Get the keyword for the specified agt_hook_type_t enumeration. More...
 
agt_hook_type_t agt_hook_get_type_enum (const xmlChar *type)
 Get agt_hook_fmt_t enumeration structure from specified string. More...
 
const xmlChar * agt_hook_get_format_name (agt_hook_fmt_t format)
 Get the keyword for the specified agt_hook_fmt_t enumeration. More...
 
agt_hook_fmt_t agt_hook_get_format_enum (const xmlChar *format)
 Get agt_hook_fmt_t enumeration structure from specified string. More...
 
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. More...
 
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. More...
 
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. More...
 
boolean agt_hooks_callback_set (obj_template_t *obj)
 Check if an any Hook callback is registered for this object for SIL-SA usage. More...
 
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. More...
 
boolean agt_sethook_callback_set (obj_template_t *obj)
 Check if an Set Hook callback is registered for this object for SIL-SA usage. More...
 
boolean agt_txhook_callback_set (obj_template_t *obj)
 Check if an Transaction Hook callback is registered for this object for SIL-SA usage. More...
 
boolean agt_hook_subtree_format (obj_template_t *obj)
 Check if an Transaction Hook callback is registered for this object for SIL-SA usage. More...
 
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. More...
 
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. More...
 

Detailed Description

This file contains functions to support validation of callbacks and some supplemental functions.

Used internally by the server.


  Example with SIL priority

  edit X : priority 10
  edit Y : priority 20

  candidate:

  set-hook(X)
  EDIT(validate, X)
  set-hook(Y)
  EDIT(validate, Y)

  running:

  EDIT(validate, X)
  EDIT(validate, Y)
  EDIT(apply, X)
  EDIT(apply, Y)
  EDIT(commit, X)
  transaction-hook(X)
  EDIT(commit, Y)
  transaction-hook(Y)

Enumeration Type Documentation

◆ agt_hook_fmt_t

different hook formats dictates specific hook functionality

Enumerator
AGT_HOOKFMT_NONE 

not set

AGT_HOOKFMT_SUBTREE 

subtree mode

AGT_HOOKFMT_NODE 

node mode

Function Documentation

◆ agt_hook_fmt_valid()

boolean agt_hook_fmt_valid ( agt_hook_fmt_t  format)

Verify that the hook format is valid.

Parameters
formatdifferent hook formats dictates specific hook functionality
Returns
TRUE if the hook format is valid type
Here is the caller graph for this function:

◆ agt_hook_get_format_enum()

agt_hook_fmt_t agt_hook_get_format_enum ( const xmlChar *  format)

Get agt_hook_fmt_t enumeration structure from specified string.

Parameters
formatstring for the hook format
Returns
hook format to use
Here is the call graph for this function:

◆ agt_hook_get_format_name()

const xmlChar * agt_hook_get_format_name ( agt_hook_fmt_t  format)

Get the keyword for the specified agt_hook_fmt_t enumeration.

Parameters
formattype hook format to use
Returns
string for the hook format, or "none" or "illegal"
Here is the caller graph for this function:

◆ agt_hook_get_type_enum()

agt_hook_type_t agt_hook_get_type_enum ( const xmlChar *  type)

Get agt_hook_fmt_t enumeration structure from specified string.

Parameters
typeformat string for the hook format
Returns
hook format to use
Here is the call graph for this function:

◆ agt_hook_get_type_name()

const xmlChar * agt_hook_get_type_name ( agt_hook_type_t  type)

Get the keyword for the specified agt_hook_type_t enumeration.

Parameters
typehook type to use
Returns
string for the hook type, or "none" or "illegal"
Here is the caller graph for this function:

◆ agt_hook_hooks_subsys_register()

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.

Parameters
subsys_idsubsystem ID registering the remote callback fn
defpathXpath with default (or no) prefixes defining the object that will get the callback
formatdifferent hook formats dictates specific hook functionality
typedifferent hook types dictates hook invocation point
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_hook_obj_ok()

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.

Parameters
objobj_template to use
formathook format to use
typehook types to use
defpathXpath with default prefixes defining the object
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_hook_order_obj_ok()

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.

Called for Set-Order-Hook only

Parameters
objobj_template to use
defpathXpath with default prefixes defining the object
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_hook_post_sethook_obj_ok()

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.

Parameters
objobj_template to use
defpathXpath with default prefixes defining the object
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_hook_post_sethook_subsys_register()

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.

Parameters
subsys_idsubsystem ID registering the remote callback fn
defpathXpath with default (or no) prefixes defining the object that will get the callback
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_hook_subtree_format()

boolean agt_hook_subtree_format ( obj_template_t obj)

Check if an Transaction Hook callback is registered for this object for SIL-SA usage.

Parameters
objobject to check
Returns
TRUE if Hook callback registered; FALSE if not

◆ agt_hook_type_valid()

boolean agt_hook_type_valid ( agt_hook_type_t  type)

Verify that the hook TYPE is valid.

Parameters
typedifferent hook types dictates hook invocation point
Returns
TRUE if the hook TYPE is valid type
Here is the caller graph for this function:

◆ agt_hooks_callback_set()

boolean agt_hooks_callback_set ( obj_template_t obj)

Check if an any Hook callback is registered for this object for SIL-SA usage.

Parameters
objobject to check
Returns
TRUE if Hook callback registered; FALSE if not

◆ agt_post_sethook_callback_set()

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.

Parameters
objobject to check
Returns
TRUE if Hook callback registered; FALSE if not

◆ agt_sethook_callback_set()

boolean agt_sethook_callback_set ( obj_template_t obj)

Check if an Set Hook callback is registered for this object for SIL-SA usage.

Parameters
objobject to check
Returns
TRUE if Hook callback registered; FALSE if not

◆ agt_txhook_callback_set()

boolean agt_txhook_callback_set ( obj_template_t obj)

Check if an Transaction Hook callback is registered for this object for SIL-SA usage.

Parameters
objobject to check
Returns
TRUE if Hook callback registered; FALSE if not