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

Method add_sink

source/binding/NodeJS/src/apis/controller.cpp:83–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83MaaSinkId ControllerImpl::add_sink(maajs::FunctionType sink)
84{
85 auto ctx = new maajs::CallbackContext(sink, "ControllerSink");
86 auto id = MaaControllerAddSink(controller, ControllerSink, ctx);
87 if (id != MaaInvalidId) {
88 sinks[id] = ctx;
89 }
90 else {
91 delete ctx;
92 }
93 return id;
94}
95
96void ControllerImpl::remove_sink(MaaSinkId id)
97{

Callers

nothing calls this directly

Calls 1

MaaControllerAddSinkFunction · 0.85

Tested by

no test coverage detected