X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcapputil%2Fsilcidcache.h;h=7d8e1427abfa2219e9b041185b6f475f6f6d3cba;hb=52e57c880aba9c5e89f59d962eb9af75670b76e0;hp=05a009ded6fd8635cf34f803b265ab8bc0da32ba;hpb=8fd8212bcd16f2b53fbedff2a9b9a4e8c15b9695;p=silc.git diff --git a/lib/silcapputil/silcidcache.h b/lib/silcapputil/silcidcache.h index 05a009de..7d8e1427 100644 --- a/lib/silcapputil/silcidcache.h +++ b/lib/silcapputil/silcidcache.h @@ -208,7 +208,8 @@ SilcBool silc_idcache_del_by_context(SilcIDCache cache, void *context, * DESCRIPTION * * Updates cache `entry' with new values. If the `new_id' is non-NULL - * then the new value will be copied over the old value in the `entry'. + * then the new value will be copied over the old value in the `entry' + * unless the ID doesn't exist, when the `new_id' will be stored in `entry'. * If the `new_name' is non-NULL then the `entry' will be updated with * `new_name'. The caller is responsible of freeing the old name if it * was updated with new one. The old ID value does not need to be freed @@ -239,6 +240,24 @@ SilcBool silc_idcache_update_by_context(SilcIDCache cache, void *context, void *new_id, char *new_name, SilcBool free_old_name); +/****f* silcapputil/SilcIDCacheAPI/silc_idcache_move + * + * SYNOPSIS + * + * SilcBool silc_idcache_move(SilcIDCache from_cache, SilcIDCache to_cache, + * SilcIDCacheEntry entry); + * + * DESCRIPTION + * + * Moves the ID cache entry indicated by `entry' from the `from_cache' + * to `to_cache'. After this returns TRUE the `entry' is available only + * from the `to_cache'. Return FALSE if `entry' is not in `from_cache' + * or system is out of memory. + * + ***/ +SilcBool silc_idcache_move(SilcIDCache from_cache, SilcIDCache to_cache, + SilcIDCacheEntry entry); + /****f* silcapputil/SilcIDCacheAPI/silc_idcache_get_all * * SYNOPSIS