Plugin management support pm_session_dettach_me and pm_session_dettach_others
Add test cases for pm_session_dettach_me and pm_session_dettach_others
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
#pragma once
|
||||
#ifndef _PLUGIN_MANAGER_H
|
||||
#define _PLUGIN_MANAGER_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "sdk/include/session.h"
|
||||
|
||||
@@ -7,10 +13,17 @@ struct plugin_manager;
|
||||
struct plugin_manager *plugin_manager_create();
|
||||
void plugin_manager_destory(struct plugin_manager *plug_mgr);
|
||||
|
||||
// return 0: success
|
||||
// return -1: error
|
||||
int plugin_manager_load(struct plugin_manager *plug_mgr, const char *prefix, const char *file);
|
||||
int plugin_manager_load(struct plugin_manager *plug_mgr, const char *file);
|
||||
void plugin_manager_unload(struct plugin_manager *plug_mgr);
|
||||
|
||||
int plugin_manager_register(struct plugin_manager *plug_mgr, const char *session_name, enum session_event_type event, fn_session_event_callback *callback);
|
||||
void plugin_manager_dispatch(struct plugin_manager *plug_mgr, struct stellar_event *event);
|
||||
int plugin_manager_register(struct plugin_manager *plug_mgr, const char *session_name, enum session_event_type event, fn_session_event_callback *event_cb, fn_session_error_callback *error_cb);
|
||||
void plugin_manager_dispatch(struct plugin_manager *plug_mgr, struct stellar_event *event);
|
||||
|
||||
// only use for gtest
|
||||
void *pm_session_get_plugin_pme(const struct stellar_session *session);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user