| 105 | } |
| 106 | |
| 107 | bool DataProcessorsRuntimeHost::onRemove(void* ctx, PJ_string_view_t id, PJ_error_t* out_error) noexcept { |
| 108 | auto* self = static_cast<DataProcessorsRuntimeHost*>(ctx); |
| 109 | if (self == nullptr) { |
| 110 | return false; |
| 111 | } |
| 112 | try { |
| 113 | const std::string key = DataProcessorService::makeTransformKey(self->plugin_id_, sdk::toStringView(id)); |
| 114 | auto status = self->service_.removeTransform(key); |
| 115 | if (!status.has_value()) { |
| 116 | sdk::fillError(out_error, kErrorRejected, kDomain, status.error()); |
| 117 | return false; |
| 118 | } |
| 119 | return true; |
| 120 | } catch (const std::exception& e) { |
| 121 | sdk::fillError(out_error, kErrorInternal, kDomain, e.what()); |
| 122 | return false; |
| 123 | } catch (...) { |
| 124 | sdk::fillError(out_error, kErrorInternal, kDomain, "unknown error removing data processor"); |
| 125 | return false; |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | bool DataProcessorsRuntimeHost::onList( |
| 130 | void* ctx, PJ_string_view_t* out_ids, uint64_t capacity, uint64_t* out_count, PJ_error_t* out_error) noexcept { |
nothing calls this directly
no test coverage detected