summaryrefslogtreecommitdiffstats
path: root/src/command_line_options.cpp
diff options
context:
space:
mode:
authorNils Schwabe2014-03-04 17:54:57 +0100
committerNils Schwabe2014-03-04 17:54:57 +0100
commit03b7858c880ea1fba3915af17c55b42d5e13c58a (patch)
tree7d1ea603194b98d213c3f90253371ef974f8ee0f /src/command_line_options.cpp
parentAdded httpxmldownloader (diff)
downloadvmchooser2-03b7858c880ea1fba3915af17c55b42d5e13c58a.tar.gz
vmchooser2-03b7858c880ea1fba3915af17c55b42d5e13c58a.tar.xz
vmchooser2-03b7858c880ea1fba3915af17c55b42d5e13c58a.zip
- included the --url commandline options for a xml url
- httpxmldownloader moved to main.cpp (it's finally working :D) - given url is downloaded and printed on commandline - todo: parse http response
Diffstat (limited to 'src/command_line_options.cpp')
-rw-r--r--src/command_line_options.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/command_line_options.cpp b/src/command_line_options.cpp
index 1cf1194..baeca05 100644
--- a/src/command_line_options.cpp
+++ b/src/command_line_options.cpp
@@ -11,6 +11,7 @@ CommandLineOptions::CommandLineOptions(int argc, char * const argv[]) {
{"file", required_argument, NULL, 'f'},
{"path", required_argument, NULL, 'p'},
{"xpath", required_argument, NULL, 'x'},
+ {"url", required_argument, NULL, 'u'},
{"size", required_argument, NULL, 's'},
{"theme", required_argument, NULL, 't'},
{"pvs", no_argument, NULL, 'b'},
@@ -22,7 +23,7 @@ CommandLineOptions::CommandLineOptions(int argc, char * const argv[]) {
int c;
- while ((c = getopt_long(argc, argv, "c:d:e:f:p:x:s:t:w:vhbD", longOptions, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "c:d:e:f:p:x:u:s:t:w:vhbD", longOptions, NULL)) != -1) {
switch (c) {
case 'c':
options.insert("config", optarg);
@@ -45,6 +46,9 @@ CommandLineOptions::CommandLineOptions(int argc, char * const argv[]) {
case 'x':
options.insert("xpath", optarg);
break;
+ case 'u':
+ options.insert("url", optarg);
+ break;
case 's':
options.insert("size", optarg);
break;