From ee33df0800493329b6fd1cc1d9979182cad86379 Mon Sep 17 00:00:00 2001 From: Kamailio Dev Date: Tue, 1 Feb 2022 17:31:17 +0100 Subject: [PATCH] modules: readme files regenerated - htable ... [skip ci] --- src/modules/htable/README | 196 ++++++++++++++++++++++---------------- 1 file changed, 116 insertions(+), 80 deletions(-) diff --git a/src/modules/htable/README b/src/modules/htable/README index 0675d64fe67..30bb5bd5220 100644 --- a/src/modules/htable/README +++ b/src/modules/htable/README @@ -60,20 +60,22 @@ Ovidiu Sas 4.4. sht_rm_value_re(htable=>regexp) 4.5. sht_rm_name(htable, op, val) 4.6. sht_rm_value(htable, op, val) - 4.7. sht_reset(htable) - 4.8. sht_lock(htable=>key) - 4.9. sht_unlock(htable=>key) - 4.10. sht_iterator_start(iname, hname) - 4.11. sht_iterator_end(iname) - 4.12. sht_iterator_next(iname) - 4.13. sht_iterator_rm(iname) - 4.14. sht_iterator_sets(iname, sval) - 4.15. sht_iterator_seti(iname, ival) - 4.16. sht_iterator_setex(iname, exval) - 4.17. sht_match_name(htable, op, mval) - 4.18. sht_has_name(htable, op, mval) - 4.19. sht_match_str_value(htable, op, mval) - 4.20. sht_has_str_value(htable, op, mval) + 4.7. sht_setxs(htname, itname, itval, exval) + 4.8. sht_setxi(htname, itname, itval, exval) + 4.9. sht_reset(htable) + 4.10. sht_lock(htable=>key) + 4.11. sht_unlock(htable=>key) + 4.12. sht_iterator_start(iname, hname) + 4.13. sht_iterator_end(iname) + 4.14. sht_iterator_next(iname) + 4.15. sht_iterator_rm(iname) + 4.16. sht_iterator_sets(iname, sval) + 4.17. sht_iterator_seti(iname, ival) + 4.18. sht_iterator_setex(iname, exval) + 4.19. sht_match_name(htable, op, mval) + 4.20. sht_has_name(htable, op, mval) + 4.21. sht_match_str_value(htable, op, mval) + 4.22. sht_has_str_value(htable, op, mval) 5. Exported pseudo-variables 6. RPC Commands @@ -122,18 +124,20 @@ Ovidiu Sas 1.23. sht_rm_value_re usage 1.24. sht_rm_name usage 1.25. sht_rm_value usage - 1.26. sht_reset usage - 1.27. sht_lock usage - 1.28. sht_unlock usage - 1.29. sht_iterator_start usage - 1.30. sht_iterator_end usage - 1.31. sht_iterator_next usage - 1.32. sht_iterator_rm usage - 1.33. sht_iterator_sets usage - 1.34. sht_iterator_seti usage - 1.35. sht_iterator_setex usage - 1.36. sht_match_name usage - 1.37. sht_match_name usage + 1.26. sht_setxs usage + 1.27. sht_setxi usage + 1.28. sht_reset usage + 1.29. sht_lock usage + 1.30. sht_unlock usage + 1.31. sht_iterator_start usage + 1.32. sht_iterator_end usage + 1.33. sht_iterator_next usage + 1.34. sht_iterator_rm usage + 1.35. sht_iterator_sets usage + 1.36. sht_iterator_seti usage + 1.37. sht_iterator_setex usage + 1.38. sht_match_name usage + 1.39. sht_match_name usage Chapter 1. Admin Guide @@ -173,20 +177,22 @@ Chapter 1. Admin Guide 4.4. sht_rm_value_re(htable=>regexp) 4.5. sht_rm_name(htable, op, val) 4.6. sht_rm_value(htable, op, val) - 4.7. sht_reset(htable) - 4.8. sht_lock(htable=>key) - 4.9. sht_unlock(htable=>key) - 4.10. sht_iterator_start(iname, hname) - 4.11. sht_iterator_end(iname) - 4.12. sht_iterator_next(iname) - 4.13. sht_iterator_rm(iname) - 4.14. sht_iterator_sets(iname, sval) - 4.15. sht_iterator_seti(iname, ival) - 4.16. sht_iterator_setex(iname, exval) - 4.17. sht_match_name(htable, op, mval) - 4.18. sht_has_name(htable, op, mval) - 4.19. sht_match_str_value(htable, op, mval) - 4.20. sht_has_str_value(htable, op, mval) + 4.7. sht_setxs(htname, itname, itval, exval) + 4.8. sht_setxi(htname, itname, itval, exval) + 4.9. sht_reset(htable) + 4.10. sht_lock(htable=>key) + 4.11. sht_unlock(htable=>key) + 4.12. sht_iterator_start(iname, hname) + 4.13. sht_iterator_end(iname) + 4.14. sht_iterator_next(iname) + 4.15. sht_iterator_rm(iname) + 4.16. sht_iterator_sets(iname, sval) + 4.17. sht_iterator_seti(iname, ival) + 4.18. sht_iterator_setex(iname, exval) + 4.19. sht_match_name(htable, op, mval) + 4.20. sht_has_name(htable, op, mval) + 4.21. sht_match_str_value(htable, op, mval) + 4.22. sht_has_str_value(htable, op, mval) 5. Exported pseudo-variables 6. RPC Commands @@ -726,20 +732,22 @@ modparam("htable", "event_callback_mode", 1) 4.4. sht_rm_value_re(htable=>regexp) 4.5. sht_rm_name(htable, op, val) 4.6. sht_rm_value(htable, op, val) - 4.7. sht_reset(htable) - 4.8. sht_lock(htable=>key) - 4.9. sht_unlock(htable=>key) - 4.10. sht_iterator_start(iname, hname) - 4.11. sht_iterator_end(iname) - 4.12. sht_iterator_next(iname) - 4.13. sht_iterator_rm(iname) - 4.14. sht_iterator_sets(iname, sval) - 4.15. sht_iterator_seti(iname, ival) - 4.16. sht_iterator_setex(iname, exval) - 4.17. sht_match_name(htable, op, mval) - 4.18. sht_has_name(htable, op, mval) - 4.19. sht_match_str_value(htable, op, mval) - 4.20. sht_has_str_value(htable, op, mval) + 4.7. sht_setxs(htname, itname, itval, exval) + 4.8. sht_setxi(htname, itname, itval, exval) + 4.9. sht_reset(htable) + 4.10. sht_lock(htable=>key) + 4.11. sht_unlock(htable=>key) + 4.12. sht_iterator_start(iname, hname) + 4.13. sht_iterator_end(iname) + 4.14. sht_iterator_next(iname) + 4.15. sht_iterator_rm(iname) + 4.16. sht_iterator_sets(iname, sval) + 4.17. sht_iterator_seti(iname, ival) + 4.18. sht_iterator_setex(iname, exval) + 4.19. sht_match_name(htable, op, mval) + 4.20. sht_has_name(htable, op, mval) + 4.21. sht_match_str_value(htable, op, mval) + 4.22. sht_has_str_value(htable, op, mval) 4.1. sht_print() @@ -828,19 +836,47 @@ sht_rm_name("ha", "re", ".*"); sht_rm_value("ha", "re", ".*"); ... -4.7. sht_reset(htable) +4.7. sht_setxs(htname, itname, itval, exval) + + Set the item with the name 'itname' from hash table 'htname' to string + value 'itval' and expire property to 'exval'. + + The parameters can be with variables. + + This function can be used from ANY_ROUTE. + + Example 1.26. sht_setxs usage +... +sht_setxs("ha", "test", "abc", "10"); +... + +4.8. sht_setxi(htname, itname, itval, exval) + + Set the item with the name 'itname' from hash table 'htname' to integer + value 'itval' and expire property to 'exval'. + + The parameters can be with variables. + + This function can be used from ANY_ROUTE. + + Example 1.27. sht_setxi usage +... +sht_setxs("ha", "test", "100", "10"); +... + +4.9. sht_reset(htable) Delete all entries in the htable. The name of the hash table can be a dynamic string with variables. This function can be used from ANY_ROUTE. - Example 1.26. sht_reset usage + Example 1.28. sht_reset usage ... sht_reset("ha$var(x)"); ... -4.8. sht_lock(htable=>key) +4.10. sht_lock(htable=>key) Lock the slot in htable corresponding to the key item. Note that the locking is re-entrant for the process, therefore the lock and unlock @@ -848,12 +884,12 @@ sht_reset("ha$var(x)"); This function can be used from ANY_ROUTE. - Example 1.27. sht_lock usage + Example 1.29. sht_lock usage ... sht_lock("ha=>test"); ... -4.9. sht_unlock(htable=>key) +4.11. sht_unlock(htable=>key) Unlock the slot in htable corresponding to the key item. Note that the locking is re-entrant for the process, therefore the lock and unlock @@ -861,14 +897,14 @@ sht_lock("ha=>test"); This function can be used from ANY_ROUTE. - Example 1.28. sht_unlock usage + Example 1.30. sht_unlock usage ... sht_lock("ha=>test"); $sht(ha=>test) = $sht(ha=>test) + 10; sht_unlock("ha=>test"); ... -4.10. sht_iterator_start(iname, hname) +4.12. sht_iterator_start(iname, hname) Start an iterator for hash table named by the value of parameter hname. The parameter iname is used to identify the iterator. There can be up @@ -883,12 +919,12 @@ sht_unlock("ha=>test"); This function can be used from ANY_ROUTE. - Example 1.29. sht_iterator_start usage + Example 1.31. sht_iterator_start usage ... sht_iterator_start("i1", "h1"); ... -4.11. sht_iterator_end(iname) +4.13. sht_iterator_end(iname) Close the iterator identified by iname parameter and release the hash table slot acquired by the iterator. The iname value must be the same @@ -898,12 +934,12 @@ sht_iterator_start("i1", "h1"); This function can be used from ANY_ROUTE. - Example 1.30. sht_iterator_end usage + Example 1.32. sht_iterator_end usage ... sht_iterator_end("i1"); ... -4.12. sht_iterator_next(iname) +4.14. sht_iterator_next(iname) Move the iterator to the next item in hash table. It must be called also after sht_iterator_start() to get the first item in the hash @@ -920,7 +956,7 @@ sht_iterator_end("i1"); This function can be used from ANY_ROUTE. - Example 1.31. sht_iterator_next usage + Example 1.33. sht_iterator_next usage ... sht_iterator_start("i1", "h1"); while(sht_iterator_next("i1")) { @@ -929,7 +965,7 @@ sht_iterator_end("i1"); sht_iterator_end("i1"); ... -4.13. sht_iterator_rm(iname) +4.15. sht_iterator_rm(iname) Remove the current item in the iterator and move the iterator to the next one. @@ -943,7 +979,7 @@ sht_iterator_end("i1"); This function can be used from ANY_ROUTE. - Example 1.32. sht_iterator_rm usage + Example 1.34. sht_iterator_rm usage ... sht_iterator_start("i1", "h1"); while(sht_iterator_next("i1")) { @@ -954,7 +990,7 @@ sht_iterator_end("i1"); sht_iterator_end("i1"); ... -4.14. sht_iterator_sets(iname, sval) +4.16. sht_iterator_sets(iname, sval) Set the value of the current item to the string in the sval. @@ -962,7 +998,7 @@ sht_iterator_end("i1"); This function can be used from ANY_ROUTE. - Example 1.33. sht_iterator_sets usage + Example 1.35. sht_iterator_sets usage ... sht_iterator_start("i1", "h1"); sht_iterator_next("i1"); @@ -970,7 +1006,7 @@ sht_iterator_end("i1"); sht_iterator_end("i1"); ... -4.15. sht_iterator_seti(iname, ival) +4.17. sht_iterator_seti(iname, ival) Set the value of the current item to the integer in the ival. @@ -978,7 +1014,7 @@ sht_iterator_end("i1"); This function can be used from ANY_ROUTE. - Example 1.34. sht_iterator_seti usage + Example 1.36. sht_iterator_seti usage ... sht_iterator_start("i1", "h1"); sht_iterator_next("i1"); @@ -986,7 +1022,7 @@ sht_iterator_end("i1"); sht_iterator_end("i1"); ... -4.16. sht_iterator_setex(iname, exval) +4.18. sht_iterator_setex(iname, exval) Set the expire of the current item to the integer in the exval. @@ -994,7 +1030,7 @@ sht_iterator_end("i1"); This function can be used from ANY_ROUTE. - Example 1.35. sht_iterator_setex usage + Example 1.37. sht_iterator_setex usage ... sht_iterator_start("i1", "h1"); sht_iterator_next("i1"); @@ -1002,7 +1038,7 @@ sht_iterator_end("i1"); sht_iterator_end("i1"); ... -4.17. sht_match_name(htable, op, mval) +4.19. sht_match_name(htable, op, mval) Return greater than 0 (true) if the htable has an item that matches the name against the mval parameter. @@ -1017,18 +1053,18 @@ sht_iterator_end("i1"); This function can be used from ANY_ROUTE. - Example 1.36. sht_match_name usage + Example 1.38. sht_match_name usage ... if(sht_match_name("ha", "eq", "alice")) { ... } ... -4.18. sht_has_name(htable, op, mval) +4.20. sht_has_name(htable, op, mval) Alias for sht_match_name(). -4.19. sht_match_str_value(htable, op, mval) +4.21. sht_match_str_value(htable, op, mval) Return greater than 0 (true) if the htable has an item that matches the string value against the mval parameter. @@ -1043,14 +1079,14 @@ if(sht_match_name("ha", "eq", "alice")) { This function can be used from ANY_ROUTE. - Example 1.37. sht_match_name usage + Example 1.39. sht_match_name usage ... if(sht_match_str_value("ha", "eq", "alice")) { ... } ... -4.20. sht_has_str_value(htable, op, mval) +4.22. sht_has_str_value(htable, op, mval) Alias for sht_match_str_value().