This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-tfe/common/src/tfe_plugin.cpp

31 lines
610 B
C++
Raw Normal View History

#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;
}