2006-07-30 12:58:27 +00:00
|
|
|
/* <!-- copyright */
|
|
|
|
/*
|
2006-09-21 15:31:24 +00:00
|
|
|
* aria2 - The high speed download utility
|
2006-07-30 12:58:27 +00:00
|
|
|
*
|
2012-09-22 09:54:14 +00:00
|
|
|
* Copyright (C) 2012 Tatsuhiro Tsujikawa
|
2006-07-30 12:58:27 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2010-01-05 16:01:46 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2006-09-21 15:31:24 +00:00
|
|
|
*
|
|
|
|
* In addition, as a special exception, the copyright holders give
|
|
|
|
* permission to link the code of portions of this program with the
|
|
|
|
* OpenSSL library under certain conditions as described in each
|
|
|
|
* individual source file, and distribute linked combinations
|
|
|
|
* including the two.
|
|
|
|
* You must obey the GNU General Public License in all respects
|
|
|
|
* for all of the code used other than OpenSSL. If you modify
|
|
|
|
* file(s) with this exception, you may extend this exception to your
|
|
|
|
* version of the file(s), but you are not obligated to do so. If you
|
|
|
|
* do not wish to do so, delete this exception statement from your
|
|
|
|
* version. If you delete this exception statement from all source
|
|
|
|
* files in the program, then also delete it here.
|
2006-07-30 12:58:27 +00:00
|
|
|
*/
|
|
|
|
/* copyright --> */
|
2010-10-31 07:23:53 +00:00
|
|
|
#ifndef D_FEATURE_CONFIG_H
|
|
|
|
#define D_FEATURE_CONFIG_H
|
2006-07-30 12:58:27 +00:00
|
|
|
|
|
|
|
#include "common.h"
|
2009-09-20 09:31:42 +00:00
|
|
|
|
2008-02-08 15:53:45 +00:00
|
|
|
#include <string>
|
2006-07-30 12:58:27 +00:00
|
|
|
|
2008-02-08 15:53:45 +00:00
|
|
|
namespace aria2 {
|
|
|
|
|
2012-09-22 09:54:14 +00:00
|
|
|
// Returns default port for the given |protocol|.
|
|
|
|
uint16_t getDefaultPort(const std::string& protocol);
|
|
|
|
|
|
|
|
enum FeatureType {
|
|
|
|
FEATURE_ASYNC_DNS,
|
|
|
|
FEATURE_BITTORRENT,
|
|
|
|
FEATURE_FF3_COOKIE,
|
|
|
|
FEATURE_GZIP,
|
|
|
|
FEATURE_HTTPS,
|
|
|
|
FEATURE_MESSAGE_DIGEST,
|
|
|
|
FEATURE_METALINK,
|
|
|
|
FEATURE_XML_RPC,
|
2015-05-11 15:52:50 +00:00
|
|
|
FEATURE_SFTP,
|
2012-09-22 09:54:14 +00:00
|
|
|
MAX_FEATURE
|
|
|
|
};
|
2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/Option.h
(getAsBool): New function.
* src/Option.cc
(prefs.h): Included.
(defined): 0-length value is now recognized as undefined.
(getAsInt): Rewritten.
(getAsLLInt): Rewritten.
(getAsBool): New function.
* src/FeatureConfig.h: Rewritten.
* src/FeatureConfig.cc: Rewritten.
* src/prefs.h
(PREF_STDOUT_LOG): New definition.
(PREF_LOG): New definition.
(PREF_DIR): New definition.
(PREF_OUT): New definition.
(PREF_SPLIT): New definition.
(PREF_DAEMON): New definition.
(PREF_REFERER): New definition.
(PREF_TORRENT_FILE): New definition.
(PREF_LISTEN_PORT): New definition.
(PREF_METALINK_FILE): New definition.
(PREF_METALINK_VERSION): New definition.
(PREF_METALINK_LANGUAGE): New definition.
(PREF_METALINK_OS): New definition.
(PREF_METALINK_SERVERS): New definition.
* src/main.cc
(main): Following command-line parameters are now put into
Option
class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
metalinkLanguage, metalinkOs, metalinkServers
To fix the bug that aria2 can not handle http response header
properly.
* src/HttpHeader.cc
(put): Made name lowercased.
(defined): Made name lowercased.
(getFirst): Made name lowercased.
(get): Made name lowercased.
(getFirstAsInt): Rewritten.
(getFirstAsLLInt): Rewritten.
2006-08-03 12:36:02 +00:00
|
|
|
|
2012-09-22 09:54:14 +00:00
|
|
|
// Returns summary string of the available features.
|
|
|
|
std::string featureSummary();
|
2009-07-10 15:55:42 +00:00
|
|
|
|
2012-09-22 09:54:14 +00:00
|
|
|
// Returns the string representation of the given |feature| if it is
|
|
|
|
// available in the build. If it is not available, returns NULL.
|
|
|
|
const char* strSupportedFeature(int feature);
|
2006-07-30 12:58:27 +00:00
|
|
|
|
2013-04-09 15:23:39 +00:00
|
|
|
// Returns summary string of 3rd party libraries directly used by
|
|
|
|
// aria2.
|
|
|
|
std::string usedLibs();
|
|
|
|
|
2014-05-29 21:51:48 +00:00
|
|
|
// Returns a summary string of the used compiler/platform.
|
|
|
|
std::string usedCompilerAndPlatform();
|
|
|
|
|
|
|
|
// Returns the system information about the OS this binary is running on.
|
|
|
|
std::string getOperatingSystemInfo();
|
|
|
|
|
2008-02-08 15:53:45 +00:00
|
|
|
} // namespace aria2
|
|
|
|
|
2010-10-31 07:23:53 +00:00
|
|
|
#endif // D_FEATURE_CONFIG_H
|