* silc_hash_table_list(hash_table, &htl);
* while (silc_hash_table_get(&htl, (void *)&key, (void *)&context))
* ...
+ * silc_hash_table_list_reset(&htl);
*
* SOURCE
*/
SilcHashTable ht;
void *entry;
uint32 index;
+ bool auto_rehash;
};
/***/
* DESCRIPTION
*
* Prepares the `htl' SilcHashTableList sent as argument to be used in the
- * hash table traversing with the silc_hash_table_get.
+ * hash table traversing with the silc_hash_table_get. After the hash
+ * table traversing is completed the silc_hash_table_list_reset must be
+ * called.
+ *
+ * NOTES
+ *
+ * The hash table will not be rehashed during the traversing of the list,
+ * even if the table was marked as auto rehashable. The caller also must
+ * not call silc_hash_table_rehash while traversing the list.
*
***/
void silc_hash_table_list(SilcHashTable ht, SilcHashTableList *htl);
+/****f* silcutil/SilcHashTableAPI/silc_hash_table_list_reset
+ *
+ * SYNOPSIS
+ *
+ * void silc_hash_table_list_reset(SilcHashTableList *htl);
+ *
+ * DESCRIPTION
+ *
+ * Resets the `htl' SilcHashTableList. This must be called after the
+ * hash table traversing is completed.
+ *
+ ***/
+void silc_hash_table_list_reset(SilcHashTableList *htl);
+
/****f* silcutil/SilcHashTableAPI/silc_hash_table_get
*
* SYNOPSIS
* SilcHashFunction hash,
* void *hash_user_context,
* SilcHashCompare compare,
- * void *compare_user_context);
+ * void *compare_user_context,
+ * SilcHashDestructor destructor,
+ * void *destructor_user_context);
*
* DESCRIPTION
*
* function. If not provided the hash table's default is used.
* The `compare' and `compare_user_context' are application specified
* comparing function. If not provided the hash table's default is used.
+ * The `destructor' and `destructor_user_context' are application
+ * specific destructor function.
*
***/
bool silc_hash_table_del_ext(SilcHashTable ht, void *key,
SilcHashFunction hash,
void *hash_user_context,
SilcHashCompare compare,
- void *compare_user_context);
+ void *compare_user_context,
+ SilcHashDestructor destructor,
+ void *destructor_user_context);
/****f* silcutil/SilcHashTableAPI/silc_hash_table_del_by_context_ext
*
* SilcHashFunction hash,
* void *hash_user_context,
* SilcHashCompare compare,
- * void *compare_user_context);
+ * void *compare_user_context,
+ * SilcHashDestructor destructor,
+ * void *destructor_user_context);
*
* DESCRIPTION
*
* function. If not provided the hash table's default is used.
* The `compare' and `compare_user_context' are application specified
* comparing function. If not provided the hash table's default is used.
+ * The `destructor' and `destructor_user_context' are application
+ * specific destructor function.
*
***/
bool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key,
SilcHashFunction hash,
void *hash_user_context,
SilcHashCompare compare,
- void *compare_user_context);
+ void *compare_user_context,
+ SilcHashDestructor destructor,
+ void *destructor_user_context);
/****f* silcutil/SilcHashTableAPI/silc_hash_table_find_ext
*