MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / listPresetRules

Method listPresetRules

src/utils/CliRemoteController.cpp:277–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277bool 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
297bool CliRemoteController::addPresetRule(const QString &keyValue) const
298{

Callers

nothing calls this directly

Calls 4

handleReplyFunction · 0.85
rulesMethod · 0.80
getPresetRulesMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected