| 75 | } |
| 76 | |
| 77 | MaaSinkId 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 | |
| 90 | void TaskerImpl::remove_sink(MaaSinkId id) |
| 91 | { |
nothing calls this directly
no test coverage detected