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
stellar-stellar/src/plugin/plugin_manager.h

37 lines
1.2 KiB
C
Raw Normal View History

2024-04-11 16:30:21 +08:00
#ifndef _PLUGIN_MANAGER_H
#define _PLUGIN_MANAGER_H
2024-04-21 11:30:41 +08:00
#ifdef __cplusplus
2024-04-11 16:30:21 +08:00
extern "C"
{
#endif
#include "session_priv.h"
2024-04-11 16:30:21 +08:00
#define PLUGIN_MANAGER_LOG_ERROR(format, ...) LOG_ERROR("plugin manager", format, ##__VA_ARGS__)
#define PLUGIN_MANAGER_LOG_DEBUG(format, ...) LOG_DEBUG("plugin manager", format, ##__VA_ARGS__)
struct plugin_manager_schema;
struct plugin_manager_runtime;
2024-04-11 16:30:21 +08:00
struct plugin_manager_schema *plugin_manager_init(struct stellar *st, const char *plugin_spec_file_path);
void plugin_manager_exit(struct plugin_manager_schema *plug_mgr);
2024-04-11 16:30:21 +08:00
void plugin_manager_on_packet(struct plugin_manager_schema *plug_mgr, struct packet *pkt);
//return polling work state, 0: idle, 1: working
int plugin_manager_on_polling(struct plugin_manager_schema *plug_mgr);
//publish and dispatch session msg(msg, pkt) on session_mq
void plugin_manager_on_session_ingress(struct session *sess,const struct packet *pkt);
void plugin_manager_on_session_egress(struct session *sess,const struct packet *pkt);
struct plugin_manager_runtime *plugin_manager_session_runtime_new(struct plugin_manager_schema *plug_mgr, struct session *sess);
void plugin_manager_session_runtime_free(struct plugin_manager_runtime *plug_mgr_rt);
2024-04-11 16:30:21 +08:00
2024-04-21 11:30:41 +08:00
#ifdef __cplusplus
2024-04-11 16:30:21 +08:00
}
#endif
#endif