Refactored plugin management interface
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
#include "sdk/include/session.h"
|
||||
#include "sdk/include/plugin.h"
|
||||
|
||||
#define MAX_PLUGIN_NUM 256
|
||||
|
||||
struct per_session_event_cbs;
|
||||
struct plugin_manager;
|
||||
struct plugin_manager *plugin_manager_init();
|
||||
|
||||
int plugin_manager_event_register(struct plugin_manager *h,
|
||||
const char *session_type_name,
|
||||
fn_session_event_callback call_back,
|
||||
const struct timeval *timeout);
|
||||
struct plugin_manager *plugin_manager_create();
|
||||
void plugin_manager_destory(struct plugin_manager *plug_mgr);
|
||||
|
||||
int plugin_manager_load(const char *plugin_conf_path);
|
||||
// return 0: success
|
||||
// return -1: error
|
||||
int plugin_manager_load(struct plugin_manager *plug_mgr, const char *plugin_file);
|
||||
void plugin_manager_unload(struct plugin_manager *plug_mgr);
|
||||
|
||||
void plugin_manager_dispatch(struct plugin_manager *h, struct stellar_event *ev);
|
||||
int plugin_manager_register(struct plugin_manager *plug_mgr, const char *session_type, fn_session_event_callback *callback);
|
||||
void plugin_manager_dispatch(struct plugin_manager *plug_mgr, struct stellar_event *event);
|
||||
Reference in New Issue
Block a user