wpctl: add clear-default option to clear default configured node names
This MR adds 2 new APIs in module-default-nodes-api
:
- get-default-configured-node-name: which returns the default configured node name
- set-default-configured-node-name: which sets the default configured node name. If NULL is passed as a name, the API will clear the default configured node name.
Apart from this, the wpctl
tool has been improved in several ways:
- A new
clear-default
sub-command has been added to clear the default configured node names. If no arguments are passed, all the default configured node names will be cleared, otherwise, only the default configured node Id will be cleared (0
forAudio/Sink
,1
forAudio/Source
and2
forVideo/Source
). It uses the new set-default-configured-node-name API frommodule-default-nodes-api
. - The
status
sub-command has been improved to show the default configured node names in a new "Settings" section. It uses the new get-default-configured-node-name API frommodule-default-nodes-api
. - The
set-default
sub-command has been refactored to use the new set-default-configured-node-name API frommodule-default-nodes-api
, avoiding dealing with JSON formats.