
#include <tfe_plugin.h>

#ifndef TFE_PLUGIN_MAX
#define TFE_PLUGIN_MAX		128
#endif

static struct tfe_plugin * __g_tfe_plugin_info[TFE_PLUGIN_MAX];
static unsigned int __g_nr_plugin_info = 0;

void tfe_plugin_register(struct tfe_plugin * plugin)
{
	__g_tfe_plugin_info[__g_nr_plugin_info++] = plugin;
}

void tfe_plugin_unregister(struct tfe_plugin * plugin)
{
	return;
}

struct tfe_plugin * tfe_plugin_iterate(unsigned int * iterate)
{
	if (*iterate < __g_nr_plugin_info) return __g_tfe_plugin_info[(*iterate)++];
	else return NULL;
}

unsigned int tfe_plugin_total_counts()
{
	return __g_nr_plugin_info;
}
