From 526c110868cec72677660fcc75dfa15dbb43fff0 Mon Sep 17 00:00:00 2001 From: yangwei Date: Wed, 6 Nov 2024 13:53:03 +0800 Subject: 🦄 refactor(appid api): remove appid module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/stellar/appid.h | 32 -------------------------------- include/stellar/lpi_plus.h | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 32 deletions(-) delete mode 100644 include/stellar/appid.h create mode 100644 include/stellar/lpi_plus.h (limited to 'include') diff --git a/include/stellar/appid.h b/include/stellar/appid.h deleted file mode 100644 index d7e2506..0000000 --- a/include/stellar/appid.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include - -#include "stellar/session.h" -#include "stellar/module.h" - -enum APPID_ORIGIN -{ - ORIGIN_LPI_PLUS=0, - ORIGIN_APP_SKETCH_USER_DEFINE, - ORIGIN_PROTO_ENGINE, - ORIGIN_APP_SKETCH_BUILT_IN, - ORIGIN_PROTO_DECODED, - ORIGIN_EXCEED_PACKET_LIMIT, - ORIGIN_TUNNEL, - ORIGIN_MAX -}; - -typedef void on_appid_callback(struct session *sess, enum APPID_ORIGIN origin, int appid[], size_t appid_num, void *args); -int stellar_appid_create_topic(struct module_manager *mod_mgr); -int stellar_appid_subscribe(struct module_manager *mod_mgr, on_appid_callback *cb, void *args); - -#ifdef __cplusplus -} -#endif \ No newline at end of file diff --git a/include/stellar/lpi_plus.h b/include/stellar/lpi_plus.h new file mode 100644 index 0000000..0e624fb --- /dev/null +++ b/include/stellar/lpi_plus.h @@ -0,0 +1,21 @@ +#pragma once + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "stellar/module.h" +#include "stellar/session.h" + +#define LPI_PLUS_MODULE_NAME "LPI_PLUS" + +struct lpi_plus; +struct lpi_plus *module_to_lpi_plus(struct module *mod); + +typedef void on_appid_callback(struct session *sess, int appid[], size_t appid_num, void *args); +int lpi_plus_appid_subscribe(struct lpi_plus *lpip, on_appid_callback *cb, void *args); + +#ifdef __cplusplus +} +#endif \ No newline at end of file -- cgit v1.2.3