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

Method add_sink

source/binding/NodeJS/src/apis/tasker.cpp:77–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77MaaSinkId TaskerImpl::add_sink(maajs::FunctionType sink)
78{
79 auto ctx = new maajs::CallbackContext(sink, "TaskerSink");
80 auto id = MaaTaskerAddSink(tasker, TaskerSink, ctx);
81 if (id != MaaInvalidId) {
82 sinks[id] = ctx;
83 }
84 else {
85 delete ctx;
86 }
87 return id;
88}
89
90void TaskerImpl::remove_sink(MaaSinkId id)
91{

Callers

nothing calls this directly

Calls 1

MaaTaskerAddSinkFunction · 0.85

Tested by

no test coverage detected