| 275 | } |
| 276 | |
| 277 | bool CliRemoteController::listPresetRules() const |
| 278 | { |
| 279 | #ifdef USE_PULSEAUDIO |
| 280 | Log::error("This feature is only supported in the PipeWire version of JamesDSP"); |
| 281 | return false; |
| 282 | #endif |
| 283 | |
| 284 | QList<PresetRule> rules; |
| 285 | if(checkConnectionAndLog()) { |
| 286 | auto reply = service->getPresetRules(); |
| 287 | rules = handleReply(reply).value_or(rules); |
| 288 | } |
| 289 | |
| 290 | rules = rules.empty() ? PresetManager::instance().rules().toList() : rules; |
| 291 | for(const PresetRule& rule : rules) { |
| 292 | Log::console(rule.deviceId + ":" + rule.routeId + "=" + rule.preset, true); |
| 293 | } |
| 294 | return !rules.empty(); |
| 295 | } |
| 296 | |
| 297 | bool CliRemoteController::addPresetRule(const QString &keyValue) const |
| 298 | { |
nothing calls this directly
no test coverage detected