move stellar/session_manager.h into stellar/session.h
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "stellar/utils.h"
|
#include "stellar/utils.h"
|
||||||
#include "stellar/packet.h"
|
#include "stellar/packet.h"
|
||||||
#include "stellar/session_manager.h"
|
#include "stellar/session.h"
|
||||||
|
|
||||||
#include "appid/appid_internal.h"
|
#include "appid/appid_internal.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ extern "C"
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "stellar/packet.h"
|
#include "stellar/packet.h"
|
||||||
|
#include "stellar/module_manager.h"
|
||||||
|
|
||||||
enum session_state
|
enum session_state
|
||||||
{
|
{
|
||||||
@@ -146,6 +147,20 @@ void session_set_discard(struct session *sess);
|
|||||||
void session_set_exdata(struct session *sess, int idx, void *ex_ptr);
|
void session_set_exdata(struct session *sess, int idx, void *ex_ptr);
|
||||||
void *session_get_exdata(const struct session *sess, int idx);
|
void *session_get_exdata(const struct session *sess, int idx);
|
||||||
|
|
||||||
|
struct session_manager;
|
||||||
|
struct session_manager *stellar_module_get_session_manager(struct stellar_module_manager *mod_mgr);
|
||||||
|
int session_manager_new_session_exdata_index(struct session_manager *sess_mgr, const char *name, exdata_free *func, void *arg);
|
||||||
|
|
||||||
|
typedef void on_session_free_callback(struct session *sess, void *args);
|
||||||
|
typedef void on_session_packet_callback(struct session *sess, struct packet *pkt, void *args);
|
||||||
|
typedef void on_tcp_stream_callback(struct session *sess, const char *tcp_payload, uint32_t tcp_payload_len, void *args);
|
||||||
|
|
||||||
|
int session_manager_subscribe_free(struct session_manager *sess_mgr, on_session_free_callback *cb, void *args);
|
||||||
|
int session_manager_subscribe_tcp(struct session_manager *sess_mgr, on_session_packet_callback *cb, void *args);
|
||||||
|
int session_manager_subscribe_udp(struct session_manager *sess_mgr, on_session_packet_callback *cb, void *args);
|
||||||
|
int session_manager_subscribe_control_packet(struct session_manager *sess_mgr, on_session_packet_callback *cb, void *args);
|
||||||
|
int session_manager_subscribe_tcp_stream(struct session_manager *sess_mgr, on_tcp_stream_callback *cb, void *args);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "stellar/exdata.h"
|
|
||||||
#include "stellar/session.h"
|
|
||||||
|
|
||||||
#include "stellar/module_manager.h"
|
|
||||||
|
|
||||||
struct session_manager;
|
|
||||||
|
|
||||||
struct session_manager *stellar_module_get_session_manager(struct stellar_module_manager *mod_mgr);
|
|
||||||
|
|
||||||
int session_manager_new_session_exdata_index(struct session_manager *sess_mgr, const char *name, exdata_free *func, void *arg);
|
|
||||||
|
|
||||||
typedef void on_session_free_callback(struct session *sess, void *args);
|
|
||||||
typedef void on_session_packet_callback(struct session *sess, struct packet *pkt, void *args);
|
|
||||||
typedef void on_tcp_stream_callback(struct session *sess, const char *tcp_payload, uint32_t tcp_payload_len, void *args);
|
|
||||||
|
|
||||||
int session_manager_subscribe_free(struct session_manager *sess_mgr, on_session_free_callback *cb, void *args);
|
|
||||||
int session_manager_subscribe_tcp(struct session_manager *sess_mgr, on_session_packet_callback *cb, void *args);
|
|
||||||
int session_manager_subscribe_udp(struct session_manager *sess_mgr, on_session_packet_callback *cb, void *args);
|
|
||||||
int session_manager_subscribe_control_packet(struct session_manager *sess_mgr, on_session_packet_callback *cb, void *args);
|
|
||||||
int session_manager_subscribe_tcp_stream(struct session_manager *sess_mgr, on_tcp_stream_callback *cb, void *args);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "stellar/packet.h"
|
#include "stellar/packet.h"
|
||||||
#include "stellar/session_manager.h"
|
#include "stellar/session.h"
|
||||||
|
|
||||||
#include "utils_internal.h"
|
#include "utils_internal.h"
|
||||||
#include "session_internal.h"
|
#include "session_internal.h"
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include "stellar/appid.h"
|
#include "stellar/appid.h"
|
||||||
#include "stellar/module_manager.h"
|
#include "stellar/module_manager.h"
|
||||||
#include "stellar/session_manager.h"
|
|
||||||
#include "stellar/session.h"
|
#include "stellar/session.h"
|
||||||
#include "stellar/utils.h"
|
#include "stellar/utils.h"
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "stellar/log.h"
|
#include "stellar/log.h"
|
||||||
#include "stellar/module_manager.h"
|
#include "stellar/module_manager.h"
|
||||||
#include "stellar/session_manager.h"
|
#include "stellar/session.h"
|
||||||
|
|
||||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user