summaryrefslogtreecommitdiff
path: root/src/SessionSerializer.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add --keep-unfinished-download-result optionTatsuhiro Tsujikawa2016-09-241-7/+31
| | | | | | | | | This option keeps unfinished download results even if doing so exceeds --max-download-result. This is useful if all unfinished downloads must be saved in session file (see --save-session option). Please keep in mind that there is no upper bound to the number of unfinished download result to keep. User should use this option only when they know the total number of downloads in advance.
* clang-formatrelease-1.27.0Tatsuhiro Tsujikawa2016-09-161-14/+14
|
* Add --save-not-found optionNils Maier2016-08-301-0/+4
|
* Simplify session serializerNils Maier2016-08-301-27/+17
|
* SessionSerializer: Fix bug that pause=true is added to wrong itemTatsuhiro Tsujikawa2016-03-131-14/+19
| | | | | This change also defers writing metadata download to the location where first its follower download is written.
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-101/+102
|
* Don't write control file if content is not changed from previous oneTatsuhiro Tsujikawa2015-11-101-75/+1
| | | | | | | | | | This is desirable so that we don't have to wake up disk if control file is not changed, and it is not have to be written again. We use the same method (SHA1 hash) to check the content is the same. The limitation is the hash is stored in memory, so we have to write the first time in each session. See GH-382
* Fixed some typos in code commentsDan Fandrich2015-01-161-2/+2
|
* SessionSerializer: Use std::unique_ptr instead of std::shared_ptrTatsuhiro Tsujikawa2014-09-151-3/+3
|
* Use std::make_shared and make_unique where possible, part 2Tatsuhiro Tsujikawa2014-09-131-2/+2
|
* Silence some compiler warnings in SessionSerializer.Nils Maier2014-08-301-0/+3
|
* Save session only when there is change since the last serializationTatsuhiro Tsujikawa2014-05-311-0/+86
| | | | | | | | | | | | | This is a slight optimization not to cause useless disk access. This only applies to saving session automatically (see --save-session-interval). aria2.saveSession and serialization at the end of the session are always performed as before. When serialization, we first check that whether there is any change since the last serialization. To do this, we first calculate hash value of serialized content without writing into file. Then compare this value to the value of last serialization. If they do not match, perform serialization.
* More auto-converts by cpp11-migrateNils Maier2013-09-201-9/+3
|
* Introduce PrefPtr typedefNils Maier2013-09-191-2/+2
|
* DownloadEngine: Use std::unique_ptr for RequestGroupManTatsuhiro Tsujikawa2013-07-061-5/+6
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-12/+12
|
* SessionSerializer: Truly unique URIsNils Maier2013-06-101-30/+45
| | | | | | | | | | | Before, only spent uris where sanitized not to be contained within remaining uris. Change this so that each uri in the union(remaining,spent) get saved once at most. The order of the uris will won't be changed, with remaining uris going first followed by spent uris. Also avoid copying the uri std::strings around during dupe checking, usually resulting in better performance regarding CPU and space.
* SessionSerializer: Save spent URIs as well as remaining onesTatsuhiro Tsujikawa2013-05-281-5/+40
|
* Introduce IOFile abstract class to refactor BufferedFile and GZipFileTatsuhiro Tsujikawa2013-05-231-7/+7
| | | | | | IOFile provides the same interface of old BufferedFile. It provides extension points as pure virtual functions. Those functions are implemented by 2 concrete subclasses: BufferedFile and GZipFile.
* Save options directly specified for download in --save-sessionTatsuhiro Tsujikawa2013-04-111-1/+1
| | | | | | | 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.
* Save URI returned only from FileEntry::getRemainingUris()Tatsuhiro Tsujikawa2013-04-111-5/+4
| | | | | | | | The currently used URIs are inserted back into remaining URI list in FileEntry::putBackRequest(), which overlaps to some of the URIs in spentUris_. If we save spent URIs, each time save is performed, the number of URIs are increased due to this overlap. This change fixes this bug.
* Implement IndexedList::iteratorTatsuhiro Tsujikawa2013-03-031-6/+6
| | | | | It is dangerous to expose internal iterator to the outside, which is easily misused.
* Add writeOptionLine() to format 1 line of option name/value pairTatsuhiro Tsujikawa2013-03-031-36/+26
|
* SessionSerializer: Remove check fp because it is always trueTatsuhiro Tsujikawa2013-03-031-1/+1
|
* SessionSerializer crash when filename length is less than 3Tatsuhiro Tsujikawa2013-03-031-1/+1
|
* Fix missing value in serialized pause optionTatsuhiro Tsujikawa2013-03-031-1/+2
|
* Support for gzipped -i and --save-sessionNils Maier2013-03-021-11/+51
| | | | | | | | | | | Saved sessions may very large, as in hundreds and even thousands of megabyte when dealing with large queues. Add support to save and reload sessions to gzipped files, when libz is available. The session serializer will output gzipped contents when the file ends with .gz, while the input file reader (UriListParser) will accept whatever is thrown at it.
* Fix bug that active downloads are not saved with --save-session-intervalTatsuhiro Tsujikawa2013-02-041-0/+17
|
* Faster deletion of RequestGroup and DownloadResult listsTatsuhiro Tsujikawa2012-12-191-17/+17
|
* Save gid option with --save-session optionTatsuhiro Tsujikawa2012-12-171-4/+35
|
* Added --force-save option.Tatsuhiro Tsujikawa2012-11-171-1/+7
| | | | | | | --force-save option saves download with --save-session option even if the download is completed or removed. This may be useful to save BitTorrent seeding which is recognized as completed state. The default value is false.
* Handle OptionHandlers as raw pointerTatsuhiro Tsujikawa2012-09-271-1/+1
|
* Made BufferedFile ctor take const char* argsTatsuhiro Tsujikawa2012-09-251-1/+1
|
* Code cleanupTatsuhiro Tsujikawa2011-11-121-1/+2
|
* Made Pref::k_, OptionHandler::getName() and getDescription() const char*.Tatsuhiro Tsujikawa2011-11-111-3/+3
|
* Rewritten util::split and added its iterator version.Tatsuhiro Tsujikawa2011-11-041-1/+2
| | | | | Iterator based functions util::startsWith, util::endsWith, util::streq, util::strieq were added.
* OptionHandler now knows its option can be used in -i list option,Tatsuhiro Tsujikawa2011-10-221-49/+19
| | | | | | changeable in aria2.changeOption or aria2.changeGlobalOption. OptionHandler also now its option is cumulative.
* Rewritten Option. Introduced Pref.Tatsuhiro Tsujikawa2011-10-211-6/+8
| | | | | Now preference key is Pref instead of just string. It has Option ID. Now option lookup and setting takes O(1) using Pref object.
* Use BufferedFile::printf in SessionSerializerTatsuhiro Tsujikawa2011-08-071-20/+5
|
* Rewritten SessionSerializer using BufferedFileTatsuhiro Tsujikawa2011-08-071-27/+61
|
* Added --pause option.Tatsuhiro Tsujikawa2011-06-161-0/+5
| | | | | | | 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.
* Don't save removed download in --save-session text file.Tatsuhiro Tsujikawa2011-05-291-1/+2
| | | | | Now stat column of removed downloads in Download Results is 'RM' instead of INPR.
* Call RequestGroupMan::removeStoppedGroup() inTatsuhiro Tsujikawa2010-12-041-12/+0
| | | | | | | | DownloadEngine::onEndOfRun() to process RequestGroup objects currently in-progress. With this change, --on-download-stop/error/complete hooks are properly called for in-progress downloads when Ctrl-C is pressed.
* Renamed DownloadErrorCode.h as error_code.h. RenamedTatsuhiro Tsujikawa2010-11-281-3/+3
| | | | downloaderrorcode::Value as error_code::Value.
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-1/+0
| | | | | | Removed unused includes.
* 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-121-2/+2
| | | | | | | | Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
* 2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-301-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-11/+11
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-04-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-131-8/+10
| | | | | | | | Ensure that std::ofstream is destroyed before renaming. * src/SessionSerializer.cc * src/util.cc
* 2010-04-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-081-0/+203
Added --save-session=FILE option. This option saves error/unfinished downloads to FILE on exit. You can pass this output file to aria2c with -i option on restart. Please note that downloads added by aria2.addTorrent and aria2.addMetalink XML-RPC method are not saved. * src/BtPostDownloadHandler.cc * src/DownloadResult.h * src/Makefile.am * src/MetadataInfo.cc * src/MetadataInfo.h * src/Metalink2RequestGroup.cc * src/MetalinkPostDownloadHandler.cc * src/MultiUrlRequestInfo.cc * src/OptionHandlerFactory.cc * src/RequestGroup.cc * src/RequestGroup.h * src/SessionSerializer.cc * src/SessionSerializer.h * src/UTMetadataPostDownloadHandler.cc * src/download_helper.cc * src/download_helper.h * src/prefs.cc * src/prefs.h * src/usage_text.h * test/Makefile.am * test/SessionSerializerTest.cc * test/XmlRpcMethodTest.cc * test/serialize_session.meta4