| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470 | /* <!-- 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 --> */#ifndef D_PREFS_H#define D_PREFS_H#include "common.h"#include <string>namespace aria2 {struct Pref {  Pref(const char* k, size_t i);  // Keyword, aka Option Name  const char* k;  // Option ID  size_t i;};namespace option {// Returns the number of options.size_t countOption();// Returns Pref whose ID is id. id must be less than countOption().const Pref* i2p(size_t id);// Returns Pref whose keyword is k. If no such Pref is found, returns// special null Pref whose ID is 0.const Pref* k2p(const std::string& k);} // namespace option/** * Constants */extern const std::string A2_V_TRUE;extern const std::string A2_V_FALSE;extern const std::string A2_V_DEFAULT;extern const std::string V_NONE;extern const std::string V_MEM;extern const std::string V_ALL;extern const std::string A2_V_FULL;extern const std::string A2_V_GEOM;extern const std::string V_PREALLOC;extern const std::string V_FALLOC;extern const std::string V_DEBUG;extern const std::string V_INFO;extern const std::string V_NOTICE;extern const std::string V_WARN;extern const std::string V_ERROR;extern const std::string V_INORDER;extern const std::string V_FEEDBACK;extern const std::string V_ADAPTIVE;extern const std::string V_EPOLL;extern const std::string V_KQUEUE;extern const std::string V_PORT;extern const std::string V_POLL;extern const std::string V_SELECT;extern const std::string V_BINARY;extern const std::string V_ASCII;extern const std::string V_GET;extern const std::string V_TUNNEL;extern const std::string V_PLAIN;extern const std::string V_ARC4;extern const std::string V_HTTP;extern const std::string V_HTTPS;extern const std::string V_FTP;extern const Pref* PREF_VERSION;extern const Pref* PREF_HELP;/** * General preferences */// values: 1*digitextern const Pref* PREF_TIMEOUT;// values: 1*digitextern const Pref* PREF_DNS_TIMEOUT;// values: 1*digitextern const Pref* PREF_CONNECT_TIMEOUT;// values: 1*digitextern const Pref* PREF_MAX_TRIES;// values: 1*digitextern const Pref* PREF_AUTO_SAVE_INTERVAL;// values: a string that your file system recognizes as a file name.extern const Pref* PREF_LOG;// values: a string that your file system recognizes as a directory.extern const Pref* PREF_DIR;// values: a string that your file system recognizes as a file name.extern const Pref* PREF_OUT;// values: 1*digitextern const Pref* PREF_SPLIT;// value: true | falseextern const Pref* PREF_DAEMON;// value: a stringextern const Pref* PREF_REFERER;// value: 1*digitextern const Pref* PREF_LOWEST_SPEED_LIMIT;// value: 1*digitextern const Pref* PREF_PIECE_LENGTH;// value: 1*digitextern const Pref* PREF_MAX_DOWNLOAD_LIMIT;// value: 1*digitextern const Pref* PREF_STARTUP_IDLE_TIME;// value: prealloc | falloc | noneextern const Pref* PREF_FILE_ALLOCATION;// value: 1*digitextern const Pref* PREF_NO_FILE_ALLOCATION_LIMIT;// value: true | falseextern const Pref* PREF_ALLOW_OVERWRITE;// value: true | falseextern const Pref* PREF_REALTIME_CHUNK_CHECKSUM;// value: true | falseextern const Pref* PREF_CHECK_INTEGRITY;// value: string that your file system recognizes as a file name.extern const Pref* PREF_NETRC_PATH;// value:extern const Pref* PREF_CONTINUE;// value:extern const Pref* PREF_NO_NETRC;// value: 1*digitextern const Pref* PREF_MAX_OVERALL_DOWNLOAD_LIMIT;// value: 1*digitextern const Pref* PREF_MAX_DOWNLOADS;// value: string that your file system recognizes as a file name.extern const Pref* PREF_INPUT_FILE;// value: true | falseextern const Pref* PREF_DEFERRED_INPUT;// value: 1*digitextern const Pref* PREF_MAX_CONCURRENT_DOWNLOADS;// value: true | falseextern const Pref* PREF_FORCE_SEQUENTIAL;// value: true | falseextern const Pref* PREF_AUTO_FILE_RENAMING;// value: true | falseextern const Pref* PREF_PARAMETERIZED_URI;// value: true | falseextern const Pref* PREF_ENABLE_DIRECT_IO;// value: true | falseextern const Pref* PREF_ALLOW_PIECE_LENGTH_CHANGE;// value: true | falseextern const Pref* PREF_NO_CONF;// value: stringextern const Pref* PREF_CONF_PATH;// value: 1*digitextern const Pref* PREF_STOP;// value: true | falseextern const Pref* PREF_QUIET;// value: true | falseextern const Pref* PREF_ASYNC_DNS;// value: 1*digitextern const Pref* PREF_SUMMARY_INTERVAL;// value: debug, info, notice, warn, errorextern const Pref* PREF_LOG_LEVEL;// value: inorder | feedback | adaptiveextern const Pref* PREF_URI_SELECTOR;// value: 1*digitextern const Pref* PREF_SERVER_STAT_TIMEOUT;// value: string that your file system recognizes as a file name.extern const Pref* PREF_SERVER_STAT_IF;// value: string that your file system recognizes as a file name.extern const Pref* PREF_SERVER_STAT_OF;// value: true | falseextern const Pref* PREF_REMOTE_TIME;// value: 1*digitextern const Pref* PREF_MAX_FILE_NOT_FOUND;// value: epoll | selectextern const Pref* PREF_EVENT_POLL;// value: true | falseextern const Pref* PREF_ENABLE_RPC;// value: 1*digitextern const Pref* PREF_RPC_LISTEN_PORT;// value: stringextern const Pref* PREF_RPC_USER;// value: stringextern const Pref* PREF_RPC_PASSWD;// value: 1*digitextern const Pref* PREF_RPC_MAX_REQUEST_SIZE;// value: true | falseextern const Pref* PREF_RPC_LISTEN_ALL;// value: true | falseextern const Pref* PREF_RPC_ALLOW_ORIGIN_ALL;// value: true | falseextern const Pref* PREF_DRY_RUN;// value: true | falseextern const Pref* PREF_REUSE_URI;// value: stringextern const Pref* PREF_ON_DOWNLOAD_START;extern const Pref* PREF_ON_DOWNLOAD_PAUSE;extern const Pref* PREF_ON_DOWNLOAD_STOP;extern const Pref* PREF_ON_DOWNLOAD_COMPLETE;extern const Pref* PREF_ON_DOWNLOAD_ERROR;// value: stringextern const Pref* PREF_INTERFACE;// value: true | falseextern const Pref* PREF_DISABLE_IPV6;// value: true | falseextern const Pref* PREF_HUMAN_READABLE;// value: true | falseextern const Pref* PREF_REMOVE_CONTROL_FILE;// value: true | falseextern const Pref* PREF_ALWAYS_RESUME;// value: 1*digitextern const Pref* PREF_MAX_RESUME_FAILURE_TRIES;// value: string that your file system recognizes as a file name.extern const Pref* PREF_SAVE_SESSION;// value: 1*digitextern const Pref* PREF_MAX_CONNECTION_PER_SERVER;// value: 1*digitextern const Pref* PREF_MIN_SPLIT_SIZE;// value: true | falseextern const Pref* PREF_CONDITIONAL_GET;// value: true | falseextern const Pref* PREF_SELECT_LEAST_USED_HOST;// value: true | falseextern const Pref* PREF_ENABLE_ASYNC_DNS6;// value: 1*digitextern const Pref* PREF_MAX_DOWNLOAD_RESULT;// value: 1*digitextern const Pref* PREF_RETRY_WAIT;// value: stringextern const Pref* PREF_ASYNC_DNS_SERVER;// value: true | falseextern const Pref* PREF_SHOW_CONSOLE_READOUT;// value: default | inorder | geomextern const Pref* PREF_STREAM_PIECE_SELECTOR;// value: true | falseextern const Pref* PREF_TRUNCATE_CONSOLE_READOUT;// value: true | falseextern const Pref* PREF_PAUSE;// value: default | fullextern const Pref* PREF_DOWNLOAD_RESULT;// value: true | falseextern const Pref* PREF_HASH_CHECK_ONLY;/** * FTP related preferences */extern const Pref* PREF_FTP_USER;extern const Pref* PREF_FTP_PASSWD;// values: binary | asciiextern const Pref* PREF_FTP_TYPE;// values: true | falseextern const Pref* PREF_FTP_PASV;// values: true | falseextern const Pref* PREF_FTP_REUSE_CONNECTION;// values: hashType=digestextern const Pref* PREF_CHECKSUM;// value: pidextern const Pref* PREF_STOP_WITH_PROCESS;/** * HTTP related preferences */extern const Pref* PREF_HTTP_USER;extern const Pref* PREF_HTTP_PASSWD;// values: stringextern const Pref* PREF_USER_AGENT;// value: string that your file system recognizes as a file name.extern const Pref* PREF_LOAD_COOKIES;// value: string that your file system recognizes as a file name.extern const Pref* PREF_SAVE_COOKIES;// values: true | falseextern const Pref* PREF_ENABLE_HTTP_KEEP_ALIVE;// values: true | falseextern const Pref* PREF_ENABLE_HTTP_PIPELINING;// value: 1*digitextern const Pref* PREF_MAX_HTTP_PIPELINING;// value: stringextern const Pref* PREF_HEADER;// value: string that your file system recognizes as a file name.extern const Pref* PREF_CERTIFICATE;// value: string that your file system recognizes as a file name.extern const Pref* PREF_PRIVATE_KEY;// value: string that your file system recognizes as a file name.extern const Pref* PREF_CA_CERTIFICATE;// value: true | falseextern const Pref* PREF_CHECK_CERTIFICATE;// value: true | falseextern const Pref* PREF_USE_HEAD;// value: true | falseextern const Pref* PREF_HTTP_AUTH_CHALLENGE;// value: true | falseextern const Pref* PREF_HTTP_NO_CACHE;// value: true | falseextern const Pref* PREF_HTTP_ACCEPT_GZIP;/**; * Proxy related preferences */extern const Pref* PREF_HTTP_PROXY;extern const Pref* PREF_HTTPS_PROXY;extern const Pref* PREF_FTP_PROXY;extern const Pref* PREF_ALL_PROXY;// values: comma separeted hostname or domainextern const Pref* PREF_NO_PROXY;// values: get | tunnelextern const Pref* PREF_PROXY_METHOD;extern const Pref* PREF_HTTP_PROXY_USER;extern const Pref* PREF_HTTP_PROXY_PASSWD;extern const Pref* PREF_HTTPS_PROXY_USER;extern const Pref* PREF_HTTPS_PROXY_PASSWD;extern const Pref* PREF_FTP_PROXY_USER;extern const Pref* PREF_FTP_PROXY_PASSWD;extern const Pref* PREF_ALL_PROXY_USER;extern const Pref* PREF_ALL_PROXY_PASSWD;/** * BitTorrent related preferences */// values: 1*digitextern const Pref* PREF_PEER_CONNECTION_TIMEOUT;// values: 1*digitextern const Pref* PREF_BT_TIMEOUT;// values: 1*digitextern const Pref* PREF_BT_REQUEST_TIMEOUT;// values: true | falseextern const Pref* PREF_SHOW_FILES;// values: 1*digitextern const Pref* PREF_MAX_OVERALL_UPLOAD_LIMIT;// values: 1*digitextern const Pref* PREF_MAX_UPLOAD_LIMIT;// values: a string that your file system recognizes as a file name.extern const Pref* PREF_TORRENT_FILE;// values: 1*digitextern const Pref* PREF_LISTEN_PORT;// values: true | false | memextern const Pref* PREF_FOLLOW_TORRENT;// values: 1*digit *( (,|-) 1*digit)extern const Pref* PREF_SELECT_FILE;// values: 1*digitextern const Pref* PREF_SEED_TIME;// values: 1*digit ['.' [ 1*digit ] ]extern const Pref* PREF_SEED_RATIO;// values: 1*digitextern const Pref* PREF_BT_KEEP_ALIVE_INTERVAL;// values: a string, less than or equals to 20 bytes lengthextern const Pref* PREF_PEER_ID_PREFIX;// values: true | falseextern const Pref* PREF_ENABLE_PEER_EXCHANGE;// values: true | falseextern const Pref* PREF_ENABLE_DHT;// values: a stringextern const Pref* PREF_DHT_LISTEN_ADDR;// values: 1*digitextern const Pref* PREF_DHT_LISTEN_PORT;// values: a stringextern const Pref* PREF_DHT_ENTRY_POINT_HOST;// values: 1*digitextern const Pref* PREF_DHT_ENTRY_POINT_PORT;// values: a string (hostname:port)extern const Pref* PREF_DHT_ENTRY_POINT;// values: a stringextern const Pref* PREF_DHT_FILE_PATH;// values: true | falseextern const Pref* PREF_ENABLE_DHT6;// values: a stringextern const Pref* PREF_DHT_LISTEN_ADDR6;// values: a stringextern const Pref* PREF_DHT_ENTRY_POINT_HOST6;// values: 1*digitextern const Pref* PREF_DHT_ENTRY_POINT_PORT6;// values: a string (hostname:port)extern const Pref* PREF_DHT_ENTRY_POINT6;// values: a stringextern const Pref* PREF_DHT_FILE_PATH6;// values: plain | arc4extern const Pref* PREF_BT_MIN_CRYPTO_LEVEL;// values:: true | falseextern const Pref* PREF_BT_REQUIRE_CRYPTO;// values: 1*digitextern const Pref* PREF_BT_REQUEST_PEER_SPEED_LIMIT;// values: 1*digitextern const Pref* PREF_BT_MAX_OPEN_FILES;// values: true | falseextern const Pref* PREF_BT_SEED_UNVERIFIED;// values: true | falseextern const Pref* PREF_BT_HASH_CHECK_SEED;// values: 1*digitextern const Pref* PREF_BT_MAX_PEERS;// values: a string (IP address)extern const Pref* PREF_BT_EXTERNAL_IP;// values: 1*digit '=' a string that your file system recognizes as a file name.extern const Pref* PREF_INDEX_OUT;// values: 1*digitextern const Pref* PREF_BT_TRACKER_INTERVAL;// values: 1*digitextern const Pref* PREF_BT_STOP_TIMEOUT;// values: head[=SIZE]|tail[=SIZE], ...extern const Pref* PREF_BT_PRIORITIZE_PIECE;// values: true | falseextern const Pref* PREF_BT_SAVE_METADATA;// values: true | falseextern const Pref* PREF_BT_METADATA_ONLY;// values: true | falseextern const Pref* PREF_BT_ENABLE_LPD;// values: stringextern const Pref* PREF_BT_LPD_INTERFACE;// values: 1*digitextern const Pref* PREF_BT_TRACKER_TIMEOUT;// values: 1*digitextern const Pref* PREF_BT_TRACKER_CONNECT_TIMEOUT;// values: 1*digitextern const Pref* PREF_DHT_MESSAGE_TIMEOUT;// values: stringextern const Pref* PREF_ON_BT_DOWNLOAD_COMPLETE;// values: stringextern const Pref* PREF_BT_TRACKER;// values: stringextern const Pref* PREF_BT_EXCLUDE_TRACKER;/** * Metalink related preferences */// values: a string that your file system recognizes as a file name.extern const Pref* PREF_METALINK_FILE;// values: a stringextern const Pref* PREF_METALINK_VERSION;// values: a stringextern const Pref* PREF_METALINK_LANGUAGE;// values: a stringextern const Pref* PREF_METALINK_OS;// values: a stringextern const Pref* PREF_METALINK_LOCATION;// values: 1*digitextern const Pref* PREF_METALINK_SERVERS;// values: true | false | memextern const Pref* PREF_FOLLOW_METALINK;// values: http | https | ftp | noneextern const Pref* PREF_METALINK_PREFERRED_PROTOCOL;// values: true | falseextern const Pref* PREF_METALINK_ENABLE_UNIQUE_PROTOCOL;// values: a stringextern const Pref* PREF_METALINK_BASE_URI;} // namespace aria2#endif // D_PREFS_H
 |