summaryrefslogtreecommitdiff
path: root/src/FileEntry.h
Commit message (Collapse)AuthorAgeFilesLines
* FileEntry: Use implicitly-declared copy constructorTatsuhiro Tsujikawa2018-12-021-2/+0
|
* Try to use available URI if all pooled requests are sleepingTatsuhiro Tsujikawa2016-07-071-0/+6
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-87/+52
|
* Fixed some typos in code commentsDan Fandrich2015-01-161-1/+1
|
* DownloadContext, FileEntry: Use move semantics to path parameter in ctorTatsuhiro Tsujikawa2014-06-041-1/+1
|
* FileEntry::getUris: Return std::vector<std::string>Tatsuhiro Tsujikawa2014-06-041-2/+2
|
* Support PREF_DIR change for Metalink filesTatsuhiro Tsujikawa2014-06-041-0/+10
| | | | | Reworked previous commit adeead6f0396e2f8551d1182972e277728fd6c8b, and now support changing PREF_DIR for Metalink downloads.
* FileEntry: Pass by value for simple setter functionsTatsuhiro Tsujikawa2013-12-151-3/+3
|
* Stuff memory holesNils Maier2013-12-091-13/+17
| | | | | | | | | | | | | | | | | | Padding changes on x86_64: - RequestGroup: 29 -> 5 bytes - DownloadContext: 25 -> 1 bytes - Cookie: 20 -> 4 bytes - Command: 8 -> 0 bytes (affects many derived as well) - HttpRequest: 20 -> 4 bytes - DownloadCommand: 18 -> 2 bytes - TimeBasedCommand: 14 -> 6 bytes - AbstractCommand: 13 -> 5 bytes - HttpSkipResponseCommand: 12 -> 4 bytes - FileEntry: 10 -> 2 bytes - DownloadResult: 15 -> 7 bytes - UriStruct: 12 -> 4 bytes - Piece: 11 -> 3 bytes - BitfieldMan -> 11 -> 3 bytes
* Return nullptr directly where std::shared_ptr is expectedTatsuhiro Tsujikawa2013-07-041-1/+1
| | | | | The constructor of std::shared_ptr which takes nullptr is not explicit so we can return nullptr directly.
* Use std::unique_ptr for URISelector instead of std::shared_ptrTatsuhiro Tsujikawa2013-07-041-1/+1
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-19/+19
|
* SessionSerializer: Save spent URIs as well as remaining onesTatsuhiro Tsujikawa2013-05-281-0/+6
|
* Use int64_t instead of off_tTatsuhiro Tsujikawa2012-06-251-9/+9
| | | | | Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator and ChecksumValidator are left unchanged.
* Use std::set instead of std::deque if the elements are sorted andTatsuhiro Tsujikawa2012-03-231-3/+16
| | | | insertions and deletions are frequent.
* Use int or int32_t instead of size_t where suitableTatsuhiro Tsujikawa2011-12-091-3/+3
|
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-4/+4
| | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
* Reuse in-flight and pooled URIs when a download is paused.Tatsuhiro Tsujikawa2011-10-311-0/+3
|
* Added --download-result option.Tatsuhiro Tsujikawa2011-08-221-14/+10
| | | | | | | | | | Added --download-result=OPT option. This option changes the way "Download Results" is formatted. If OPT is 'default', print GID, status, average download speed and path/URI. If multiple files are involved, path/URI of first requested file is printed and remaining ones are omitted. If OPT is 'full', print GID, status, average download speed, percentage of progress and path/URI. The percentage of progress and path/URI are printed for each requested file in each row.
* Use global::cout to output string to stdout.Tatsuhiro Tsujikawa2011-08-091-2/+2
| | | | | | | 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.
* In MinGW32, open file with UNICODE filename and print them in ANSI.Tatsuhiro Tsujikawa2011-08-041-2/+3
|
* Use ServerStat to find faster server.Tatsuhiro Tsujikawa2011-06-281-0/+8
|
* Renamed DownloadErrorCode.h as error_code.h. RenamedTatsuhiro Tsujikawa2010-11-281-3/+3
| | | | downloaderrorcode::Value as error_code::Value.
* 2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-251-2/+0
| | | | | | | | Removed unused FileEntry::setupDir() * src/FileEntry.cc * src/FileEntry.h * test/FileEntryTest.cc
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-3/+0
| | | | | | | Rewritten Logger interface. Logger now writes source file name and line number in log file.
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-22/+7
| | | | | | | | | 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-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-121-1/+1
| | | | | | | | Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
* 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-07-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-181-3/+2
| | | | | | | | Fixed compile error with OSX g++ 4.0.1 * src/FileEntry.h * test/FileEntryTest.cc
* 2010-07-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | FeedbackURISelector now tries to select URI whose host is least used in aria2 globally. Reverted the previous change. * src/AdaptiveURISelector.cc * src/AdaptiveURISelector.h * src/CreateRequestCommand.cc * src/FeedbackURISelector.cc * src/FeedbackURISelector.h * src/FileEntry.cc * src/FileEntry.h * src/InOrderURISelector.cc * src/InOrderURISelector.h * src/RequestGroupMan.cc * src/RequestGroupMan.h * src/URISelector.h * src/a2algo.h * test/FeedbackURISelectorTest.cc * test/InOrderURISelectorTest.cc
* 2010-07-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-141-2/+1
| | | | | | | | | | | | | | | | | | | | | FeedbackURISelector now tries to chooses URI which is not used in aria2 globally. If it is possible, it may return used URI. * src/AdaptiveURISelector.cc * src/AdaptiveURISelector.h * src/CreateRequestCommand.cc * src/FeedbackURISelector.cc * src/FeedbackURISelector.h * src/FileEntry.cc * src/FileEntry.h * src/InOrderURISelector.cc * src/InOrderURISelector.h * src/RequestGroupMan.cc * src/RequestGroupMan.h * src/URISelector.h * test/FeedbackURISelectorTest.cc * test/InOrderURISelectorTest.cc
* 2010-07-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-141-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | Added --max-connection-per-server=NUM option. The default value of NUM is 1. This option limits the number of connections allowed to one server for each download. This means when NUM is 2 and 1 URI is provided, even if you specified -s 5, aria2 establishes 2 connections. Default value of -j option is changed from 5 to 2. * src/BtDependency.cc * src/CreateRequestCommand.cc * src/FileEntry.cc * src/FileEntry.h * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/Metalink2RequestGroup.cc * src/OptionHandlerFactory.cc * src/TrackerWatcherCommand.cc * src/download_helper.cc * src/prefs.cc * src/prefs.h * src/usage_text.h * test/DownloadHelperTest.cc * test/FileEntryTest.cc
* 2010-07-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-111-0/+2
| | | | | | | | After change request to faster one, wait at least 10 seconds. * src/FileEntry.cc * src/FileEntry.h
* 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-38/+38
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-201-32/+5
| | | | | | | | | | Moved non-trivial functions to *.cc file * src/DownloadContext.cc * src/DownloadContext.h * src/FileEntry.cc * src/FileEntry.h
* 2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-121-15/+15
| | | | | | | | Renamed member variables. * src/FileEntry.cc * src/FileEntry.h
* 2010-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added --always-resume and --max-resume-failure-tries option. If --always-resume=false is given, when all given URIs does not support resume or aria2 encounters N URIs which does not support resume (N is the value specified using --max-resume-failure-tries option), aria2 download file from scratch. The default behavior is --always-resume=true, which means if all URIs do not support resume, download fails. I think this is OK because user normally don't like to see that partially downloaded file is overwritten(this is particularly true if file size is big). This option is useful when aria2 is used as download backend and graceful falling back to overwritten behavior is preferable. Added exit status value 8, which means download failed because server did not support resume. * src/AbstractCommand.cc * src/DefaultPieceStorage.cc * src/DownloadCommand.cc * src/DownloadResultCode.h * src/FileEntry.h * src/FtpNegotiationCommand.cc * src/HttpResponse.cc * src/HttpResponseCommand.cc * src/OptionHandlerFactory.cc * src/RequestGroup.cc * src/RequestGroup.h * src/SegmentMan.cc * src/SegmentMan.h * src/prefs.cc * src/prefs.h * src/usage_text.h * test/DefaultPieceStorageTest.cc * test/SegmentManTest.cc
* 2010-03-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | url -> uri in Request class. * src/AbstractCommand.cc * src/AdaptiveURISelector.cc * src/DefaultBtAnnounce.cc * src/FeedbackURISelector.cc * src/FileEntry.cc * src/FileEntry.h * src/HttpRequest.h * src/HttpResponse.cc * src/InitiateConnectionCommandFactory.cc * src/Metalink2RequestGroup.cc * src/OptionHandlerImpl.h * src/ProtocolDetector.cc * src/Request.cc * src/Request.h * src/XmlRpcMethodImpl.cc * test/AuthConfigFactoryTest.cc * test/FtpConnectionTest.cc * test/HttpRequestTest.cc * test/HttpResponseTest.cc * test/RequestTest.cc
* 2010-03-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-071-0/+5
| | | | | | | | | | | Added getServers XML-RPC method. * doc/aria2c.1.txt * src/FileEntry.h * src/XmlRpcMethodFactory.cc * src/XmlRpcMethodImpl.cc * src/XmlRpcMethodImpl.h
* 2010-03-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-061-4/+34
| | | | | | | | | | | | | | | | | | | | | | Added changeUri XML-RPC method. This method removes/adds URIs dynamically. * doc/aria2c.1.txt * src/AbstractCommand.cc * src/DownloadContext.cc * src/DownloadContext.h * src/FileEntry.cc * src/FileEntry.h * src/Request.cc * src/Request.h * src/RequestGroup.cc * src/RequestGroupMan.cc * src/XmlRpcMethodFactory.cc * src/XmlRpcMethodImpl.cc * src/XmlRpcMethodImpl.h * test/FileEntryTest.cc * test/XmlRpcMethodTest.cc
* 2010-03-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-021-5/+0
| | | | | | | | Removed unused FileEntry::extracted * src/FileEntry.cc * src/FileEntry.h
* 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-8/+6
| | | | | | | Use vector instead of deque for containers which is used for mostly read-only purpose.
* 2010-02-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-261-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Supported name attribute of metalink::metaurl element and multi-file torrent with Metalink4. Files with same metaurl are grouped and downloaded in one RequestGroup. * src/BtDependency.cc * src/FileEntry.h * src/Metalink2RequestGroup.cc * src/Metalink2RequestGroup.h * src/MetalinkEntry.cc * src/MetalinkEntry.h * src/MetalinkHelper.cc * src/MetalinkHelper.h * src/MetalinkMetaurl.cc * src/MetalinkMetaurl.h * src/MetalinkParserController.cc * src/RequestGroup.cc * src/RequestGroup.h * src/bittorrent_helper.cc * test/BittorrentHelperTest.cc * test/BtDependencyTest.cc * test/MetalinkHelperTest.cc
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-7/+7
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2009-07-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-07-111-6/+0
| | | | | | | Removed FileEntry::getAssociatedUris() * src/FileEntry.h
* 2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-07-051-0/+2
| | | | | | | | | | | | Release pooled and in-flight Request objectsand URIResult objects in FileEntry after download completed. * src/DownloadContext.cc * src/DownloadContext.h * src/FileEntry.cc * src/FileEntry.h * src/RequestGroup.cc
* 2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-07-041-0/+12
| | | | | | | | | | | | Call RequestGroup::createNextCommandWithAdj() from BtFileAllocationEntry if at least one FileEntry has URI. The static function hasAssociatedUri in RequestGroup.cc is renamed as isUriSuppliedForRequsetFileEntry() and placed in FileEntry.h. * src/BtFileAllocationEntry.cc * src/FileEntry.h * src/RequestGroup.cc
* 2009-07-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-07-041-0/+6
| | | | | | | | | | Made URI reusing function work. * src/CreateRequestCommand.cc * src/FileEntry.cc * src/FileEntry.h * test/FileEntryTest.cc
* 2009-07-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-07-031-5/+11
| | | | | | | Show first URL in Download Results if file path is not available. * src/FileEntry.h
* 2009-07-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-07-011-2/+10
| | | | | | | | | Set referer and method to newly created Request object. * src/CreateRequestCommand.cc * src/FileEntry.cc * src/FileEntry.h