/**@ingroup tsk_list_group * Removes an item from the @ref tsk_list_t "list". The reference counter value of the object held by the item will be decremented. <br /> * You should not need to call this function by yourself. See @ref _Anchor_TinySAK_Linked_List_Add_Remove "here" for more information on how to remove items.<br /> * @param list the @ref tsk_list_t "list" from which to remove the @a item. * @param item the @ref tsk_list_item_t "item" to remove from the @a list. * @return @ref tsk_true if @a item exists and have been removed; @ref tsk_false otherwise. */ tsk_bool_t tsk_list_remove_item(tsk_list_t* list, tsk_list_item_t* item) { if(item){ return tsk_list_remove_item_by_pred(list, tsk_list_find_by_item, (const void*)item); } return tsk_false; }
/**@ingroup tnet_nat_group * * Removes a STUN2 binding from the NAT context. * * @param [in,out] p_self The NAT context from which to remove the STUN2 binding. * @param id The id of the STUN2 binding to remove. * * @return Zero if succeed and non zero error code otherwise. * * * @sa @ref tnet_nat_stun_bind. **/ int tnet_nat_stun_unbind(const struct tnet_nat_ctx_s* p_self, tnet_stun_binding_id_t id) { if (!p_self) { TSK_DEBUG_ERROR("Invalid parameter"); return -1; } tsk_list_remove_item_by_pred(p_self->stun_bindings, __pred_find_stun_binding, &id); return 0; }
/**@ingroup tsk_params_group * Removes a parameter from the list of parameters. * @param self The list from which to remove the parameter. * @param name The name(case-insensitive) of the parameter to remove. * @retval Zero if succeed and -1 otherwise. */ int tsk_params_remove_param(tsk_params_L_t *self, const char* name) { if(self){ tsk_list_remove_item_by_pred(self, pred_find_param_by_name, name); return 0; } else{ TSK_DEBUG_ERROR("Invalid parameter"); return -1; } }