summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorluwenpeng <[email protected]>2024-10-25 14:38:51 +0800
committerluwenpeng <[email protected]>2024-10-25 14:38:51 +0800
commit4061d5a942392c4716586ded8c586440d2e920ca (patch)
tree07d44e4b4fc7bbac77bbb4f3bb7df7c17404e35c /include
parente2c212fb71769f1a4cd9f66c984bf82e6b6bdb42 (diff)
move stellar/session_manager.h into stellar/session.h
Diffstat (limited to 'include')
-rw-r--r--include/stellar/session.h15
-rw-r--r--include/stellar/session_manager.h33
2 files changed, 15 insertions, 33 deletions
diff --git a/include/stellar/session.h b/include/stellar/session.h
index 6e65a8e..aff1974 100644
--- a/include/stellar/session.h
+++ b/include/stellar/session.h
@@ -6,6 +6,7 @@ extern "C"
#endif
#include "stellar/packet.h"
+#include "stellar/module_manager.h"
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_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
}
#endif
diff --git a/include/stellar/session_manager.h b/include/stellar/session_manager.h
deleted file mode 100644
index 1ff6428..0000000
--- a/include/stellar/session_manager.h
+++ /dev/null
@@ -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