From eb866bf6e8302d2fc26ac8c490d28ba9adc6bd67 Mon Sep 17 00:00:00 2001 From: Nedko Arnaudov Date: Sun, 7 Nov 2010 20:59:20 +0200 Subject: [PATCH] ladishd: save additional attributes for graph objects For clients, save the naming scheme used. sometimes it is useful to maintain the original jack or alsa client name. For ports, save port type and direction, alsa ports can be bidirectional, this renders as two a2j ports. --- daemon/save.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/daemon/save.c b/daemon/save.c index e79fe1c8..366cc565 100644 --- a/daemon/save.c +++ b/daemon/save.c @@ -146,6 +146,16 @@ ladish_save_vgraph_client_begin( return false; } + if (!ladish_write_string(fd, "\" naming=\"")) + { + return false; + } + + if (!ladish_write_string(fd, "app")) + { + return false; + } + if (!ladish_write_string(fd, "\">\n")) { return false; @@ -265,6 +275,26 @@ ladish_save_vgraph_port( return false; } + if (!ladish_write_string(fd, "\" type=\"")) + { + return false; + } + + if (!ladish_write_string(fd, port_type == JACKDBUS_PORT_TYPE_AUDIO ? "audio" : "midi")) + { + return false; + } + + if (!ladish_write_string(fd, "\" direction=\"")) + { + return false; + } + + if (!ladish_write_string(fd, JACKDBUS_PORT_IS_INPUT(port_flags) ? "input" : "output")) + { + return false; + } + if (link) { if (!ladish_write_string(fd, "\" link_uuid=\""))