MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / add_resource_sink

Function add_resource_sink

source/binding/NodeJS/src/apis/plugin.cpp:9–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include "ext.h"
8
9static void add_resource_sink(maajs::FunctionType func)
10{
11 auto ctx = std::make_unique<maajs::CallbackContext>(func, "ResourceSink");
12 QuickJSRuntimeBridgeInterface::get(func.Env())->plugin_add_sink(QuickJSRuntimeBridgeInterface::Resource, ResourceSink, ctx.get());
13 ExtContext::get(func.Env())->globalCallbacks.push_back(std::move(ctx));
14}
15
16static void add_controller_sink(maajs::FunctionType func)
17{

Callers

nothing calls this directly

Calls 4

moveFunction · 0.85
plugin_add_sinkMethod · 0.80
EnvMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected