2008-01-05 11:26:56 +00:00
|
|
|
/* <!-- copyright */
|
|
|
|
/*
|
|
|
|
* aria2 - The high speed download utility
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 Tatsuhiro Tsujikawa
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
/* copyright --> */
|
|
|
|
#include "HelpItemFactory.h"
|
|
|
|
#include "TagContainer.h"
|
|
|
|
#include "HelpItem.h"
|
|
|
|
#include "usage_text.h"
|
|
|
|
#include "prefs.h"
|
|
|
|
#include "a2io.h"
|
|
|
|
#include "help_tags.h"
|
2008-04-22 11:26:50 +00:00
|
|
|
#include "Option.h"
|
2008-04-26 05:58:49 +00:00
|
|
|
#include "StringFormat.h"
|
2008-01-05 11:26:56 +00:00
|
|
|
|
2008-02-08 15:53:45 +00:00
|
|
|
namespace aria2 {
|
|
|
|
|
2008-01-05 11:26:56 +00:00
|
|
|
HelpItemFactory::HelpItemFactory() {}
|
|
|
|
|
2008-04-22 11:26:50 +00:00
|
|
|
TagContainerHandle HelpItemFactory::createHelpItems(const Option* op)
|
2008-01-05 11:26:56 +00:00
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
TagContainerHandle tc(new TagContainer());
|
2008-01-05 11:26:56 +00:00
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_DIR, TEXT_DIR));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_OUT, TEXT_OUT));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
#ifdef HAVE_DAEMON
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_DAEMON, TEXT_DAEMON));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
#endif // HAVE_DAEMON
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_SPLIT, TEXT_SPLIT));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_RETRY_WAIT, TEXT_RETRY_WAIT));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_TIMEOUT, TEXT_TIMEOUT));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_MAX_TRIES, TEXT_MAX_TRIES));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_HTTP_PROXY, TEXT_HTTP_PROXY));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_HTTP_USER, TEXT_HTTP_USER));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_HTTP_PASSWD, TEXT_HTTP_PASSWD));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_HTTP_PROXY_USER, TEXT_HTTP_PROXY_USER));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_HTTP_PROXY_PASSWD, TEXT_HTTP_PROXY_PASSWD));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_HTTP_PROXY_METHOD, TEXT_HTTP_PROXY_METHOD));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_HTTP_AUTH_SCHEME, TEXT_HTTP_AUTH_SCHEME));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_REFERER, TEXT_REFERER));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_FTP_USER, TEXT_FTP_USER));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_FTP_PASSWD, TEXT_FTP_PASSWD));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_FTP_TYPE, TEXT_FTP_TYPE));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_FTP_PASV, TEXT_FTP_PASV));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_FTP_VIA_HTTP_PROXY, TEXT_FTP_VIA_HTTP_PROXY));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_LOWEST_SPEED_LIMIT, TEXT_LOWEST_SPEED_LIMIT));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_MAX_DOWNLOAD_LIMIT, TEXT_MAX_DOWNLOAD_LIMIT));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_FILE_ALLOCATION, TEXT_FILE_ALLOCATION));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_NO_FILE_ALLOCATION_LIMIT, TEXT_NO_FILE_ALLOCATION_LIMIT, "5M"));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
#ifdef ENABLE_DIRECT_IO
|
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_ENABLE_DIRECT_IO, TEXT_ENABLE_DIRECT_IO,
|
|
|
|
op->get(PREF_ENABLE_DIRECT_IO)));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
#endif // ENABLE_DIRECT_IO
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_ALLOW_OVERWRITE, TEXT_ALLOW_OVERWRITE));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_ALLOW_PIECE_LENGTH_CHANGE, TEXT_ALLOW_PIECE_LENGTH_CHANGE,
|
|
|
|
op->get(PREF_ALLOW_PIECE_LENGTH_CHANGE)));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_FORCE_SEQUENTIAL, TEXT_FORCE_SEQUENTIAL));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_AUTO_FILE_RENAMING, TEXT_AUTO_FILE_RENAMING));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_PARAMETERIZED_URI, TEXT_PARAMETERIZED_URI));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-05-06 15:26:43 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_ENABLE_HTTP_KEEP_ALIVE, TEXT_ENABLE_HTTP_KEEP_ALIVE, op->get(PREF_ENABLE_HTTP_KEEP_ALIVE)));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_ENABLE_HTTP_PIPELINING, TEXT_ENABLE_HTTP_PIPELINING));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
#ifdef ENABLE_MESSAGE_DIGEST
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_CHECK_INTEGRITY, TEXT_CHECK_INTEGRITY));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_REALTIME_CHUNK_CHECKSUM, TEXT_REALTIME_CHUNK_CHECKSUM));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
#endif // ENABLE_MESSAGE_DIGEST
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_CONTINUE, TEXT_CONTINUE));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_USER_AGENT, TEXT_USER_AGENT));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_NO_NETRC, TEXT_NO_NETRC));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_INPUT_FILE, TEXT_INPUT_FILE));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-05-09 14:52:25 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_MAX_CONCURRENT_DOWNLOADS, TEXT_MAX_CONCURRENT_DOWNLOADS, op->get(PREF_MAX_CONCURRENT_DOWNLOADS)));
|
|
|
|
item->addTag(TAG_BASIC);
|
2008-01-05 11:26:56 +00:00
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_LOAD_COOKIES, TEXT_LOAD_COOKIES));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_HTTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-05-31 05:32:49 +00:00
|
|
|
#if defined ENABLE_BITTORRENT || defined ENABLE_METALINK
|
2008-01-05 11:26:56 +00:00
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_SHOW_FILES, TEXT_SHOW_FILES));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_SELECT_FILE, TEXT_SELECT_FILE));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
#endif // ENABLE_BITTORRENT || ENABLE_METALINK
|
|
|
|
#ifdef ENABLE_BITTORRENT
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_TORRENT_FILE, TEXT_TORRENT_FILE));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_FOLLOW_TORRENT, TEXT_FOLLOW_TORRENT, op->get(PREF_FOLLOW_TORRENT)));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_DIRECT_FILE_MAPPING, TEXT_DIRECT_FILE_MAPPING));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_LISTEN_PORT, TEXT_LISTEN_PORT,
|
|
|
|
op->get(PREF_LISTEN_PORT)));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_MAX_UPLOAD_LIMIT, TEXT_MAX_UPLOAD_LIMIT));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_SEED_TIME, TEXT_SEED_TIME));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_SEED_RATIO, TEXT_SEED_RATIO,
|
|
|
|
op->get(PREF_SEED_RATIO)));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_PEER_ID_PREFIX, TEXT_PEER_ID_PREFIX));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-01-05 16:02:25 +00:00
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_ENABLE_PEER_EXCHANGE, TEXT_ENABLE_PEER_EXCHANGE,
|
|
|
|
op->get(PREF_ENABLE_PEER_EXCHANGE)));
|
2008-01-05 16:02:25 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added DHT functionality, compatible with mainline.
DHT is disabled by default. To enable it, give --enable-dht to
aria2c.
You may need to specify entry point to DHT network using
--dht-entry-point. DHT uses UDP port to listen incoming message.
Use --dht-listen-port to specify port number. Make sure that
your
firewall configuration can pass through UDP traffic to the port.
The routing table is saved in $HOME/.aria2/dht.dat.
* src/DHT*
* src/BNode.{h, cc}
* src/PeerInteractionCommand.cc: enable DHT functionality for a
particular torrent.
* src/Data.cc: Rewritten ctor.
* src/OptionHandlerFactory.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/DefaultBtInteractive.cc: Send port message if dht is
enabled.
* src/RequestGroup.cc: Initialize DHT functionality. When
download
ends, remove BtContext from DHTPeerAnnounceStorage.
* src/BtPortMessage.{h, cc}: Rewritten.
* src/message.h
* src/OptionHandlerImpl.cc
* src/option_processing.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/Dictionary.{h, cc} (remove): New function.
* src/prefs.h
* src/DefaultBtMessageFactory.h
* src/BtHandshakeMessage.cc
* src/ActivePeerConnectionCommand.cc
* src/SocketCore.{h, cc}: Added datagram socket support.
* src/DefaultBtMessageFactory.cc
* src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
Create DHT commands.
* src/BtMessageFactory.h
* src/PeerMessageUtil.{h, cc}
2008-02-01 17:36:33 +00:00
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_ENABLE_DHT, TEXT_ENABLE_DHT,
|
|
|
|
op->get(PREF_ENABLE_DHT)));
|
2008-02-19 12:05:21 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added DHT functionality, compatible with mainline.
DHT is disabled by default. To enable it, give --enable-dht to
aria2c.
You may need to specify entry point to DHT network using
--dht-entry-point. DHT uses UDP port to listen incoming message.
Use --dht-listen-port to specify port number. Make sure that
your
firewall configuration can pass through UDP traffic to the port.
The routing table is saved in $HOME/.aria2/dht.dat.
* src/DHT*
* src/BNode.{h, cc}
* src/PeerInteractionCommand.cc: enable DHT functionality for a
particular torrent.
* src/Data.cc: Rewritten ctor.
* src/OptionHandlerFactory.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/DefaultBtInteractive.cc: Send port message if dht is
enabled.
* src/RequestGroup.cc: Initialize DHT functionality. When
download
ends, remove BtContext from DHTPeerAnnounceStorage.
* src/BtPortMessage.{h, cc}: Rewritten.
* src/message.h
* src/OptionHandlerImpl.cc
* src/option_processing.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/Dictionary.{h, cc} (remove): New function.
* src/prefs.h
* src/DefaultBtMessageFactory.h
* src/BtHandshakeMessage.cc
* src/ActivePeerConnectionCommand.cc
* src/SocketCore.{h, cc}: Added datagram socket support.
* src/DefaultBtMessageFactory.cc
* src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
Create DHT commands.
* src/BtMessageFactory.h
* src/PeerMessageUtil.{h, cc}
2008-02-01 17:36:33 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_DHT_LISTEN_PORT, TEXT_DHT_LISTEN_PORT,
|
|
|
|
op->get(PREF_DHT_LISTEN_PORT)));
|
2008-02-19 12:05:21 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added DHT functionality, compatible with mainline.
DHT is disabled by default. To enable it, give --enable-dht to
aria2c.
You may need to specify entry point to DHT network using
--dht-entry-point. DHT uses UDP port to listen incoming message.
Use --dht-listen-port to specify port number. Make sure that
your
firewall configuration can pass through UDP traffic to the port.
The routing table is saved in $HOME/.aria2/dht.dat.
* src/DHT*
* src/BNode.{h, cc}
* src/PeerInteractionCommand.cc: enable DHT functionality for a
particular torrent.
* src/Data.cc: Rewritten ctor.
* src/OptionHandlerFactory.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/DefaultBtInteractive.cc: Send port message if dht is
enabled.
* src/RequestGroup.cc: Initialize DHT functionality. When
download
ends, remove BtContext from DHTPeerAnnounceStorage.
* src/BtPortMessage.{h, cc}: Rewritten.
* src/message.h
* src/OptionHandlerImpl.cc
* src/option_processing.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/Dictionary.{h, cc} (remove): New function.
* src/prefs.h
* src/DefaultBtMessageFactory.h
* src/BtHandshakeMessage.cc
* src/ActivePeerConnectionCommand.cc
* src/SocketCore.{h, cc}: Added datagram socket support.
* src/DefaultBtMessageFactory.cc
* src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
Create DHT commands.
* src/BtMessageFactory.h
* src/PeerMessageUtil.{h, cc}
2008-02-01 17:36:33 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_DHT_ENTRY_POINT, TEXT_DHT_ENTRY_POINT));
|
2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added DHT functionality, compatible with mainline.
DHT is disabled by default. To enable it, give --enable-dht to
aria2c.
You may need to specify entry point to DHT network using
--dht-entry-point. DHT uses UDP port to listen incoming message.
Use --dht-listen-port to specify port number. Make sure that
your
firewall configuration can pass through UDP traffic to the port.
The routing table is saved in $HOME/.aria2/dht.dat.
* src/DHT*
* src/BNode.{h, cc}
* src/PeerInteractionCommand.cc: enable DHT functionality for a
particular torrent.
* src/Data.cc: Rewritten ctor.
* src/OptionHandlerFactory.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/DefaultBtInteractive.cc: Send port message if dht is
enabled.
* src/RequestGroup.cc: Initialize DHT functionality. When
download
ends, remove BtContext from DHTPeerAnnounceStorage.
* src/BtPortMessage.{h, cc}: Rewritten.
* src/message.h
* src/OptionHandlerImpl.cc
* src/option_processing.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/Dictionary.{h, cc} (remove): New function.
* src/prefs.h
* src/DefaultBtMessageFactory.h
* src/BtHandshakeMessage.cc
* src/ActivePeerConnectionCommand.cc
* src/SocketCore.{h, cc}: Added datagram socket support.
* src/DefaultBtMessageFactory.cc
* src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
Create DHT commands.
* src/BtMessageFactory.h
* src/PeerMessageUtil.{h, cc}
2008-02-01 17:36:33 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-02-18 13:41:58 +00:00
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_BT_MIN_CRYPTO_LEVEL, TEXT_BT_MIN_CRYPTO_LEVEL,
|
|
|
|
op->get(PREF_BT_MIN_CRYPTO_LEVEL)));
|
2008-02-18 13:41:58 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_BT_REQUIRE_CRYPTO, TEXT_BT_REQUIRE_CRYPTO,
|
|
|
|
op->get(PREF_BT_REQUIRE_CRYPTO)));
|
2008-02-18 13:41:58 +00:00
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-06-04 10:14:48 +00:00
|
|
|
{
|
|
|
|
HelpItemHandle item(new HelpItem(PREF_BT_REQUEST_PEER_SPEED_LIMIT,
|
|
|
|
TEXT_BT_REQUEST_PEER_SPEED_LIMIT,
|
|
|
|
op->get(PREF_BT_REQUEST_PEER_SPEED_LIMIT)));
|
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-06-08 12:34:36 +00:00
|
|
|
{
|
|
|
|
HelpItemHandle item(new HelpItem(PREF_BT_MAX_OPEN_FILES,
|
|
|
|
TEXT_BT_MAX_OPEN_FILES,
|
|
|
|
op->get(PREF_BT_MAX_OPEN_FILES)));
|
|
|
|
item->addTag(TAG_BITTORRENT);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-01-05 11:26:56 +00:00
|
|
|
#endif // ENABLE_BITTORRENT
|
|
|
|
#ifdef ENABLE_METALINK
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_METALINK_FILE, TEXT_METALINK_FILE));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-05-05 08:32:40 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_METALINK_SERVERS, TEXT_METALINK_SERVERS, op->get(PREF_METALINK_SERVERS)));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_METALINK_VERSION, TEXT_METALINK_VERSION));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_METALINK_LANGUAGE, TEXT_METALINK_LANGUAGE));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_METALINK_OS, TEXT_METALINK_OS));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_METALINK_LOCATION, TEXT_METALINK_LOCATION));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_METALINK_PREFERRED_PROTOCOL, TEXT_METALINK_PREFERRED_PROTOCOL,
|
|
|
|
op->get(PREF_METALINK_PREFERRED_PROTOCOL)));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_FOLLOW_METALINK,
|
|
|
|
TEXT_FOLLOW_METALINK,
|
|
|
|
op->get(PREF_FOLLOW_METALINK)));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_METALINK_ENABLE_UNIQUE_PROTOCOL,
|
|
|
|
TEXT_METALINK_ENABLE_UNIQUE_PROTOCOL,
|
|
|
|
op->get(PREF_METALINK_ENABLE_UNIQUE_PROTOCOL)));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_METALINK);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
#endif // ENABLE_METALINK
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem("version", TEXT_VERSION));
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-01-11 14:50:34 +00:00
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_NO_CONF, TEXT_NO_CONF));
|
2008-01-11 14:50:34 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_CONF_PATH, TEXT_CONF_PATH, "$HOME/.aria2/aria2.conf"));
|
2008-01-11 14:50:34 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-02-11 05:07:08 +00:00
|
|
|
{
|
2008-04-22 11:26:50 +00:00
|
|
|
HelpItemHandle item(new HelpItem(PREF_STOP, TEXT_STOP, op->get(PREF_STOP)));
|
2008-02-11 05:07:08 +00:00
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-04-20 06:30:44 +00:00
|
|
|
{
|
|
|
|
HelpItemHandle item(new HelpItem(PREF_HEADER, TEXT_HEADER));
|
2008-04-22 10:20:11 +00:00
|
|
|
item->addTag(TAG_HTTP);
|
2008-04-20 06:30:44 +00:00
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-04-22 10:29:48 +00:00
|
|
|
{
|
|
|
|
HelpItemHandle item(new HelpItem(PREF_QUIET, TEXT_QUIET, V_FALSE));
|
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-05-08 11:18:36 +00:00
|
|
|
#ifdef ENABLE_ASYNC_DNS
|
|
|
|
{
|
|
|
|
HelpItemHandle item(new HelpItem(PREF_ASYNC_DNS, TEXT_ASYNC_DNS, op->get(PREF_ASYNC_DNS)));
|
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
|
|
|
#endif // ENABLE_ASYNC_DNS
|
2008-05-09 14:44:28 +00:00
|
|
|
{
|
|
|
|
HelpItemHandle item(new HelpItem(PREF_FTP_REUSE_CONNECTION, TEXT_FTP_REUSE_CONNECTION, op->get(PREF_FTP_REUSE_CONNECTION)));
|
|
|
|
item->addTag(TAG_FTP);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-05-15 14:37:02 +00:00
|
|
|
{
|
|
|
|
HelpItemHandle item(new HelpItem(PREF_SUMMARY_INTERVAL,
|
|
|
|
TEXT_SUMMARY_INTERVAL,
|
|
|
|
op->get(PREF_SUMMARY_INTERVAL)));
|
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-05-15 15:48:41 +00:00
|
|
|
{
|
|
|
|
HelpItemHandle item(new HelpItem(PREF_LOG_LEVEL,
|
|
|
|
TEXT_LOG_LEVEL,
|
|
|
|
op->get(PREF_LOG_LEVEL)));
|
|
|
|
item->addTag(TAG_ADVANCED);
|
|
|
|
item->setAvailableValues
|
2008-05-19 10:25:38 +00:00
|
|
|
(StringFormat("%s,%s,%s,%s,%s",
|
|
|
|
V_DEBUG.c_str(), V_INFO.c_str(), V_NOTICE.c_str(),
|
|
|
|
V_WARN.c_str(), V_ERROR.c_str()).str());
|
2008-05-15 15:48:41 +00:00
|
|
|
tc->addItem(item);
|
|
|
|
}
|
2008-01-05 11:26:56 +00:00
|
|
|
{
|
2008-04-20 00:50:22 +00:00
|
|
|
HelpItemHandle item(new HelpItem("help", TEXT_HELP, TAG_BASIC));
|
2008-04-26 05:58:49 +00:00
|
|
|
item->setAvailableValues
|
2008-05-10 02:35:42 +00:00
|
|
|
(StringFormat("%s,%s,%s,%s,%s,%s,%s,all", TAG_BASIC, TAG_ADVANCED, TAG_HTTP, TAG_FTP, TAG_METALINK, TAG_BITTORRENT,TAG_HELP).str());
|
2008-01-05 11:26:56 +00:00
|
|
|
item->addTag(TAG_BASIC);
|
2008-05-10 02:35:42 +00:00
|
|
|
item->addTag(TAG_HELP);
|
2008-01-05 11:26:56 +00:00
|
|
|
tc->addItem(item);
|
2008-01-11 14:50:34 +00:00
|
|
|
}
|
2008-01-05 11:26:56 +00:00
|
|
|
return tc;
|
|
|
|
}
|
2008-02-08 15:53:45 +00:00
|
|
|
|
|
|
|
} // namespace aria2
|