src/CLIParser.h
branchv_0
changeset 10 ded44e94147c
parent 8 8ef1980db907
child 11 07247893054e
--- a/src/CLIParser.h	Tue Oct 06 16:24:18 2020 +0200
+++ b/src/CLIParser.h	Tue Oct 06 16:55:22 2020 +0200
@@ -49,6 +49,8 @@
 public:
 
 	static const relpipe::common::type::StringX OPTION_JACK_CLIENT_NAME;
+	static const relpipe::common::type::StringX OPTION_JACK_CONNECT_TO_PORT;
+	static const relpipe::common::type::StringX OPTION_REQUIRED_JACK_CONNECTIONS;
 
 	Configuration parse(const std::vector<relpipe::common::type::StringX>& arguments) {
 		Configuration c;
@@ -58,6 +60,10 @@
 
 			if (option == OPTION_JACK_CLIENT_NAME) {
 				c.jackClientName = readNext(arguments, i);
+			} else if (option == OPTION_JACK_CONNECT_TO_PORT) {
+				c.portsToConnect.push_back(readNext(arguments, i));
+			} else if (option == OPTION_REQUIRED_JACK_CONNECTIONS) {
+				c.requiredJackConnections = std::stoi(readNext(arguments, i));
 			} else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
 		}
 
@@ -69,6 +75,8 @@
 };
 
 const relpipe::common::type::StringX CLIParser::OPTION_JACK_CLIENT_NAME = L"--jack-client-name";
+const relpipe::common::type::StringX CLIParser::OPTION_JACK_CONNECT_TO_PORT = L"--jack-connect-to-port";
+const relpipe::common::type::StringX CLIParser::OPTION_REQUIRED_JACK_CONNECTIONS = L"--required-jack-connections";
 
 }
 }