src/CLIParser.h
branchv_0
changeset 14 cde9bb07ea0a
parent 13 326935d1bfab
child 15 463ce61415f1
--- a/src/CLIParser.h	Thu Oct 08 16:45:50 2020 +0200
+++ b/src/CLIParser.h	Thu Oct 08 17:23:07 2020 +0200
@@ -51,6 +51,8 @@
 	static const relpipe::common::type::StringX OPTION_CLIENT;
 	static const relpipe::common::type::StringX OPTION_PORT;
 	static const relpipe::common::type::StringX OPTION_CONNECT_TO;
+	static const relpipe::common::type::StringX OPTION_CONNECT_PORTS;
+	static const relpipe::common::type::StringX OPTION_DISCONNECT_PORTS;
 	static const relpipe::common::type::StringX OPTION_REQUIRED_CONNECTIONS;
 	static const relpipe::common::type::StringX OPTION_LIST_PORTS;
 	static const relpipe::common::type::StringX OPTION_LIST_CONNECTIONS;
@@ -68,6 +70,8 @@
 				c.port = readNext(arguments, i);
 			} else if (option == OPTION_CONNECT_TO) {
 				c.connectTo.push_back(readNext(arguments, i));
+			} else if (option == OPTION_CONNECT_PORTS || option == OPTION_DISCONNECT_PORTS) {
+				c.connectionRecipes.push_back({option == OPTION_CONNECT_PORTS, readNext(arguments, i), readNext(arguments, i)});
 			} else if (option == OPTION_REQUIRED_CONNECTIONS) {
 				c.requiredConnections = std::stoi(readNext(arguments, i));
 			} else if (option == OPTION_LIST_PORTS) {
@@ -89,6 +93,8 @@
 const relpipe::common::type::StringX CLIParser::OPTION_CLIENT = L"--client";
 const relpipe::common::type::StringX CLIParser::OPTION_PORT = L"--port";
 const relpipe::common::type::StringX CLIParser::OPTION_CONNECT_TO = L"--connect-to";
+const relpipe::common::type::StringX CLIParser::OPTION_CONNECT_PORTS = L"--connect-ports";
+const relpipe::common::type::StringX CLIParser::OPTION_DISCONNECT_PORTS = L"--disconnect-ports";
 const relpipe::common::type::StringX CLIParser::OPTION_REQUIRED_CONNECTIONS = L"--required-connections";
 const relpipe::common::type::StringX CLIParser::OPTION_LIST_PORTS = L"--list-ports";
 const relpipe::common::type::StringX CLIParser::OPTION_LIST_CONNECTIONS = L"--list-connections";