diff options
author | Nils Schwabe | 2014-03-04 17:54:57 +0100 |
---|---|---|
committer | Nils Schwabe | 2014-03-04 17:54:57 +0100 |
commit | 03b7858c880ea1fba3915af17c55b42d5e13c58a (patch) | |
tree | 7d1ea603194b98d213c3f90253371ef974f8ee0f /src/command_line_options.cpp | |
parent | Added httpxmldownloader (diff) | |
download | vmchooser2-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.cpp | 6 |
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; |