Introduce HTTP API for plugins (#5383)

This commit is contained in:
Mm2PL
2024-06-22 12:04:30 +02:00
committed by GitHub
parent 7dc80bc599
commit c980162656
19 changed files with 1166 additions and 11 deletions
+8 -1
View File
@@ -82,6 +82,9 @@ struct CompletionEvent {
/**
* @includefile common/Channel.hpp
* @includefile controllers/plugins/api/ChannelRef.hpp
* @includefile controllers/plugins/api/HTTPRequest.hpp
* @includefile controllers/plugins/api/HTTPResponse.hpp
* @includefile common/network/NetworkCommon.hpp
*/
/**
@@ -133,7 +136,11 @@ int searcherRelative(lua_State *L);
// This is a fat pointer that allows us to type check values given to functions needing a userdata.
// Ensure ALL userdata given to Lua are a subclass of this! Otherwise we garbage as a pointer!
struct UserData {
enum class Type { Channel };
enum class Type {
Channel,
HTTPRequest,
HTTPResponse,
};
Type type;
bool isWeak;
};