| 81 | } |
| 82 | |
| 83 | MaaSinkId 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 | |
| 96 | void ControllerImpl::remove_sink(MaaSinkId id) |
| 97 | { |
nothing calls this directly
no test coverage detected