| 239 | } |
| 240 | |
| 241 | bool RemoteClient::bind(color_ostream &out, RemoteFunctionBase *function, |
| 242 | const std::string &name, const std::string &plugin) |
| 243 | { |
| 244 | if (!active || !socket->IsSocketValid()) |
| 245 | return false; |
| 246 | |
| 247 | bind_call.reset(); |
| 248 | |
| 249 | { |
| 250 | auto in = bind_call.in(); |
| 251 | |
| 252 | in->set_method(name); |
| 253 | if (!plugin.empty()) |
| 254 | in->set_plugin(plugin); |
| 255 | in->set_input_msg(function->p_in_template->GetTypeName()); |
| 256 | in->set_output_msg(function->p_out_template->GetTypeName()); |
| 257 | } |
| 258 | |
| 259 | if (bind_call(out) != CR_OK) |
| 260 | return false; |
| 261 | |
| 262 | function->id = bind_call.out()->assigned_id(); |
| 263 | |
| 264 | return true; |
| 265 | } |
| 266 | |
| 267 | command_result RemoteClient::run_command(color_ostream &out, const std::string &cmd, |
| 268 | const std::vector<std::string> &args) |
no test coverage detected