Added a get_name() function to plugin_t, create_plugin_enumerator enumerates over plugin_t

This commit is contained in:
Martin Willi
2011-04-15 10:07:12 +02:00
parent 6e2791715b
commit 787b5884aa
107 changed files with 828 additions and 245 deletions
@@ -43,6 +43,12 @@ struct private_addrblock_plugin_t {
addrblock_narrow_t *narrower;
};
METHOD(plugin_t, get_name, char*,
private_addrblock_plugin_t *this)
{
return "addrblock";
}
METHOD(plugin_t, destroy, void,
private_addrblock_plugin_t *this)
{
@@ -63,6 +69,7 @@ plugin_t *addrblock_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -88,7 +88,7 @@ static bool check_addrblock(x509_t *subject, x509_t *issuer)
METHOD(cert_validator_t, validate, bool,
private_addrblock_validator_t *this, certificate_t *subject,
certificate_t *issuer, bool online, int pathlen, bool anchor,
certificate_t *issuer, bool online, u_int pathlen, bool anchor,
auth_cfg_t *auth)
{
if (subject->get_type(subject) == CERT_X509 &&
@@ -114,7 +114,9 @@ addrblock_validator_t *addrblock_validator_create()
INIT(this,
.public = {
.validator.validate = _validate,
.validator = {
.validate = _validate,
},
.destroy = _destroy,
},
);
@@ -54,11 +54,16 @@ struct private_android_plugin_t {
* Service that interacts with the Android Settings frontend
*/
android_service_t *service;
};
METHOD(plugin_t, get_name, char*,
private_android_plugin_t *this)
{
return "android";
}
METHOD(plugin_t, destroy, void,
private_android_plugin_t *this)
private_android_plugin_t *this)
{
hydra->attributes->remove_handler(hydra->attributes,
&this->handler->handler);
@@ -81,6 +86,7 @@ plugin_t *android_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -37,6 +37,12 @@ struct private_coupling_plugin_t {
coupling_validator_t *validator;
};
METHOD(plugin_t, get_name, char*,
private_coupling_plugin_t *this)
{
return "coupling";
}
METHOD(plugin_t, destroy, void,
private_coupling_plugin_t *this)
{
@@ -55,6 +61,7 @@ plugin_t *coupling_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
+7
View File
@@ -44,6 +44,12 @@ struct private_dhcp_plugin_t {
dhcp_provider_t *provider;
};
METHOD(plugin_t, get_name, char*,
private_dhcp_plugin_t *this)
{
return "dhcp";
}
METHOD(plugin_t, destroy, void,
private_dhcp_plugin_t *this)
{
@@ -64,6 +70,7 @@ plugin_t *dhcp_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -43,6 +43,12 @@ struct private_duplicheck_plugin_t {
duplicheck_notify_t *notify;
};
METHOD(plugin_t, get_name, char*,
private_duplicheck_plugin_t *this)
{
return "duplicheck";
}
METHOD(plugin_t, destroy, void,
private_duplicheck_plugin_t *this)
{
@@ -68,6 +74,7 @@ plugin_t *duplicheck_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -20,6 +20,12 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
eap_aka_plugin_t *this)
{
return "eap-aka";
}
METHOD(plugin_t, destroy, void,
eap_aka_plugin_t *this)
{
@@ -39,6 +45,7 @@ plugin_t *eap_aka_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -48,6 +48,12 @@ struct private_eap_aka_3gpp2_t {
eap_aka_3gpp2_functions_t *functions;
};
METHOD(plugin_t, get_name, char*,
private_eap_aka_3gpp2_t *this)
{
return "eap-aka-3gpp2";
}
METHOD(plugin_t, destroy, void,
private_eap_aka_3gpp2_t *this)
{
@@ -69,10 +75,11 @@ plugin_t *eap_aka_3gpp2_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
this->functions = eap_aka_3gpp2_functions_create();
.functions = eap_aka_3gpp2_functions_create(),
);
if (!this->functions)
@@ -22,6 +22,12 @@
/* missing in cababilities.h */
#define CAP_AUDIT_WRITE 29
METHOD(plugin_t, get_name, char*,
eap_gtc_plugin_t *this)
{
return "eap-gtc";
}
METHOD(plugin_t, destroy, void,
eap_gtc_plugin_t *this)
{
@@ -41,6 +47,7 @@ plugin_t *eap_gtc_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -18,6 +18,12 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
eap_identity_plugin_t *this)
{
return "eap-identity";
}
METHOD(plugin_t, destroy, void,
eap_identity_plugin_t *this)
{
@@ -37,6 +43,7 @@ plugin_t *eap_identity_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -18,6 +18,12 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
eap_md5_plugin_t *this)
{
return "eap-md5";
}
METHOD(plugin_t, destroy, void,
eap_md5_plugin_t *this)
{
@@ -37,6 +43,7 @@ plugin_t *eap_md5_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -19,6 +19,12 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
eap_mschapv2_plugin_t *this)
{
return "eap-mschapv2";
}
METHOD(plugin_t, destroy, void,
eap_mschapv2_plugin_t *this)
{
@@ -38,6 +44,7 @@ plugin_t *eap_mschapv2_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -19,6 +19,11 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
eap_peap_plugin_t *this)
{
return "eap-peap";
}
METHOD(plugin_t, destroy, void,
eap_peap_plugin_t *this)
@@ -39,6 +44,7 @@ plugin_t *eap_peap_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -49,6 +49,12 @@ struct private_eap_radius_plugin_t {
*/
static private_eap_radius_plugin_t *instance = NULL;
METHOD(plugin_t, get_name, char*,
private_eap_radius_plugin_t *this)
{
return "eap-radius";
}
METHOD(plugin_t, destroy, void,
private_eap_radius_plugin_t *this)
{
@@ -153,6 +159,7 @@ plugin_t *eap_radius_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -20,6 +20,12 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
eap_sim_plugin_t *this)
{
return "eap-sim";
}
METHOD(plugin_t, destroy, void,
eap_sim_plugin_t *this)
{
@@ -39,6 +45,7 @@ plugin_t *eap_sim_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -50,6 +50,12 @@ struct private_eap_sim_file_t {
eap_sim_file_triplets_t *triplets;
};
METHOD(plugin_t, get_name, char*,
private_eap_sim_file_t *this)
{
return "eap-sim-file";
}
METHOD(plugin_t, destroy, void,
private_eap_sim_file_t *this)
{
@@ -71,6 +77,7 @@ plugin_t *eap_sim_file_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -35,6 +35,12 @@ struct private_eap_sim_pcsc_plugin_t {
eap_sim_pcsc_card_t *card;
};
METHOD(plugin_t, get_name, char*,
private_eap_sim_pcsc_plugin_t *this)
{
return "eap-sim-pcsc";
}
METHOD(plugin_t, destroy, void,
private_eap_sim_pcsc_plugin_t *this)
{
@@ -53,6 +59,7 @@ plugin_t *eap_sim_pcsc_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -42,6 +42,12 @@ struct private_eap_simaka_pseudonym_t {
eap_simaka_pseudonym_provider_t *provider;
};
METHOD(plugin_t, get_name, char*,
private_eap_simaka_pseudonym_t *this)
{
return "eap-simaka-pseudonym";
}
METHOD(plugin_t, destroy, void,
private_eap_simaka_pseudonym_t *this)
{
@@ -62,6 +68,7 @@ plugin_t *eap_simaka_pseudonym_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -42,6 +42,12 @@ struct private_eap_simaka_reauth_t {
eap_simaka_reauth_provider_t *provider;
};
METHOD(plugin_t, get_name, char*,
private_eap_simaka_reauth_t *this)
{
return "eap-simaka-reauth";
}
METHOD(plugin_t, destroy, void,
private_eap_simaka_reauth_t *this)
{
@@ -62,6 +68,7 @@ plugin_t *eap_simaka_reauth_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -47,6 +47,12 @@ struct private_eap_simaka_sql_t {
database_t *db;
};
METHOD(plugin_t, get_name, char*,
private_eap_simaka_sql_t *this)
{
return "eap-simaka-sql";
}
METHOD(plugin_t, destroy, void,
private_eap_simaka_sql_t *this)
{
@@ -87,6 +93,7 @@ plugin_t *eap_simaka_sql_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -19,6 +19,11 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
eap_tls_plugin_t *this)
{
return "eap-tls";
}
METHOD(plugin_t, destroy, void,
eap_tls_plugin_t *this)
@@ -39,6 +44,7 @@ plugin_t *eap_tls_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -18,6 +18,12 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
eap_tnc_plugin_t *this)
{
return "eap-tnc";
}
METHOD(plugin_t, destroy, void,
eap_tnc_plugin_t *this)
{
@@ -37,6 +43,7 @@ plugin_t *eap_tnc_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -19,6 +19,11 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
eap_ttls_plugin_t *this)
{
return "eap-ttls";
}
METHOD(plugin_t, destroy, void,
eap_ttls_plugin_t *this)
@@ -39,6 +44,7 @@ plugin_t *eap_ttls_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
+7
View File
@@ -43,6 +43,12 @@ struct private_farp_plugin_t {
farp_spoofer_t *spoofer;
};
METHOD(plugin_t, get_name, char*,
private_farp_plugin_t *this)
{
return "farp";
}
METHOD(plugin_t, destroy, void,
private_farp_plugin_t *this)
{
@@ -62,6 +68,7 @@ plugin_t *farp_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
+7
View File
@@ -91,6 +91,12 @@ struct private_ha_plugin_t {
ha_attribute_t *attr;
};
METHOD(plugin_t, get_name, char*,
private_ha_plugin_t *this)
{
return "ha";
}
METHOD(plugin_t, destroy, void,
private_ha_plugin_t *this)
{
@@ -144,6 +150,7 @@ plugin_t *ha_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
+7
View File
@@ -37,6 +37,12 @@ struct private_led_plugin_t {
led_listener_t *listener;
};
METHOD(plugin_t, get_name, char*,
private_led_plugin_t *this)
{
return "led";
}
METHOD(plugin_t, destroy, void,
private_led_plugin_t *this)
{
@@ -55,6 +61,7 @@ plugin_t *led_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -146,6 +146,12 @@ static job_requeue_t do_load_test(private_load_tester_plugin_t *this)
return JOB_REQUEUE_NONE;
}
METHOD(plugin_t, get_name, char*,
private_load_tester_plugin_t *this)
{
return "load-tester";
}
METHOD(plugin_t, destroy, void,
private_load_tester_plugin_t *this)
{
@@ -189,6 +195,7 @@ plugin_t *load_tester_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
+8 -2
View File
@@ -34,11 +34,16 @@ struct private_maemo_plugin_t {
* service
*/
maemo_service_t *service;
};
METHOD(plugin_t, get_name, char*,
private_maemo_plugin_t *this)
{
return "maemo";
}
METHOD(plugin_t, destroy, void,
private_maemo_plugin_t *this)
private_maemo_plugin_t *this)
{
this->service->destroy(this->service);
free(this);
@@ -54,6 +59,7 @@ plugin_t *maemo_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -54,6 +54,12 @@ struct private_medcli_plugin_t {
medcli_listener_t *listener;
};
METHOD(plugin_t, get_name, char*,
private_medcli_plugin_t *this)
{
return "medcli";
}
METHOD(plugin_t, destroy, void,
private_medcli_plugin_t *this)
{
@@ -78,6 +84,7 @@ plugin_t *medcli_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -48,6 +48,12 @@ struct private_medsrv_plugin_t {
medsrv_config_t *config;
};
METHOD(plugin_t, get_name, char*,
private_medsrv_plugin_t *this)
{
return "medsrv";
}
METHOD(plugin_t, destroy, void,
private_medsrv_plugin_t *this)
{
@@ -70,6 +76,7 @@ plugin_t *medsrv_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
+7
View File
@@ -67,6 +67,12 @@ static job_requeue_t run(private_nm_plugin_t *this)
return JOB_REQUEUE_NONE;
}
METHOD(plugin_t, get_name, char*,
private_nm_plugin_t *this)
{
return "nm";
}
METHOD(plugin_t, destroy, void,
private_nm_plugin_t *this)
{
@@ -105,6 +111,7 @@ plugin_t *nm_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
+7
View File
@@ -707,6 +707,12 @@ static job_requeue_t dispatch(private_smp_t *this)
return JOB_REQUEUE_DIRECT;
}
METHOD(plugin_t, get_name, char*,
private_smp_t *this)
{
return "smp";
}
METHOD(plugin_t, destroy, void,
private_smp_t *this)
{
@@ -727,6 +733,7 @@ plugin_t *smp_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -32,9 +32,14 @@ struct private_socket_default_plugin_t {
* Implements plugin interface
*/
socket_default_plugin_t public;
};
METHOD(plugin_t, get_name, char*,
private_socket_default_plugin_t *this)
{
return "socket-default";
}
METHOD(plugin_t, destroy, void,
private_socket_default_plugin_t *this)
{
@@ -53,6 +58,7 @@ plugin_t *socket_default_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -32,9 +32,14 @@ struct private_socket_dynamic_plugin_t {
* Implements plugin interface
*/
socket_dynamic_plugin_t public;
};
METHOD(plugin_t, get_name, char*,
private_socket_dynamic_plugin_t *this)
{
return "socket-dynamic";
}
METHOD(plugin_t, destroy, void,
private_socket_dynamic_plugin_t *this)
{
@@ -53,6 +58,7 @@ plugin_t *socket_dynamic_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -32,9 +32,14 @@ struct private_socket_raw_plugin_t {
* Implements plugin interface
*/
socket_raw_plugin_t public;
};
METHOD(plugin_t, get_name, char*,
private_socket_raw_plugin_t *this)
{
return "socket-raw";
}
METHOD(plugin_t, destroy, void,
private_socket_raw_plugin_t *this)
{
@@ -53,6 +58,7 @@ plugin_t *socket_raw_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
+7
View File
@@ -53,6 +53,12 @@ struct private_sql_plugin_t {
sql_logger_t *logger;
};
METHOD(plugin_t, get_name, char*,
private_sql_plugin_t *this)
{
return "sql";
}
METHOD(plugin_t, destroy, void,
private_sql_plugin_t *this)
{
@@ -84,6 +90,7 @@ plugin_t *sql_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
+5 -4
View File
@@ -402,7 +402,8 @@ METHOD(stroke_list_t, status, void,
if (all)
{
peer_cfg_t *peer_cfg;
char *plugin, *pool;
plugin_t *plugin;
char *pool;
host_t *host;
u_int32_t dpd;
time_t since, now;
@@ -431,7 +432,7 @@ METHOD(stroke_list_t, status, void,
enumerator = lib->plugins->create_plugin_enumerator(lib->plugins);
while (enumerator->enumerate(enumerator, &plugin))
{
fprintf(out, "%s ", plugin);
fprintf(out, "%s ", plugin->get_name(plugin));
}
enumerator->destroy(enumerator);
fprintf(out, "\n");
@@ -1069,12 +1070,12 @@ static void print_alg(FILE *out, int *len, enum_name_t *alg_names, int alg_type,
{
char alg_name[BUF_LEN];
int alg_name_len;
alg_name_len = sprintf(alg_name, " %N[%s]", alg_names, alg_type, plugin_name);
if (*len + alg_name_len > CRYPTO_MAX_ALG_LINE)
{
fprintf(out, "\n ");
*len = 13;
*len = 13;
}
fprintf(out, "%s", alg_name);
*len += alg_name_len;
@@ -36,6 +36,12 @@ struct private_stroke_plugin_t {
stroke_socket_t *socket;
};
METHOD(plugin_t, get_name, char*,
private_stroke_plugin_t *this)
{
return "stroke";
}
METHOD(plugin_t, destroy, void,
private_stroke_plugin_t *this)
{
@@ -53,6 +59,7 @@ plugin_t *stroke_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -141,6 +141,12 @@ static bool load_imcs(char *filename)
return TRUE;
}
METHOD(plugin_t, get_name, char*,
tnc_imc_plugin_t *this)
{
return "tnc-imc";
}
METHOD(plugin_t, destroy, void,
tnc_imc_plugin_t *this)
{
@@ -158,6 +164,7 @@ plugin_t *tnc_imc_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -141,6 +141,12 @@ static bool load_imvs(char *filename)
return TRUE;
}
METHOD(plugin_t, get_name, char*,
tnc_imv_plugin_t *this)
{
return "tnc-imv";
}
METHOD(plugin_t, destroy, void,
tnc_imv_plugin_t *this)
{
@@ -158,6 +164,7 @@ plugin_t *tnc_imv_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
@@ -18,6 +18,12 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
tnccs_11_plugin_t *this)
{
return "tnccs-11";
}
METHOD(plugin_t, destroy, void,
tnccs_11_plugin_t *this)
{
@@ -35,11 +41,12 @@ plugin_t *tnccs_11_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
charon->tnccs->add_method(charon->tnccs, TNCCS_1_1,
charon->tnccs->add_method(charon->tnccs, TNCCS_1_1,
(tnccs_constructor_t)tnccs_11_create);
return &this->plugin;
@@ -18,6 +18,12 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
tnccs_20_plugin_t *this)
{
return "tnccs-20";
}
METHOD(plugin_t, destroy, void,
tnccs_20_plugin_t *this)
{
@@ -35,11 +41,12 @@ plugin_t *tnccs_20_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
charon->tnccs->add_method(charon->tnccs, TNCCS_2_0,
charon->tnccs->add_method(charon->tnccs, TNCCS_2_0,
(tnccs_constructor_t)tnccs_20_create);
return &this->plugin;
@@ -18,6 +18,12 @@
#include <daemon.h>
METHOD(plugin_t, get_name, char*,
tnccs_dynamic_plugin_t *this)
{
return "tnccs-dynamic";
}
METHOD(plugin_t, destroy, void,
tnccs_dynamic_plugin_t *this)
{
@@ -35,11 +41,12 @@ plugin_t *tnccs_dynamic_plugin_create()
INIT(this,
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
);
charon->tnccs->add_method(charon->tnccs, TNCCS_DYNAMIC,
charon->tnccs->add_method(charon->tnccs, TNCCS_DYNAMIC,
(tnccs_constructor_t)tnccs_dynamic_create);
return &this->plugin;
+7
View File
@@ -58,6 +58,12 @@ struct private_uci_plugin_t {
uci_control_t *control;
};
METHOD(plugin_t, get_name, char*,
private_uci_plugin_t *this)
{
return "uci";
}
METHOD(plugin_t, destroy, void,
private_uci_plugin_t *this)
{
@@ -80,6 +86,7 @@ plugin_t *uci_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -92,6 +92,12 @@ static void run_tests(private_unit_tester_t *this)
success, run, failed, skipped);
}
METHOD(plugin_t, get_name, char*,
private_unit_tester_plugin_t *this)
{
return "unit-tester";
}
METHOD(plugin_t, destroy, void,
private_unit_tester_t *this)
{
@@ -108,6 +114,7 @@ plugin_t *unit_tester_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -36,6 +36,12 @@ struct private_updown_plugin_t {
updown_listener_t *listener;
};
METHOD(plugin_t, get_name, char*,
private_updown_plugin_t *this)
{
return "updown";
}
METHOD(plugin_t, destroy, void,
private_updown_plugin_t *this)
{
@@ -54,6 +60,7 @@ plugin_t *updown_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},
@@ -43,6 +43,12 @@ struct private_whitelist_plugin_t {
whitelist_control_t *control;
};
METHOD(plugin_t, get_name, char*,
private_whitelist_plugin_t *this)
{
return "whitelist";
}
METHOD(plugin_t, destroy, void,
private_whitelist_plugin_t *this)
{
@@ -62,6 +68,7 @@ plugin_t *whitelist_plugin_create()
INIT(this,
.public = {
.plugin = {
.get_name = _get_name,
.destroy = _destroy,
},
},