rename fn_session_event_callback to plugin_event_callback and update API parameters
* plugin_event_callback delete 'struct stellar_packet *p'
* plugin_event_callback rename 'uint16_t len' to 'size_t len'
* plugin_event_callback rename 'void **pme' to 'void **ctx'
This commit is contained in:
@@ -7,7 +7,7 @@ extern "C"
|
||||
|
||||
#include "session.h"
|
||||
|
||||
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);
|
||||
void http_decoder(const struct stellar_session *session, enum session_event_type event, const char *payload, size_t len, void **ctx);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
|
||||
@@ -6,10 +6,13 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "session.h"
|
||||
|
||||
typedef int plugin_init_callback(void);
|
||||
typedef void plugin_exit_callback(void);
|
||||
typedef void plugin_event_callback(const struct stellar_session *session, enum session_event_type event, const char *payload, size_t len, void **ctx);
|
||||
|
||||
/******************************************************************************
|
||||
* Public API For Plugin
|
||||
@@ -31,7 +34,7 @@ void pm_session_dettach_me(const struct stellar_session *session);
|
||||
* /|\
|
||||
* |
|
||||
* plugin cb2 run pm_session_take_over
|
||||
*
|
||||
*
|
||||
* A plugin(cb1/cb3/cb4) that is taken over, if the plugin was called before being taken over and has a registered SESSION_EVENT_CLOSING event,
|
||||
* it will be called again when the SESSION_EVENT_CLOSING event comes. Otherwise, the plugin will not be called.
|
||||
*/
|
||||
|
||||
@@ -42,8 +42,6 @@ enum session_event_type
|
||||
|
||||
struct stellar_session_event_extras;
|
||||
|
||||
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 *session_name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user