summaryrefslogtreecommitdiff
path: root/src/OptionParser.h
Commit message (Collapse)AuthorAgeFilesLines
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-4/+4
|
* Fixed some typos in code commentsDan Fandrich2015-01-161-1/+1
|
* Include prefs.h instead of typedef PrefPtr everywhereTatsuhiro Tsujikawa2013-09-261-2/+2
|
* Introduce PrefPtr typedefNils Maier2013-09-191-1/+2
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-3/+3
|
* Add initialization function and addUri API function for libaria2Tatsuhiro Tsujikawa2013-04-261-0/+3
|
* Release statically allocated resources for prefs and optionsTatsuhiro Tsujikawa2012-12-081-0/+3
| | | | | | | Not realeasing these resources does not hurt the correctness of the program, but memory leak detection tool, such as valgrind, reports it as potential memory leak. It is better to distinguish it from the real ones.
* Handle OptionHandlers as raw pointerTatsuhiro Tsujikawa2012-09-271-10/+9
|
* Rewritten help tags and various internal flag handling in OptionHandlerTatsuhiro Tsujikawa2012-09-231-1/+1
| | | | | Now help tags are defined as enum values to avoid vector of strings. The internal flags are represented by bitmask to shrink size.
* Fixed clang warning and errors.Tatsuhiro Tsujikawa2012-03-011-1/+1
| | | | | | Test for the zero-length array with A2_ARRAY_LEN was commented out since it is only used in unit test code and clang and old gcc 3.4.3 emit error.
* Rewritten OptionParser. Made it simpler and efficient.Tatsuhiro Tsujikawa2011-10-221-20/+11
|
* Erase user and password specified in command-line from argv.Tatsuhiro Tsujikawa2011-04-221-1/+1
| | | | The user and password is masked with '*'.
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-1/+1
| | | | | | | | | Added .cc file for classes/structs that only provided by header file. Defined non-POD classes' ctor, dtor in .cc file. Moved implementation code in header file to .cc file for major classes/strucsts.
* 2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-311-3/+3
| | | | | | Made #include guard consistent for c++ header files.
* 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-4/+4
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-05-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-05-081-1/+1
| | | | | | | | | | | | | | Return const reference. * src/DefaultPieceStorage.h * src/DownloadContext.h * src/FeatureConfig.cc * src/FeatureConfig.h * src/OptionParser.cc * src/OptionParser.h * src/SimpleRandomizer.cc * src/SimpleRandomizer.h
* 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-2/+1
| | | | | | | Use vector instead of deque for containers which is used for mostly read-only purpose.
* 2010-01-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-101-3/+0
| | | | | | | | | | | | Removed Logger from OptionParser. When OptionParser is used to parse options at bootstrap, LogFactory is not configured yet properly. When LogFactory is used in OptionParser, it initializes itself to return a logger which has no ability to write log to the disk. * src/OptionParser.cc * src/OptionParser.h
* 2010-01-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-091-0/+3
| | | | | | | | | | | Fixed the bug that causes segmentation fault if unknown option is put in aria2.conf file. BUG#2928303 * src/OptionParser.cc * src/OptionParser.h * src/option_processing.cc * test/OptionParserTest.cc
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-2/+2
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2009-12-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-12-201-7/+14
| | | | | | | | | | | | | Sort _optionHandlers in OptionParser by name in ascending order. Use vector instead of deque for efficiency. * src/OptionHandler.h * src/OptionHandlerFactory.h * src/OptionParser.cc * src/OptionParser.h * src/version_usage.cc * test/OptionParserTest.cc
* 2009-05-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-05-121-1/+1
| | | | | | | | | | | | | | | | | Throw DlAbortEx instead of FatalException during parsing options because we don't want for aria2 to quit when bad option is passed via XML-RPC. * src/OptionHandlerException.cc * src/OptionHandlerException.h * src/OptionHandlerImpl.h * src/OptionParser.cc * src/OptionParser.h * src/PStringSegment.cc * src/ParameterizedStringParser.cc * src/download_helper.cc * test/ParameterizedStringParserTest.cc
* 2009-05-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-05-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added xml-rpc functionality. Currently only addURI commad is supported. To enable xml-rpc, run aria2 with --enable-http-server. This option name is temporal and will be changed. The feature that reports download progress in html format is temporarily disabled. * src/HttpServer.cc * src/HttpServer.h * src/HttpServerBodyCommand.cc * src/HttpServerBodyCommand.h * src/HttpServerCommand.cc * src/HttpServerResponseCommand.cc * src/Makefile.am * src/OptionParser.cc * src/OptionParser.h * src/RequestGroupMan.cc * src/RequestGroupMan.h * src/XmlRpcMethod.cc * src/XmlRpcMethod.h * src/XmlRpcMethodFactory.cc * src/XmlRpcMethodFactory.h * src/XmlRpcMethodImpl.cc * src/XmlRpcMethodImpl.h * src/download_helper.cc * src/download_helper.h * test/Makefile.am * test/XmlRpcMethodTest.cc
* 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-02-071-3/+19
| | | | | | | | | | | | | | | | | | | | Added OptionParser::parseArg() which internally uses getopt_long to parse command-line options. All command-line options are now configured by OptionHandler. No manual editing of struct option* is required any more. * src/NameMatchOptionHandler.h * src/OptionHandler.h * src/OptionHandlerFactory.cc * src/OptionHandlerImpl.h * src/OptionParser.cc * src/OptionParser.h * src/array_fun.h * src/main.cc * src/option_processing.cc * test/OptionHandlerTest.cc * test/OptionParserTest.cc
* 2008-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-09-221-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrated HelpItem into OptionParser to ease the workload for adding new options. Removed default value from usage text. * src/HelpItem.cc: Removed. * src/HelpItem.h: Removed. * src/HelpItemFactory.cc: Removed. * src/HelpItemFactory.h: Removed. * src/Makefile.am * src/Makefile.in * src/NameMatchOptionHandler.h * src/OptionHandler.cc * src/OptionHandler.h * src/OptionHandlerFactory.cc * src/OptionHandlerImpl.h * src/OptionParser.cc * src/OptionParser.h * src/TagContainer.cc: Removed. * src/TagContainer.h: Removed. * src/TaggedItem.cc: Removed. * src/TaggedItem.h: Removed. * src/main.cc * src/option_processing.cc * src/usage_text.h * src/version_usage.cc * test/HelpItemTest.cc: Removed. * test/Makefile.am * test/Makefile.in * test/OptionHandlerTest.cc * test/OptionParserTest.cc * test/TagContainerTest.cc: Removed.
* 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-10/+15
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-03-261-0/+61
To the ability to read options from a config file: * src/main.cc: Command-line parameter validation is delegated to OptionHandler class. * src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class. * src/Option.h, src/Option.cc (clear): New function. * src/OptionParser.h, src/OptionParser.cc: New class. * src/OptionHandler.h: New class. * src/NameMatchOptionHandler.h: New class. * src/OptionHandlerImpl.h: New classes. * src/prefs.h: '_' -> '-' (FTP_PASV_ENABLED): Renamed to FTP_PASV. (FTP_PASV): New definition. * src/Util.h, src/Util.cc (getRealSize): New function. To disable netrc support if .netrc file does not have correct permissions: * src/File.h, src/File.cc (mode): New function. To prevent confidential information to be logged: * src/HttpConnection.h, src/HttpConnection.cc (eraseConfidentialInfo): New function. (sendRequest): Call eraseConfidentialInfo(). (sendProxyRequest): Call eraseConfidentialInfo(). * src/main.cc: Validate permissions of .netrc file. To add --user-agent command-line option: * src/main.cc: Added new command line option: --user-agent * src/prefs.h (PREF_USER_AGENT): New definition. * src/HttpRequestCommand.cc (executeInternal): Set user-agent option parameter to HttpRequest object. Marged the patches from Dan Fandrich.