yumapro
24.10-3
YumaPro SDK
|
Key Map provides a YANG row cache to automate the processing of GET2 callback parameters to setup the next entry. More...
Functions | |
keymap_set_t * | keymap_new_set (obj_template_t *listobj, uint32 anckey_cnt, status_t *res) |
create a new keymap set More... | |
void | keymap_free_set (keymap_set_t *mapset) |
free a keymap set More... | |
keymap_map_t * | keymap_new_map (keymap_set_t *mapset, void *cookie, status_t *res,...) |
create a new keymap More... | |
void | keymap_free_map (keymap_set_t *mapset, keymap_map_t *cb) |
free a keymap More... | |
keymap_map_t * | keymap_get_map (keymap_set_t *mapset,...) |
retrieve an existing keymap from its ancestor keys More... | |
status_t | keymap_add_row (keymap_map_t *cb, void *cookie,...) |
create a new row in a keymap More... | |
status_t | keymap_remove_row (keymap_map_t *cb,...) |
remove and delete a row in a keymap More... | |
void | keymap_dump_map (keymap_map_t *cb) |
debug dump a keymap More... | |
status_t | keymap_get_return_keys (keymap_map_t *cb, boolean getnext, boolean *islast, void **cookie, dlq_hdr_t *keyQ,...) |
get the return keys for the GET or GETNEXT request More... | |
Key Map provides a YANG row cache to automate the processing of GET2 callback parameters to setup the next entry.
status_t keymap_add_row | ( | keymap_map_t * | cb, |
void * | cookie, | ||
... | |||
) |
create a new row in a keymap
Data added to cb; Must be freed with keymap_free_map Each parameter after 'cookie' is a pointer to an xmlString. There must be the exact number of strings for the list The program may crash if there are not enough strings to match the list definition
cb | keymap control block to use |
cookie | == optional cookie to store with the row |
void keymap_dump_map | ( | keymap_map_t * | cb | ) |
debug dump a keymap
log-level=debug is required or nothing will be printed
cb | keymap control block to use |
void keymap_free_map | ( | keymap_set_t * | mapset, |
keymap_map_t * | cb | ||
) |
free a keymap
mapset | top map set containing the CB, NULL if none
|
cb | keymap control block to free |
void keymap_free_set | ( | keymap_set_t * | mapset | ) |
free a keymap set
The function will simply return if 'mapset' is NULL.
mapset | keymap set to free |
keymap_map_t * keymap_get_map | ( | keymap_set_t * | mapset, |
... | |||
) |
retrieve an existing keymap from its ancestor keys
The variable parameters represent the ancestor keys to match. If no ancestor keys then retrieve the one keymap allowed
mapset | object to use to find the key map |
status_t keymap_get_return_keys | ( | keymap_map_t * | cb, |
boolean | getnext, | ||
boolean * | islast, | ||
void ** | cookie, | ||
dlq_hdr_t * | keyQ, | ||
... | |||
) |
get the return keys for the GET or GETNEXT request
Process the key information for the request and produce a queue of val_value_t structs representing the return keys. Handle the missing and fixed key properties for each key
For each key, there are 2 parameters passed in order
cb | keymap control block to use | |
getnext | TRUE for a GETNEXT request; FALSE for GET | |
[out] | islast | TRUE if returning the last entry; FALSE otherwise
|
[out] | cookie | the cookie found for the found row
|
[out] | keyQ | Queue of val_value_t to store the return keys
|
keymap_map_t * keymap_new_map | ( | keymap_set_t * | mapset, |
void * | cookie, | ||
status_t * | res, | ||
... | |||
) |
create a new keymap
Must be freed with keymap_free_map
Each variable parameter represents an ancestor key. To match all entries for a specific ancestor key, provide a NULL pointer. Otherwise provide a pointer to a string. This is the exact value that much match the (converted) string value of the ancestor key.
mapset | object to use for the key map | |
cookie | pointer to save with the keymap
| |
[out] | res | return status
|
keymap_set_t * keymap_new_set | ( | obj_template_t * | listobj, |
uint32 | anckey_cnt, | ||
status_t * | res | ||
) |
create a new keymap set
Must be freed with keymap_free_set
listobj | object to use for the key map | |
anckey_cnt | number of ancestor keys for this keymap set | |
[out] | res | return status
|
status_t keymap_remove_row | ( | keymap_map_t * | cb, |
... | |||
) |
remove and delete a row in a keymap
Each parameter after 'cb' is a pointer to a string. There must be the exact number of strings for the list The program may crash if there are not enough strings to match the list definition.
cb | keymap control block to use |