| 690 | } |
| 691 | |
| 692 | command_result CoreService::BindMethod(color_ostream &stream, |
| 693 | const dfproto::CoreBindRequest *in, |
| 694 | dfproto::CoreBindReply *out) |
| 695 | { |
| 696 | ServerFunctionBase *fn = connection()->findFunction(stream, in->plugin(), in->method()); |
| 697 | |
| 698 | if (!fn) |
| 699 | { |
| 700 | stream.printerr("RPC method not found: {}::{}\n", |
| 701 | in->plugin(), in->method()); |
| 702 | return CR_FAILURE; |
| 703 | } |
| 704 | |
| 705 | if (fn->p_in_template->GetTypeName() != in->input_msg() || |
| 706 | fn->p_out_template->GetTypeName() != in->output_msg()) |
| 707 | { |
| 708 | stream.printerr("Requested wrong signature for RPC method: {}::{}\n", |
| 709 | in->plugin(), in->method()); |
| 710 | return CR_FAILURE; |
| 711 | } |
| 712 | |
| 713 | out->set_assigned_id(fn->getId()); |
| 714 | return CR_OK; |
| 715 | } |
| 716 | |
| 717 | command_result CoreService::RunCommand(color_ostream &stream, |
| 718 | const dfproto::CoreRunCommandRequest *in) |
nothing calls this directly
no test coverage detected