(void*)reason_filter, NULL, NULL);
}
+METHOD(recommendations_t, clear_reasons, void,
+ private_tnc_imv_recommendations_t *this)
+{
+ enumerator_t *enumerator;
+ recommendation_entry_t *entry;
+
+ enumerator = this->recs->create_enumerator(this->recs);
+ while (enumerator->enumerate(enumerator, &entry))
+ {
+ chunk_clear(&entry->reason);
+ chunk_clear(&entry->reason_language);
+ }
+ enumerator->destroy(enumerator);
+}
+
METHOD(recommendations_t, destroy, void,
private_tnc_imv_recommendations_t *this)
{
.set_reason_string = _set_reason_string,
.set_reason_language = _set_reason_language,
.create_reason_enumerator = _create_reason_enumerator,
+ .clear_reasons = _clear_reasons,
.destroy = _destroy,
},
.recs = linked_list_create(),
this->batch->add_msg(this->batch, msg);
}
enumerator->destroy(enumerator);
+ this->recs->clear_reasons(this->recs);
/* we have reache the final state */
this->delete_state = TRUE;
* @return enumerator
*/
enumerator_t* (*create_reason_enumerator)(recommendations_t *this);
+
+ /**
+ * Clears all reason entries
+ */
+ void (*clear_reasons)(recommendations_t *this);
+
/**
* Destroys an imv_t object.
*/