summaryrefslogtreecommitdiff
path: root/src/main.cc
Commit message (Collapse)AuthorAgeFilesLines
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-8/+8
|
* mingw32: Use CommandLineToArgvW() and GetCommandLineW() to read cmd-line argsTatsuhiro Tsujikawa2013-11-011-0/+24
| | | | This change enables aria2 to read unicode characters in command-line.
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-1/+0
|
* Suppress console output for none-standalone modeTatsuhiro Tsujikawa2013-05-021-0/+1
|
* Add initialization function and addUri API function for libaria2Tatsuhiro Tsujikawa2013-04-261-1/+2
|
* Move initialization code in aria2::main to struct ContextTatsuhiro Tsujikawa2013-04-251-243/+6
|
* Save options directly specified for download in --save-sessionTatsuhiro Tsujikawa2013-04-111-8/+10
| | | | | | | This change makes --save-session save only options specified for download, more specifically, options in command-line, -i file and via RPC. The other options from conf file and default values are not saved. This will drastically decrease the size of session file.
* Check non-loopback (and non-linklocak for IPv6) address is configuredTatsuhiro Tsujikawa2013-03-311-0/+1
| | | | | | Issue A record query only when non-loopback IPv4 address is configured. Likewise, issue AAA record query only when non-loopback and non-linklocak IPv6 address is configured.
* Revert 6b55f5d3 because it breaks opensolaris buildTatsuhiro Tsujikawa2013-03-171-7/+1
|
* Do changes in 8aa1db6 in other places which include signal.hTatsuhiro Tsujikawa2013-03-031-1/+7
|
* Set sa_mask when setting signal handlerTatsuhiro Tsujikawa2013-02-141-3/+8
|
* Added --console-log-level optionTatsuhiro Tsujikawa2013-01-051-0/+1
| | | | --console-log-level option sets log level to output to console.
* Added --gid optionTatsuhiro Tsujikawa2012-12-161-0/+1
| | | | | | | | | | | This option sets GID manually. aria2 identifies each download by the ID called GID. The GID must be hex string of 16 characters, thus [0-9a-zA-Z] are allowed and leading zeros must not be stripped. The GID all 0 is reserved and must not be used. The GID must be unique, otherwise error is reported and the download is not added. This option is useful when restoring the sessions saved using --save-session option. If this option is not used, new GID is generated by aria2.
* Removed unused staticSHA1DigestTatsuhiro Tsujikawa2012-12-071-4/+0
|
* Specify torrent file explicitly in createRequestGroupForBitTorrent()Tatsuhiro Tsujikawa2012-07-261-1/+2
|
* Added --deferred-input option.Tatsuhiro Tsujikawa2012-02-051-3/+11
| | | | | | | | | If true is given to --deferred-input option, aria2 does not read all URIs and options from file specified by -i option at startup, but it reads one by one when it needs later. This may reduce memory usage if input file contains a lot of URIs to download. If false is given, aria2 reads all URIs and options at startup. This option defaults to false.
* Fixed the bug that log file is not created if there is warning before log openTatsuhiro Tsujikawa2011-12-271-0/+1
| | | | | Use LogFactory::reconfigure() to reopen log file after setting log filename from option.
* Added --checksum option.Tatsuhiro Tsujikawa2011-08-231-0/+1
| | | | | | | | Added --checksum=TYPE=DIGEST option. This option sets checksum. TYPE is hash type. The supported hash type is listed in "Hash Algorithms" in "aria2c -v". DIGEST is hex digest. For example, setting sha-1 digest looks like this: sha-1=0192ba11326fe2298c8cb4de616f4d4140213838 This option applies only to HTTP(S)/FTP downloads.
* global cout and cerr is now retrieved using global::cout() and global::cerr()Tatsuhiro Tsujikawa2011-08-101-8/+10
| | | | | This is necessary to avoid global variable initialization order problem.
* Use global::cout to output string to stdout.Tatsuhiro Tsujikawa2011-08-091-13/+12
| | | | | | | In MinGW32 build, global::cout is WinConsoleFile. When outputing to console, it uses WriteConsoleW, so Unicode characters are written. Fixed memory leak in WChar<->MultiByte conversion functions. The portion of code which uses std::cout is rewritten to use global::cout.
* Added --pause option.Tatsuhiro Tsujikawa2011-06-161-0/+1
| | | | | | | This option pauses download after added. This option is effective only when --enable-rpc=true is given. When --save-session option is used and there are paused downloads, they are saved with --pause=true so that it will become paused state when the session is recovered.
* Added --truncate-console-readout option.Tatsuhiro Tsujikawa2011-06-151-0/+1
| | | | | | This option truncates console readout to fit in a single line. This is default. Give false value to this option to tell aria2 not to truncate console readout.
* Added --metalink-base-uri option.Tatsuhiro Tsujikawa2011-05-141-1/+2
| | | | | | --metalink-uri option specifies base URI to resolve relative URI in metalink file stored in local disk. If URI points to a directory, URI must end with '/'.
* Erase user and password specified in command-line from argv.Tatsuhiro Tsujikawa2011-04-221-1/+1
| | | | The user and password is masked with '*'.
* Added --show-console-readout option.Tatsuhiro Tsujikawa2011-03-271-2/+5
| | | | This option toggles appearance of console readout.
* Updated docTatsuhiro Tsujikawa2011-03-181-3/+3
|
* Deprecated --enable-xml-rpc and --xml-rpc-* option. IntroducedTatsuhiro Tsujikawa2011-03-141-1/+1
| | | | | | | --enable-rpc and --rpc-* option instead. --enable-xml-rpc and --xml-rpc-* option can be used but warning message will be shown. The help tag #xml-rpc was replaced with #rpc.
* Renamed classes in abstract layer of RPC service from XmlRpc* to Rpc*.Tatsuhiro Tsujikawa2011-03-141-5/+1
| | | | | Now JSON-RPC is available by default regardless of XML library. XML-RPC becomes available when XML library is available.
* Renamed MessageDigestHelper as message_digest_helperTatsuhiro Tsujikawa2011-02-051-2/+2
| | | | | Static member variables in MessageDigestHelper class are now functions under message_digest namespace.
* Renamed MetalinkHelper as metalink_helper.Tatsuhiro Tsujikawa2011-02-051-2/+2
| | | | | Static member functions in MetalinkHelper class is now functions under metalink namespace.
* Use Exception::getErrorCode() in main() instead of error_code::UNKNOWN_ERRORTatsuhiro Tsujikawa2010-12-051-1/+1
| | | | unconditionally.
* Throw exception when unrecognized URI, bad Metalink or bad .torrentTatsuhiro Tsujikawa2010-12-041-1/+1
| | | | file are given in command-line and exits with status non-zero.
* Removed DownloadContext::dir_. Use PREF_DIR value instead.Tatsuhiro Tsujikawa2010-12-031-1/+2
|
* Renamed DownloadErrorCode.h as error_code.h. RenamedTatsuhiro Tsujikawa2010-11-281-4/+4
| | | | downloaderrorcode::Value as error_code::Value.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-6/+6
| | | | | | | Rewritten Logger interface. Logger now writes source file name and line number in log file.
* 2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-301-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use unnamed namespace instead of static keyword. * src/AbstractCommand.cc * src/AdaptiveURISelector.cc * src/Base64.cc * src/BitfieldMan.cc * src/BtDependency.cc * src/ConsoleStatCalc.cc * src/ContentTypeRequestGroupCriteria.cc * src/CookieStorage.cc * src/DHTMessageFactoryImpl.cc * src/DHTRoutingTableDeserializer.cc * src/DefaultBtAnnounce.cc * src/DefaultBtProgressInfoFile.cc * src/DefaultPeerStorage.cc * src/DefaultPieceStorage.cc * src/DownloadCommand.cc * src/DownloadEngine.cc * src/EpollEventPoll.cc * src/ExpatMetalinkProcessor.cc * src/ExpatXmlRpcRequestProcessor.cc * src/FileEntry.cc * src/HttpRequest.cc * src/HttpRequestCommand.cc * src/HttpResponseCommand.cc * src/KqueueEventPoll.cc * src/LongestSequencePieceSelector.cc * src/MetalinkParserStateV3Impl.cc * src/MetalinkParserStateV4Impl.cc * src/MultiDiskAdaptor.cc * src/MultiUrlRequestInfo.cc * src/OptionParser.cc * src/PeerSessionResource.cc * src/PortEventPoll.cc * src/Request.cc * src/RequestGroupMan.cc * src/SelectEventPoll.cc * src/SessionSerializer.cc * src/SimpleLogFormatter.cc * src/Sqlite3CookieParser.cc * src/TrackerWatcherCommand.cc * src/XML2SAXMetalinkProcessor.cc * src/Xml2XmlRpcRequestProcessor.cc * src/XmlRpcMethod.cc * src/XmlRpcMethodImpl.cc * src/XmlRpcResponse.cc * src/base32.cc * src/bencode2.cc * src/bittorrent_helper.cc * src/download_helper.cc * src/main.cc * src/messageDigest.cc * src/option_processing.cc * src/util.cc * test/AnnounceListTest.cc * test/BtRegistryTest.cc * test/DHTBucketTest.cc * test/DHTRoutingTableTest.cc * test/DefaultBtAnnounceTest.cc * test/FileEntryTest.cc * test/FtpConnectionTest.cc * test/MSEHandshakeTest.cc * test/MagnetTest.cc * test/XmlRpcMethodTest.cc * test/array_funTest.cc
* 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-09-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Replaced V_TRUE with A2_V_TRUE. Replaced V_FALSE with A2_V_FALSE. * src/AbstractCommand.cc * src/HttpResponseCommand.cc * src/Option.cc * src/OptionHandlerFactory.cc * src/OptionHandlerImpl.h * src/TrackerWatcherCommand.cc * src/download_helper.cc * src/main.cc * src/prefs.cc * src/prefs.h * test/AuthConfigFactoryTest.cc * test/DefaultBtProgressInfoFileTest.cc * test/DownloadHelperTest.cc * test/HttpRequestTest.cc * test/OptionHandlerTest.cc * test/UTMetadataPostDownloadHandlerTest.cc * test/XmlRpcMethodTest.cc
* 2010-06-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-231-7/+1
| | | | | | | | | | | | | | | | | | | | | | | Made log and log-level option modifiable using aria2.changeGlobalOption. This means you can dynamically start or stop logging and change log file and log level. * doc/aria2c.1.txt * src/LogFactory.cc * src/LogFactory.h * src/LogFormatter.h * src/Logger.cc * src/Logger.h * src/Makefile.am * src/Makefile.in * src/SimpleLogFormatter.cc * src/SimpleLogFormatter.h * src/SimpleLogger.cc: Removed * src/SimpleLogger.h: Removed * src/XmlRpcMethod.cc * src/XmlRpcMethodImpl.cc * src/main.cc
* 2010-04-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-241-25/+0
| | | | | | | | | | | | In SocketCore::isReadable()/isWritable(), use poll() if it is available otherwise use select(). Removed epoll/port from there because poll() does the good enough job for single socket event notification. * src/SocketCore.cc * src/SocketCore.h * src/main.cc
* 2010-04-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-241-0/+5
| | | | | | | | | | | | | | | | | Added kqueue support. We use poll() for SocketCore::isReadable()/isWritable() when kqueue is used. * configure.ac * src/DownloadEngineFactory.cc * src/KqueueEventPoll.cc * src/KqueueEventPoll.h * src/Makefile.am * src/Makefile.in * src/OptionHandlerFactory.cc * src/main.cc * src/prefs.cc * src/prefs.h
* 2010-04-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-211-7/+13
| | | | | | | | | | | | | | | | | Added opensolaris port_associate() support. * src/DownloadEngineFactory.cc * src/Makefile.am * src/OptionHandlerFactory.cc * src/PortEventPoll.cc * src/PortEventPoll.h * src/SocketCore.cc * src/SocketCore.h * src/configure.ac * src/main.cc * src/prefs.cc * src/prefs.h
* 2010-04-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-191-3/+8
| | | | | | | | | | | | | | | | | | | | | Supported poll() for socket event notification. --event-poll can take value "poll". Fixed the bug that timeout for SocketCore::isReadable()/isWritable() is ignored when epoll is used. * src/OptionHandlerFactory.cc * src/a2io.h * src/prefs.h * src/SocketCore.h * src/Makefile.am * src/main.cc * src/PollEventPoll.h * src/SocketCore.cc * src/DownloadEngineFactory.cc * src/PollEventPoll.cc * src/prefs.cc * configure.ac
* 2010-03-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-2/+2
| | | | | | | | Avoid to calculate end() iterator in each loop. std::deque is particularly slow. Make sure that recalculate end iterator if element is erased during loop.
* 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-6/+6
| | | | | | | Use vector instead of deque for containers which is used for mostly read-only purpose.
* 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | Use vector instead of deque for MetalinkEntry and MetalinkResource objects. * src/Metalink2RequestGroup.cc * src/Metalink2RequestGroup.h * src/MetalinkEntry.cc * src/MetalinkEntry.h * src/MetalinkHelper.cc * src/MetalinkHelper.h * src/Metalinker.cc * src/Metalinker.h * src/main.cc * test/MetalinkEntryTest.cc * test/MetalinkHelperTest.cc * test/MetalinkProcessorTest.cc * test/MetalinkerTest.cc
* 2010-02-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-121-72/+72
| | | | | | | | | Fixed the bug that aria2 doesn't handle return value if error occurred before download begins. * src/MultiUrlRequestInfo.cc * src/main.cc
* 2010-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-111-1/+0
| | | | | | | | | | | | | | Removed BitfieldManFactory class. * src/BitfieldManFactory.cc * src/BitfieldManFactory.h * src/DefaultPieceStorage.cc * src/Makefile.am * src/PeerSessionResource.cc * src/Piece.cc * src/main.cc * test/DefaultPieceStorageTest.cc
* 2010-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-111-1/+0
| | | | | | | | | | | | | | | | Removed unused methods from BitfieldMan class. Moved getFirstMissingIndex to bitfield.h. Updated doc for BitfieldMan class. * src/BitfieldMan.cc * src/BitfieldMan.h * src/BitfieldManFactory.cc * src/BitfieldManFactory.h * src/bitfield.h * src/main.cc * test/BitfieldManTest.cc * test/DefaultPieceStorageTest.cc
* 2010-01-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-171-1/+2
| | | | | | | | | | | | | | | | | | | | Added --human-readable option. This option, when true is given, prints sizes and speed in human readable format(e.g., 1.2Ki, 3.4Mi) in the console readout. The default value is true and it looks exactly the same as aria2-1.8.0. So the 'new feature' appears when false is given. In this case, sizes and speed are printed without in bytes. No Ki, Mi units conversion is used. This may be useful for a program to parse the output of aria2. * doc/aria2c.1.txt * src/ConsoleStatCalc.cc * src/ConsoleStatCalc.h * src/OptionHandlerFactory.cc * src/main.cc * src/prefs.cc * src/prefs.h * src/usage_text.h
* 2010-01-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-101-3/+3
| | | | | | | Code clean up. * src/main.cc