Plugin Management support C plugin
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "packet.h"
|
||||
#include "session.h"
|
||||
|
||||
void http_decoder(const struct stellar_session *s, int what, struct stellar_packet *p, const char *payload, uint16_t len, void **pme);
|
||||
void http_decoder(const struct stellar_session *s, enum session_event_type event, struct stellar_packet *p, const char *payload, uint16_t len, void **pme);
|
||||
@@ -2,8 +2,14 @@
|
||||
|
||||
#include "session.h"
|
||||
|
||||
typedef int plugin_init_callback(void **pme);
|
||||
typedef void plugin_exit_callback(void *pme);
|
||||
typedef int plugin_init_callback(void);
|
||||
typedef void plugin_exit_callback(void);
|
||||
|
||||
void plugin_remove_from_session_event(struct stellar_event *ev,
|
||||
struct stellar_session *s);
|
||||
void plugin_remove_from_session_event(struct stellar_event *ev, struct stellar_session *s);
|
||||
|
||||
/******************************************************************************
|
||||
* Public API: between plugin and plugin_manager
|
||||
******************************************************************************/
|
||||
|
||||
// TODO
|
||||
// TODO
|
||||
@@ -25,6 +25,7 @@ enum stellar_session_type
|
||||
|
||||
enum session_event_type
|
||||
{
|
||||
SESSION_EVENT_UNKNOWN = (0x00),
|
||||
SESSION_EVENT_OPENING = (0x01 << 1),
|
||||
SESSION_EVENT_RAWPKT = (0x01 << 2),
|
||||
SESSION_EVENT_ORDPKT = (0x01 << 3),
|
||||
@@ -35,11 +36,7 @@ enum session_event_type
|
||||
|
||||
struct stellar_session_event_extras;
|
||||
|
||||
typedef void (fn_session_event_callback)(const struct stellar_session *s, int what, struct stellar_packet *p, const char *payload, uint16_t len, void **pme);
|
||||
typedef void(fn_session_event_callback)(const struct stellar_session *s, enum session_event_type event, struct stellar_packet *p, const char *payload, uint16_t len, void **pme);
|
||||
|
||||
void session_manager_trigger_event(struct stellar_session *s,
|
||||
enum session_event_type type,
|
||||
struct stellar_session_event_extras *info);
|
||||
|
||||
struct stellar_session *session_manager_session_derive(const struct stellar_session *this_session,
|
||||
const char *new_session_type_name);
|
||||
void session_manager_trigger_event(struct stellar_session *s, enum session_event_type type, struct stellar_session_event_extras *info);
|
||||
struct stellar_session *session_manager_session_derive(const struct stellar_session *this_session, const char *session_name);
|
||||
Reference in New Issue
Block a user