🦄 refactor(plugin manager): update interface definition

This commit is contained in:
yangwei
2022-07-24 23:59:00 +08:00
parent ba866fef10
commit 7a3bc7a888
10 changed files with 66 additions and 32 deletions

View File

@@ -2,6 +2,7 @@
#pragma once
#include <sys/queue.h>
#include <time.h>
#include "sdk/include/session.h"
#include "sdk/include/plugin.h"
@@ -21,5 +22,14 @@ struct stellar_plugin_data
stellar_plugin_ctx_list plugin_ctx_list;
};
struct plugin_manager_handle;
struct plugin_manager_handle *plugin_manager_init();
void plugin_manager_dispatch(struct stellar_event *ev);
int plugin_manager_event_register(struct plugin_manager_handle *h,
const char *session_type_name,
fn_session_event_callback call_back,
const struct timeval *timeout);
int plugin_manager_load(const char *plugin_conf_path);
void plugin_manager_dispatch(struct plugin_manager_handle *h, struct stellar_event *ev);