mirror of
https://github.com/aria2/aria2.git
synced 2026-04-13 00:09:32 +00:00
To add --seed-time and --seed-ratio command-line option: * src/Option.h (getAsDouble): New function. * src/Option.cc (getAsDouble): New function. * src/SeedCheckCommand.h: New class. * src/SeedCheckCommand.cc: New class. * src/DownloadEngineFactory.cc (SeedCheckCommand.h): Included. (UnionSeedCriteria.h): Included. (TimeSeedCriteria.h): Included. (ShareRatioSeedCriteria.h): Included. (newTorrentConsoleEngine): Added the processing of seed option. * src/SeedCriteria.h: New class. * src/ShareRatioSeedCriteria.h: New class. * src/TimeSeedCriteria.h: New class. * src/UnionSeedCriteria.h: New class. * src/prefs.h (PREF_SEED_TIME): New definition. (PREF_SEED_RATIO): New definition. * src/main.cc (showUsage): Added --seed-time and --seed-ratio option. (main): Added --seed-time and --seed-ratio option. Made default log file name "/dev/null". * src/SharedHandle.h (SharedHandle): Copy constructor. Made it assignable from the SharedHandle of the subclasses. (operator=): Made it assignable from the SharedHandle of the subclasses. (getRefCount): New function. To add notice log level and the switch to write log to stdout. This switch is configurable per log level. * src/Logger.h (notice): New function. (LEVEL): Added NOTICE. Assigned an explicit value to each log level constant. * src/LogFactory.cc (getInstance): The use of NullLogger was removed. A log message with notice log level was made written to stdout along with log file. * src/NullLogger.h (notice): New function. * src/SimpleLogger.h (writeHeader): Added the 'file' argument. (writeLog): Added the 'file' argument. (writeFile): New function. (stdoutField): New variable. (SimpleLogger): Removed the default constructor. (SimpleLogger): Made the default value of logfile 0. (debug): Added 'virtual' keyword. (info): Added 'virtual' keyword. (warn): Added 'virtual' keyword. (error): Added 'virtual' keyword. (notice): New function. (setStdout): New function. * src/SimpleLogger.cc (WRITE_LOG): Replaced writeLog with writeFile. (WRITE_LOG_EX): Replaced writeLog with writeFile. (SimpleLogger): Removed the default constructor. (setStdout): New function. (writeLog): Added the handling of NOTICE log level. (writeFile): New function. (notice): New function. * src/TorrentMan.h: Updated doc. * src/BitfieldMan.h: Updated doc. * src/TrackerWatcherCommand.cc (execute): Return true if error occurred in the request to the tracker and halt is requested. * src/TrackerUpdateCommand.cc (execute): Return true if error occurred in the request to the tracker and halt is requested. * src/TorrentConsoleDownloadEngine.h (onSelectiveDownloadingCompletes): Removed. * src/TorrentConsoleDownloadEngine.cc (onSelectiveDownloadingCompletes): Removed. * src/TorrentDownloadEngine.h (onEndOfRun): Added 'virtual' keyword. (afterEachIteration): Removed. (onSelectiveDownloadingCompletes): Removed. * src/TorrentDownloadEngine.cc (onEndOfRun): Removed filenameFixed. (afterEachIteration): Removed. * src/TorrentMan.cc (completePiece): Call onDownloadComplete here. (onDownloadComplete): Added 2 log messages.
53 lines
1.3 KiB
Makefile
53 lines
1.3 KiB
Makefile
TESTS = aria2c
|
|
check_PROGRAMS = $(TESTS)
|
|
aria2c_SOURCES = AllTest.cc\
|
|
RequestTest.cc\
|
|
ChunkedEncodingTest.cc\
|
|
FileTest.cc\
|
|
OptionTest.cc\
|
|
Base64Test.cc\
|
|
UtilTest.cc\
|
|
CookieBoxTest.cc\
|
|
DataTest.cc\
|
|
DictionaryTest.cc\
|
|
ListTest.cc\
|
|
MetaFileUtilTest.cc\
|
|
ShaVisitorTest.cc\
|
|
TorrentManTest.cc\
|
|
PeerMessageUtilTest.cc\
|
|
BitfieldManTest.cc\
|
|
DefaultDiskWriterTest.cc\
|
|
MultiDiskWriterTest.cc\
|
|
ChokeMessageTest.cc\
|
|
UnchokeMessageTest.cc\
|
|
HaveAllMessageTest.cc\
|
|
HaveNoneMessageTest.cc\
|
|
InterestedMessageTest.cc\
|
|
NotInterestedMessageTest.cc\
|
|
HaveMessageTest.cc\
|
|
BitfieldMessageTest.cc\
|
|
RequestMessageTest.cc\
|
|
CancelMessageTest.cc\
|
|
PieceMessageTest.cc\
|
|
RejectMessageTest.cc\
|
|
AllowedFastMessageTest.cc\
|
|
SuggestPieceMessageTest.cc\
|
|
Xml2MetalinkProcessorTest.cc\
|
|
MetalinkerTest.cc\
|
|
MetalinkEntryTest.cc\
|
|
FeatureConfigTest.cc\
|
|
ShareRatioSeedCriteriaTest.cc\
|
|
TimeSeedCriteriaTest.cc
|
|
#aria2c_CXXFLAGS = ${CPPUNIT_CFLAGS} -I../src -I../lib -Wall -D_FILE_OFFSET_BITS=64
|
|
#aria2c_LDFLAGS = ${CPPUNIT_LIBS}
|
|
|
|
aria2c_LDADD = ../src/libaria2c.a\
|
|
${CPPUNIT_LIBS} @LIBGNUTLS_LIBS@\
|
|
@LIBGCRYPT_LIBS@ @OPENSSL_LIBS@ @XML_LIBS@
|
|
AM_CPPFLAGS = -Wall\
|
|
${CPPUNIT_CFLAGS}\
|
|
-I ../src\
|
|
-I../lib -I../intl -I$(top_srcdir)/intl\
|
|
@LIBGNUTLS_CFLAGS@ @LIBGCRYPT_CFLAGS@ @OPENSSL_CFLAGS@ @XML_CPPFLAGS@\
|
|
-D_FILE_OFFSET_BITS=64 -DLOCALEDIR=\"$(localedir)\" @DEFS@
|