summaryrefslogtreecommitdiff
path: root/src/OptionHandler.h
Commit message (Collapse)AuthorAgeFilesLines
* Use default where possibleNils Maier2016-08-291-1/+1
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-5/+1
|
* Include prefs.h instead of typedef PrefPtr everywhereTatsuhiro Tsujikawa2013-09-261-2/+1
|
* Introduce PrefPtr typedefNils Maier2013-09-191-1/+2
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-1/+0
|
* Handle OptionHandlers as raw pointerTatsuhiro Tsujikawa2012-09-271-1/+1
|
* Rewritten help tags and various internal flag handling in OptionHandlerTatsuhiro Tsujikawa2012-09-231-3/+3
| | | | | 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.
* New help messages. Added suggestion for unknown/ambiguous options.Tatsuhiro Tsujikawa2011-12-031-0/+3
| | | | | | | The help messages shown when argument error were redesigned and less verbose now. When unknown or ambiguous option is given, show suggestions like "Did you mean...". Some constant values related to levenstein distance are borrowed from git help.c.
* Made Pref::k_, OptionHandler::getName() and getDescription() const char*.Tatsuhiro Tsujikawa2011-11-111-3/+3
|
* Options for -i list is now available in aria2.changeOption.Tatsuhiro Tsujikawa2011-10-291-0/+2
| | | | | | | | | Options for -i list, except for PREF_CHECKSUM, PREF_DIR, PREF_DRY_RUN, PREF_INDEX_OUT, PREF_LOWEST_SPEED_LIMIT, PREF_MAX_CONNECTION_PER_SERVER, PREF_METALINK_BASE_URI, PREF_OUT, PREF_PIECE_LENGTH, PREF_SELECT_FILE, PREF_SPLIT, PREF_PAUSE and PREF_PARAMETERIZED_URI, are available in aria2.changeOption if the download is waiting state, including paused downloads.
* Removed OptionHandler::{get,set}OptionID() and canHandle().Tatsuhiro Tsujikawa2011-10-221-30/+0
| | | | Removed typedefs in OptionHandler and NameMatchOptionHandler.
* Renamed OptionHandler::setGlobalChangeOption() as setChangeGlobalOption().Tatsuhiro Tsujikawa2011-10-221-2/+2
|
* OptionHandler now knows its option can be used in -i list option,Tatsuhiro Tsujikawa2011-10-221-0/+9
| | | | | | changeable in aria2.changeOption or aria2.changeGlobalOption. OptionHandler also now its option is cumulative.
* Rewritten OptionParser. Made it simpler and efficient.Tatsuhiro Tsujikawa2011-10-221-0/+3
|
* Applied patch from Dan Fandrich.Tatsuhiro Tsujikawa2011-05-071-0/+1
| | | | | Thanks to Dan Fandrich. I modified some lines to suite my taste.
* Erase user and password specified in command-line from argv.Tatsuhiro Tsujikawa2011-04-221-0/+6
| | | | The user and password is masked with '*'.
* 2010-11-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-231-0/+9
| | | | | | | | | | | | | Cleaned up Possible Values in usage help. More than 2 values are delimited by ", ". * src/NameMatchOptionHandler.h * src/OptionHandler.cc * src/OptionHandler.h * src/OptionHandlerFactory.cc * src/OptionHandlerImpl.cc * test/OptionHandlerTest.cc
* 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-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-1/+1
| | | | | | | | | 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-2/+24
| | | | | | | | | | | | | 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-03-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-03-081-0/+2
| | | | | | | | | Declared hide() in OptionHandler. * src/NameMatchOptionHandler.h * src/OptionHandler.h * src/OptionHandlerImpl.h
* 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-02-071-2/+18
| | | | | | | | | | | | | | | | | | | | 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-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+13
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preallocate non-requested file which is adjacent forward to requested file('requested' files means the files given in --select-file option) if they share a same piece. This fixes long pause in the file system which doesn't support sparse files like FAT32 while downloading. * src/MultiFileAllocationIterator.{h, cc} * test/MultiFileAllocationIteratorTest.cc * src/FileEntry.{h, cc} Removed unused _option. * src/MultiDiskAdaptor.h * test/MultiDiskAdaptorTest.cc * src/DefaultPieceStorage.cc Set the default value of --seed-ratio to 1.0. If 0.0 is given, then seeding continues regardless of share ratio. * src/version_usage.cc * src/option_processing.cc * src/BtSetup.cc * doc/aria2c.1.txt * doc/aria2c.1 Fixed: Selective download is not working in BitTorrent * src/RequestGroup.cc Introduced Sequence class. Use this instead of Util::unfoldRange() * src/PieceStorage.h * test/MockPieceStorage.h * src/UnknownLengthPieceStorage.h * src/DefaultPieceStorage.{h, cc} * src/Metalink2RequestGroup.cc * src/RequestGroup.cc * src/Sequence.h * test/SequenceTest.cc * src/IntSequence.h * src/message.h * src/Util.{h, cc} * test/UtilTest.cc Added new function 'parse' to catch exception thrown by subclass's parseArg * src/OptionHandler.h * src/OptionParser.cc * src/NameMatchOptionHandler.h * src/OptionHandlerImpl.h * test/OptionHandlerTest.cc Added IntegerRangeOptionHandler. Used for --listen-port and --select-file. Now --listen-port accepts range of port. * src/OptionHandlerFactory.cc * src/version_usage.cc * src/OptionHandlerImpl.h * src/option_processing.cc * src/BtSetup.cc * src/PeerListenCommand.{h, cc} * doc/aria2c.1.txt * doc/aria2c.1 Implemented operator< for Exception class to provide easy way to print exception stack trace. * src/Exception.{h, cc} * src/main.cc * src/option_processing.cc
* 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-03-261-0/+51
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.