Merged silc_1_1_branch to trunk.
[silc.git] / lib / silcapputil / silcidcache.h
index 05a009ded6fd8635cf34f803b265ab8bc0da32ba..7d8e1427abfa2219e9b041185b6f475f6f6d3cba 100644 (file)
@@ -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