yumapro
24.10-2
YumaPro SDK
|
Database API for subsystems. More...
Functions | |
status_t | agt_db_api_init (void) |
Initialize the DB-API module. More... | |
void | agt_db_api_cleanup (void) |
Cleanup the DB-API Module. More... | |
void | agt_db_api_check_load_config (void) |
Check if the deferred load_config check is needed. More... | |
status_t | agt_db_lock_init (void) |
Initialize the DB-Edit-Lock subsysystem handler. More... | |
void | agt_db_lock_cleanup (void) |
Cleanup the DB-Edit-Lock Module. More... | |
status_t | agt_db_lock_set_owner (const xmlChar *subsys_id, int subsys_fd) |
Set the subsystem that owns the DB-Edit-Lock. More... | |
boolean | agt_db_lock_needed (void) |
Check if lock is needed. More... | |
status_t | agt_db_lock_request (agt_cfg_transaction_t *txcb) |
Request the DB-Edit-Lock. More... | |
status_t | agt_db_lock_release (void) |
Release the DB-Edit-Lock. More... | |
status_t | agt_db_lock_handle_response (uint32 msgid, const xmlChar *subsys_id, ycontrol_msgbody_t msgbody_type, val_value_t *msgbody) |
Handle the db-lock response. More... | |
void | agt_db_lock_subsys_gone (const xmlChar *subsys_id) |
Called when the subsystem is gone to cleanup any db-lock state in progress. More... | |
boolean | agt_db_lock_init_waiting (void) |
Check if db-lock is stuck in init-waiting state. More... | |
Database API for subsystems.
Uses YControl protocol to maintain DB-API sessions initiated by a subsystem. Proves access to server functionality such as edit, get, invoke rpc
void agt_db_api_check_load_config | ( | void | ) |
Check if the deferred load_config check is needed.
PTHREADS ONLY!!
void agt_db_api_cleanup | ( | void | ) |
Cleanup the DB-API Module.
Called by the server during shutdown.
status_t agt_db_api_init | ( | void | ) |
Initialize the DB-API module.
void agt_db_lock_cleanup | ( | void | ) |
Cleanup the DB-Edit-Lock Module.
Called by server during shutdown
status_t agt_db_lock_handle_response | ( | uint32 | msgid, |
const xmlChar * | subsys_id, | ||
ycontrol_msgbody_t | msgbody_type, | ||
val_value_t * | msgbody | ||
) |
Handle the db-lock response.
msgid | message ID |
subsys_id | subsystem identifier |
msgbody_type | PAYLOAD, OK, or ERROR |
msgbody | val_value_t representing the <ycontrol> container |
status_t agt_db_lock_init | ( | void | ) |
Initialize the DB-Edit-Lock subsysystem handler.
Called after the CLI parameters are set and before any load-config
boolean agt_db_lock_init_waiting | ( | void | ) |
Check if db-lock is stuck in init-waiting state.
boolean agt_db_lock_needed | ( | void | ) |
Check if lock is needed.
status_t agt_db_lock_release | ( | void | ) |
Release the DB-Edit-Lock.
status_t agt_db_lock_request | ( | agt_cfg_transaction_t * | txcb | ) |
Request the DB-Edit-Lock.
txcb | transaction in progress |
status_t agt_db_lock_set_owner | ( | const xmlChar * | subsys_id, |
int | subsys_fd | ||
) |
Set the subsystem that owns the DB-Edit-Lock.
subsys_id | ID string of the DB-Edit-Lock owner |
subsys_fd | file descriptor number for this subsys |
void agt_db_lock_subsys_gone | ( | const xmlChar * | subsys_id | ) |
Called when the subsystem is gone to cleanup any db-lock state in progress.
subsys_id | subsystem identifier that is gone |