🦄 refactor(plugin manager): Updating interface definitions

This commit is contained in:
yangwei
2022-07-27 14:11:29 +08:00
parent 717f52e4c1
commit 4735a8073a
6 changed files with 42 additions and 41 deletions

View File

@@ -1,8 +1,8 @@
#include <sys/queue.h>
#include <time.h>
#include "deps/uthash/uthash.h"
#include "sdk/include/session.h"
#include "session_manager.h"
#if 0
@@ -30,6 +30,21 @@ struct plugin_manager
#endif
struct stellar_plugin_ctx
{
void *call_back_arg;
const struct timeval timeout;
fn_session_event_callback call_back;
TAILQ_ENTRY(stellar_plugin_ctx) tqe;
};
TAILQ_HEAD(stellar_plugin_ctx_list, stellar_plugin_ctx);
struct stellar_plugin_data
{
stellar_plugin_ctx_list plugin_ctx_list;
};
struct plugin_manager_handle *plugin_manager_init()
{
return nullptr;
@@ -40,7 +55,7 @@ int plugin_manager_load(const char *plugin_conf_path)
return 0;
}
int plugin_manager_event_register(struct plugin_manager_handle *h,
int plugin_manager_event_register(struct plugin_manager *h,
const char *session_type_name,
fn_session_event_callback call_back,
const struct timeval *timeout)
@@ -48,7 +63,7 @@ int plugin_manager_event_register(struct plugin_manager_handle *h,
return 0;
}
void plugin_manager_dispatch(struct plugin_manager_handle *h, struct stellar_event *event)
void plugin_manager_dispatch(struct plugin_manager *h, struct stellar_event *event)
{
#if 0
struct session *s = container_of(event, struct session, cur_ev);