Skip to content

Commit

Permalink
modules: readme files regenerated - htable ... [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
kamailio-dev committed Feb 1, 2022
1 parent a2c9b9b commit ee33df0
Showing 1 changed file with 116 additions and 80 deletions.
196 changes: 116 additions & 80 deletions src/modules/htable/README
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -828,47 +836,75 @@ 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
should be done by the same process.

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
should be done by the same process.

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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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")) {
Expand All @@ -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.
Expand All @@ -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")) {
Expand All @@ -954,55 +990,55 @@ 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.

The parameters can be dynamic strings with variables.

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");
sht_iterator_sets("i1", "$ci");
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.

The parameters can be dynamic strings or integers with variables.

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");
sht_iterator_seti("i1", "20");
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.

The parameters can be dynamic strings or integers with variables.

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");
sht_iterator_setex("i1", "120");
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.
Expand All @@ -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.
Expand All @@ -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().

Expand Down

0 comments on commit ee33df0

Please sign in to comment.