return this->imcs->get_count(this->imcs);
}
+METHOD(imc_manager_t, get_preferred_language, char*,
+ private_tnc_imc_manager_t *this)
+{
+ return lib->settings->get_str(lib->settings,
+ "charon.plugins.tnc-imc.preferred_language", "en");
+}
+
METHOD(imc_manager_t, notify_connection_change, void,
private_tnc_imc_manager_t *this, TNC_ConnectionID id,
TNC_ConnectionState state)
.add = _add,
.remove = _remove_, /* avoid name conflict with stdio.h */
.get_count = _get_count,
+ .get_preferred_language = _get_preferred_language,
.notify_connection_change = _notify_connection_change,
.begin_handshake = _begin_handshake,
.set_message_types = _set_message_types,
*/
plugin_t *tnc_imc_plugin_create()
{
- char *tnc_config, *pref_lang;
+ char *tnc_config;
tnc_imc_plugin_t *this;
INIT(this,
},
);
- pref_lang = lib->settings->get_str(lib->settings,
- "charon.plugins.tnc-imc.preferred_language", "en");
- tnc_config = lib->settings->get_str(lib->settings,
- "charon.plugins.tnc-imc.tnc_config", "/etc/tnc_config");
-
/* Create IMC manager */
charon->imcs = tnc_imc_manager_create();
/* Load IMCs and abort if not all instances initalize successfully */
+ tnc_config = lib->settings->get_str(lib->settings,
+ "charon.plugins.tnc-imc.tnc_config", "/etc/tnc_config");
if (!load_imcs(tnc_config))
{
charon->imcs->destroy(charon->imcs);
*/
int (*get_count)(imc_manager_t *this);
+ /**
+ * Return the preferred language for recommendations
+ *
+ * @return preferred language string
+ */
+ char* (*get_preferred_language)(imc_manager_t *this);
+
/**
* Notify all IMC instances
*