yumapro
24.10-2
YumaPro SDK
|
Transaction hooks allow advanced access to an edit transaction. More...
Functions | |
void | sil_sa_hooks_clean_added_edits (dlq_hdr_t *added_editQ) |
Clean the added edits from the profile. More... | |
val_value_t * | sil_sa_hooks_make_added_edit_payload (sil_sa_cb_t *sacb, status_t *res) |
Make the <transaction-response> message return-value. More... | |
status_t | sil_sa_hooks_add_edit (sil_sa_cb_t *sil_sa_cb, const xmlChar *defpath, val_value_t *edit_value, const xmlChar *edit_operation, const xmlChar *insert_where, const xmlChar *insert_point, boolean skip_cb) |
Add an edit to the current transaction from SIL-SA. More... | |
status_t | sil_sa_hooks_send_get_request (sil_sa_cb_t *sil_sa_cb, ncx_cfg_t cfg_id, const xmlChar *defpath) |
Send the <hook-get-request> message. More... | |
status_t | sil_sa_hook_handle_get_request (sil_sa_cb_t *sil_sa_cb, val_value_t *msgbody, ycontrol_msgbody_t msgbody_type) |
Handles incoming <payload> from server for the <hook-get-request> More... | |
Transaction hooks allow advanced access to an edit transaction.
Special callbacks can be called at various points in the transaction process.
All functions in this module are user APIs for subsystem use only!
status_t sil_sa_hook_handle_get_request | ( | sil_sa_cb_t * | sil_sa_cb, |
val_value_t * | msgbody, | ||
ycontrol_msgbody_t | msgbody_type | ||
) |
Handles incoming <payload> from server for the <hook-get-request>
sil_sa_cb | sil_sa control block to use |
msgbody | <payload> node in normal repsonse |
msgbody_type | message body type (Error, payload, etc) |
status_t sil_sa_hooks_add_edit | ( | sil_sa_cb_t * | sil_sa_cb, |
const xmlChar * | defpath, | ||
val_value_t * | edit_value, | ||
const xmlChar * | edit_operation, | ||
const xmlChar * | insert_where, | ||
const xmlChar * | insert_point, | ||
boolean | skip_cb | ||
) |
Add an edit to the current transaction from SIL-SA.
This is the real add_edit function. The sil_sa_add_edit function calls this function.
Save an added edit in the SIL-SA Control block for further hook-response processing
Move or insertion OP available. Skip callbacks for added edits option is available.
Only allowed for Set Hooks or Post Set Hook, the rest are ignored.
sil_sa_cb | sil_sa control block to use |
defpath | XPath path of object instance |
edit_value | val_value_t representing newnode in transaction only needed for create, merge, replace, not delete |
edit_operation | <operation string>
|
insert_where | <insert enum string> (NULL if not used)
|
insert_point | is a XPath encoded string like the defpath. Only for 'before' or 'after' insert_where paramter. The insert_where must be set to 'before' or 'after' if insert_point specified. Will be used only if the operations are "move" or "insert". Ignored otherwise. E.g: "/test3[string.1='entry2'][uint32.1='2']" |
skip_cb | TRUE if DO NOT invoke callbacks for an edded edit if any. FALSE if SKIP any callback for added edit including Transaction, EDIT1, EDIT2 callbacks Only when target=running |
void sil_sa_hooks_clean_added_edits | ( | dlq_hdr_t * | added_editQ | ) |
Clean the added edits from the profile.
added_editQ Q of edits to clean
val_value_t * sil_sa_hooks_make_added_edit_payload | ( | sil_sa_cb_t * | sacb, |
status_t * | res | ||
) |
Make the <transaction-response> message return-value.
sacb | SIL-SA control block to use | |
[out] | res | address of return status
|
status_t sil_sa_hooks_send_get_request | ( | sil_sa_cb_t * | sil_sa_cb, |
ncx_cfg_t | cfg_id, | ||
const xmlChar * | defpath | ||
) |
Send the <hook-get-request> message.
Get the val_value based on Xpath of object instance This function will return value only if there is existing node in the datastore or there is defaults for the node.
The <hook-get-request> message is sent and state changed to SIL_SA_ST_WAIT_HOOK_GETDATA
sil_sa_cb | sil_sa control block to use |
cfg_id | configuration datastore ID to use |
defpath | XPath path of object instance |