| 1221 | } |
| 1222 | |
| 1223 | bool PipelineParser::parse_long_press(const json::value& input, Action::LongPressParam& output, const Action::LongPressParam& default_value) |
| 1224 | { |
| 1225 | if (!parse_action_target(input, "target", output.target, default_value.target)) { |
| 1226 | LogError << "failed to parse_action_target" << VAR(input); |
| 1227 | return false; |
| 1228 | } |
| 1229 | |
| 1230 | if (!get_and_check_value(input, "duration", output.duration, default_value.duration)) { |
| 1231 | LogError << "failed to get_and_check_value duration" << VAR(input); |
| 1232 | return false; |
| 1233 | } |
| 1234 | |
| 1235 | if (!get_and_check_value(input, "contact", output.contact, default_value.contact)) { |
| 1236 | LogError << "failed to get_and_check_value contact" << VAR(input); |
| 1237 | return false; |
| 1238 | } |
| 1239 | |
| 1240 | if (!get_and_check_value(input, "pressure", output.pressure, default_value.pressure)) { |
| 1241 | LogError << "failed to get_and_check_value pressure" << VAR(input); |
| 1242 | return false; |
| 1243 | } |
| 1244 | |
| 1245 | return true; |
| 1246 | } |
| 1247 | |
| 1248 | bool PipelineParser::parse_swipe(const json::value& input, Action::SwipeParam& output, const Action::SwipeParam& default_value) |
| 1249 | { |
nothing calls this directly
no outgoing calls
no test coverage detected