🦄 refactor(appid api): remove appid module

This commit is contained in:
yangwei
2024-11-06 13:53:03 +08:00
parent 8ddef31bb5
commit 526c110868
14 changed files with 102 additions and 143 deletions

View File

@@ -1,32 +0,0 @@
#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
#include <stddef.h>
#include <stdint.h>
#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

View File

@@ -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