prefs.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. /* <!-- copyright */
  2. /*
  3. * aria2 - The high speed download utility
  4. *
  5. * Copyright (C) 2006 Tatsuhiro Tsujikawa
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. *
  21. * In addition, as a special exception, the copyright holders give
  22. * permission to link the code of portions of this program with the
  23. * OpenSSL library under certain conditions as described in each
  24. * individual source file, and distribute linked combinations
  25. * including the two.
  26. * You must obey the GNU General Public License in all respects
  27. * for all of the code used other than OpenSSL. If you modify
  28. * file(s) with this exception, you may extend this exception to your
  29. * version of the file(s), but you are not obligated to do so. If you
  30. * do not wish to do so, delete this exception statement from your
  31. * version. If you delete this exception statement from all source
  32. * files in the program, then also delete it here.
  33. */
  34. /* copyright --> */
  35. #ifndef _D_PREFS_H_
  36. #define _D_PREFS_H_
  37. #include "common.h"
  38. #include <string>
  39. namespace aria2 {
  40. /**
  41. * Constants
  42. */
  43. extern const std::string V_TRUE;
  44. extern const std::string V_FALSE;
  45. extern const std::string V_NONE;
  46. extern const std::string V_MEM;
  47. extern const std::string V_ALL;
  48. /**
  49. * General preferences
  50. */
  51. // values: 1*digit
  52. extern const std::string PREF_RETRY_WAIT;
  53. // values: 1*digit
  54. extern const std::string PREF_TIMEOUT;
  55. // values: 1*digit
  56. extern const std::string PREF_DNS_TIMEOUT;
  57. // values: 1*digit
  58. extern const std::string PREF_CONNECT_TIMEOUT;
  59. // values: 1*digit
  60. extern const std::string PREF_MAX_TRIES;
  61. // values: 1*digit
  62. extern const std::string PREF_AUTO_SAVE_INTERVAL;
  63. // values: a string that your file system recognizes as a file name.
  64. extern const std::string PREF_LOG;
  65. // values: a string that your file system recognizes as a directory.
  66. extern const std::string PREF_DIR;
  67. // values: a string that your file system recognizes as a file name.
  68. extern const std::string PREF_OUT;
  69. // values: 1*digit
  70. extern const std::string PREF_SPLIT;
  71. // value: true | false
  72. extern const std::string PREF_DAEMON;
  73. // value: a string
  74. extern const std::string PREF_REFERER;
  75. // value: 1*digit
  76. extern const std::string PREF_LOWEST_SPEED_LIMIT;
  77. // value: 1*digit
  78. extern const std::string PREF_SEGMENT_SIZE;
  79. // value: 1*digit
  80. extern const std::string PREF_MAX_DOWNLOAD_LIMIT;
  81. // value: 1*digit
  82. extern const std::string PREF_STARTUP_IDLE_TIME;
  83. // value: prealloc | falloc | none
  84. extern const std::string PREF_FILE_ALLOCATION;
  85. extern const std::string V_PREALLOC;
  86. extern const std::string V_FALLOC;
  87. // value: 1*digit
  88. extern const std::string PREF_NO_FILE_ALLOCATION_LIMIT;
  89. // value: true | false
  90. extern const std::string PREF_ALLOW_OVERWRITE;
  91. // value: true | false
  92. extern const std::string PREF_REALTIME_CHUNK_CHECKSUM;
  93. // value: true | false
  94. extern const std::string PREF_CHECK_INTEGRITY;
  95. // value: string that your file system recognizes as a file name.
  96. extern const std::string PREF_NETRC_PATH;
  97. // value:
  98. extern const std::string PREF_CONTINUE;
  99. // value:
  100. extern const std::string PREF_NO_NETRC;
  101. // value: 1*digit
  102. extern const std::string PREF_MAX_OVERALL_DOWNLOAD_LIMIT;
  103. // value: 1*digit
  104. extern const std::string PREF_MAX_DOWNLOADS;
  105. // value: string that your file system recognizes as a file name.
  106. extern const std::string PREF_INPUT_FILE;
  107. // value: 1*digit
  108. extern const std::string PREF_MAX_CONCURRENT_DOWNLOADS;
  109. // value: true | false
  110. extern const std::string PREF_FORCE_SEQUENTIAL;
  111. // value: true | false
  112. extern const std::string PREF_AUTO_FILE_RENAMING;
  113. // value: true | false
  114. extern const std::string PREF_PARAMETERIZED_URI;
  115. // value: true | false
  116. extern const std::string PREF_ENABLE_DIRECT_IO;
  117. // value: true | false
  118. extern const std::string PREF_ALLOW_PIECE_LENGTH_CHANGE;
  119. // value: true | false
  120. extern const std::string PREF_NO_CONF;
  121. // value: string
  122. extern const std::string PREF_CONF_PATH;
  123. // value: 1*digit
  124. extern const std::string PREF_STOP;
  125. // value: true | false
  126. extern const std::string PREF_QUIET;
  127. // value: true | false
  128. extern const std::string PREF_ASYNC_DNS;
  129. // value: 1*digit
  130. extern const std::string PREF_SUMMARY_INTERVAL;
  131. // value: debug, info, notice, warn, error
  132. extern const std::string PREF_LOG_LEVEL;
  133. extern const std::string V_DEBUG;
  134. extern const std::string V_INFO;
  135. extern const std::string V_NOTICE;
  136. extern const std::string V_WARN;
  137. extern const std::string V_ERROR;
  138. // value: inorder | feedback | adaptive
  139. extern const std::string PREF_URI_SELECTOR;
  140. extern const std::string V_INORDER;
  141. extern const std::string V_FEEDBACK;
  142. extern const std::string V_ADAPTIVE;
  143. // value: 1*digit
  144. extern const std::string PREF_SERVER_STAT_TIMEOUT;
  145. // value: string that your file system recognizes as a file name.
  146. extern const std::string PREF_SERVER_STAT_IF;
  147. // value: string that your file system recognizes as a file name.
  148. extern const std::string PREF_SERVER_STAT_OF;
  149. // value: true | false
  150. extern const std::string PREF_REMOTE_TIME;
  151. // value: 1*digit
  152. extern const std::string PREF_MAX_FILE_NOT_FOUND;
  153. // value: epoll | select
  154. extern const std::string PREF_EVENT_POLL;
  155. extern const std::string V_EPOLL;
  156. extern const std::string V_SELECT;
  157. // value: 1*digit
  158. extern const std::string PREF_XML_RPC_LISTEN_PORT;
  159. // value: true | false
  160. extern const std::string PREF_ENABLE_XML_RPC;
  161. // value: true | false
  162. extern const std::string PREF_DRY_RUN;
  163. // value: true | false
  164. extern const std::string PREF_REUSE_URI;
  165. // value: string
  166. extern const std::string PREF_XML_RPC_USER;
  167. // value: string
  168. extern const std::string PREF_XML_RPC_PASSWD;
  169. // value: 1*digit
  170. extern const std::string PREF_XML_RPC_MAX_REQUEST_SIZE;
  171. // value: string
  172. extern const std::string PREF_ON_DOWNLOAD_START;
  173. extern const std::string PREF_ON_DOWNLOAD_STOP;
  174. extern const std::string PREF_ON_DOWNLOAD_COMPLETE;
  175. extern const std::string PREF_ON_DOWNLOAD_ERROR;
  176. // value: true | false
  177. extern const std::string PREF_XML_RPC_LISTEN_ALL;
  178. /**
  179. * FTP related preferences
  180. */
  181. extern const std::string PREF_FTP_USER;
  182. extern const std::string PREF_FTP_PASSWD;
  183. // values: binary | ascii
  184. extern const std::string PREF_FTP_TYPE;
  185. extern const std::string V_BINARY;
  186. extern const std::string V_ASCII;
  187. // values: true | false
  188. extern const std::string PREF_FTP_PASV;
  189. // values: true | false
  190. extern const std::string PREF_FTP_REUSE_CONNECTION;
  191. /**
  192. * HTTP related preferences
  193. */
  194. extern const std::string PREF_HTTP_USER;
  195. extern const std::string PREF_HTTP_PASSWD;
  196. // values: basic
  197. extern const std::string PREF_HTTP_AUTH_SCHEME;
  198. extern const std::string V_BASIC;
  199. // values: string
  200. extern const std::string PREF_USER_AGENT;
  201. // value: string that your file system recognizes as a file name.
  202. extern const std::string PREF_LOAD_COOKIES;
  203. // value: string that your file system recognizes as a file name.
  204. extern const std::string PREF_SAVE_COOKIES;
  205. // values: true | false
  206. extern const std::string PREF_ENABLE_HTTP_KEEP_ALIVE;
  207. // values: true | false
  208. extern const std::string PREF_ENABLE_HTTP_PIPELINING;
  209. // value: 1*digit
  210. extern const std::string PREF_MAX_HTTP_PIPELINING;
  211. // value: string
  212. extern const std::string PREF_HEADER;
  213. // value: string that your file system recognizes as a file name.
  214. extern const std::string PREF_CERTIFICATE;
  215. // value: string that your file system recognizes as a file name.
  216. extern const std::string PREF_PRIVATE_KEY;
  217. // value: string that your file system recognizes as a file name.
  218. extern const std::string PREF_CA_CERTIFICATE;
  219. // value: true | false
  220. extern const std::string PREF_CHECK_CERTIFICATE;
  221. // value: true | false
  222. extern const std::string PREF_USE_HEAD;
  223. // value: true | false
  224. extern const std::string PREF_HTTP_AUTH_CHALLENGE;
  225. /**;
  226. * Proxy related preferences
  227. */
  228. extern const std::string PREF_HTTP_PROXY;
  229. extern const std::string PREF_HTTPS_PROXY;
  230. extern const std::string PREF_FTP_PROXY;
  231. extern const std::string PREF_ALL_PROXY;
  232. // values: comma separeted hostname or domain
  233. extern const std::string PREF_NO_PROXY;
  234. // values: get | tunnel
  235. extern const std::string PREF_PROXY_METHOD;
  236. extern const std::string V_GET;
  237. extern const std::string V_TUNNEL;
  238. /**
  239. * BitTorrent related preferences
  240. */
  241. // values: 1*digit
  242. extern const std::string PREF_PEER_CONNECTION_TIMEOUT;
  243. // values: 1*digit
  244. extern const std::string PREF_BT_TIMEOUT;
  245. // values: 1*digit
  246. extern const std::string PREF_BT_REQUEST_TIMEOUT;
  247. // values: true | false
  248. extern const std::string PREF_SHOW_FILES;
  249. // values: 1*digit
  250. extern const std::string PREF_MAX_OVERALL_UPLOAD_LIMIT;
  251. // values: 1*digit
  252. extern const std::string PREF_MAX_UPLOAD_LIMIT;
  253. // values: a string that your file system recognizes as a file name.
  254. extern const std::string PREF_TORRENT_FILE;
  255. // values: 1*digit
  256. extern const std::string PREF_LISTEN_PORT;
  257. // values: true | false | mem
  258. extern const std::string PREF_FOLLOW_TORRENT;
  259. // values: 1*digit *( (,|-) 1*digit)
  260. extern const std::string PREF_SELECT_FILE;
  261. // values: 1*digit
  262. extern const std::string PREF_SEED_TIME;
  263. // values: 1*digit ['.' [ 1*digit ] ]
  264. extern const std::string PREF_SEED_RATIO;
  265. // values: 1*digit
  266. extern const std::string PREF_BT_KEEP_ALIVE_INTERVAL;
  267. // values: a string, less than or equals to 20 bytes length
  268. extern const std::string PREF_PEER_ID_PREFIX;
  269. // values: true | false
  270. extern const std::string PREF_ENABLE_PEER_EXCHANGE;
  271. // values: true | false
  272. extern const std::string PREF_ENABLE_DHT;
  273. // values: 1*digit
  274. extern const std::string PREF_DHT_LISTEN_PORT;
  275. // values: a string
  276. extern const std::string PREF_DHT_ENTRY_POINT_HOST;
  277. // values: 1*digit
  278. extern const std::string PREF_DHT_ENTRY_POINT_PORT;
  279. // values: a string (hostname:port)
  280. extern const std::string PREF_DHT_ENTRY_POINT;
  281. // values: a string
  282. extern const std::string PREF_DHT_FILE_PATH;
  283. // values: plain | arc4
  284. extern const std::string PREF_BT_MIN_CRYPTO_LEVEL;
  285. extern const std::string V_PLAIN;
  286. extern const std::string V_ARC4;
  287. // values:: true | false
  288. extern const std::string PREF_BT_REQUIRE_CRYPTO;
  289. // values: 1*digit
  290. extern const std::string PREF_BT_REQUEST_PEER_SPEED_LIMIT;
  291. // values: 1*digit
  292. extern const std::string PREF_BT_MAX_OPEN_FILES;
  293. // values: true | false
  294. extern const std::string PREF_BT_SEED_UNVERIFIED;
  295. // values: true | false
  296. extern const std::string PREF_BT_HASH_CHECK_SEED;
  297. // values: 1*digit
  298. extern const std::string PREF_BT_MAX_PEERS;
  299. // values: a string (IP address)
  300. extern const std::string PREF_BT_EXTERNAL_IP;
  301. // values: 1*digit '=' a string that your file system recognizes as a file name.
  302. extern const std::string PREF_INDEX_OUT;
  303. // values: 1*digit
  304. extern const std::string PREF_BT_TRACKER_INTERVAL;
  305. // values: 1*digit
  306. extern const std::string PREF_BT_STOP_TIMEOUT;
  307. /**
  308. * Metalink related preferences
  309. */
  310. // values: a string that your file system recognizes as a file name.
  311. extern const std::string PREF_METALINK_FILE;
  312. // values: a string
  313. extern const std::string PREF_METALINK_VERSION;
  314. // values: a string
  315. extern const std::string PREF_METALINK_LANGUAGE;
  316. // values: a string
  317. extern const std::string PREF_METALINK_OS;
  318. // values: a string
  319. extern const std::string PREF_METALINK_LOCATION;
  320. // values: 1*digit
  321. extern const std::string PREF_METALINK_SERVERS;
  322. // values: true | false | mem
  323. extern const std::string PREF_FOLLOW_METALINK;
  324. // values: http | https | ftp | none
  325. extern const std::string PREF_METALINK_PREFERRED_PROTOCOL;
  326. extern const std::string V_HTTP;
  327. extern const std::string V_HTTPS;
  328. extern const std::string V_FTP;
  329. // values: true | false
  330. extern const std::string PREF_METALINK_ENABLE_UNIQUE_PROTOCOL;
  331. } // namespace aria2
  332. #endif // _D_PREFS_H_