| 23 | #define FPRT(fp, ...) fprintf(fp, __VA_ARGS__ ) |
| 24 | |
| 25 | void protobuf_util::ParseParameters(PbDeviceDefinition& device, const string& params) |
| 26 | { |
| 27 | if (params.empty()) { |
| 28 | return; |
| 29 | } |
| 30 | |
| 31 | // Old style parameter (filename), for backwards compatibility only |
| 32 | if (params.find(KEY_VALUE_SEPARATOR) == string::npos) { |
| 33 | SetParam(device, "file", params); |
| 34 | |
| 35 | return; |
| 36 | } |
| 37 | |
| 38 | for (const auto& p : Split(params, COMPONENT_SEPARATOR)) { |
| 39 | if (const auto& param = Split(p, KEY_VALUE_SEPARATOR, 2); param.size() == 2) { |
| 40 | SetParam(device, param[0], param[1]); |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | string protobuf_util::SetCommandParams(PbCommand& command, const string& params) |
| 46 | { |
nothing calls this directly
no test coverage detected