prefs.h 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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_MAX_TRIES;
  59. // values: 1*digit
  60. extern const std::string PREF_MIN_SEGMENT_SIZE;
  61. // values: 1*digit
  62. extern const std::string PREF_AUTO_SAVE_INTERVAL;
  63. // values: true | false
  64. extern const std::string PREF_STDOUT_LOG;
  65. // values: a string that your file system recognizes as a file name.
  66. extern const std::string PREF_LOG;
  67. // values: a string that your file system recognizes as a directory.
  68. extern const std::string PREF_DIR;
  69. // values: a string that your file system recognizes as a file name.
  70. extern const std::string PREF_OUT;
  71. // values: 1*digit
  72. extern const std::string PREF_SPLIT;
  73. // value: true | false
  74. extern const std::string PREF_DAEMON;
  75. // value: a string
  76. extern const std::string PREF_REFERER;
  77. // value: 1*digit
  78. extern const std::string PREF_LOWEST_SPEED_LIMIT;
  79. // value: 1*digit
  80. extern const std::string PREF_SEGMENT_SIZE;
  81. // value: 1*digit
  82. extern const std::string PREF_MAX_DOWNLOAD_LIMIT;
  83. // value: 1*digit
  84. extern const std::string PREF_STARTUP_IDLE_TIME;
  85. // value: prealloc | none
  86. extern const std::string PREF_FILE_ALLOCATION;
  87. extern const std::string V_PREALLOC;
  88. #// value: 1*digit
  89. extern const std::string PREF_NO_FILE_ALLOCATION_LIMIT;
  90. // value: true | false
  91. extern const std::string PREF_ALLOW_OVERWRITE;
  92. // value: true | false
  93. extern const std::string PREF_REALTIME_CHUNK_CHECKSUM;
  94. // value: true | false
  95. extern const std::string PREF_CHECK_INTEGRITY;
  96. // value: string that your file system recognizes as a file name.
  97. extern const std::string PREF_NETRC_PATH;
  98. // value:
  99. extern const std::string PREF_CONTINUE;
  100. // value:
  101. extern const std::string PREF_NO_NETRC;
  102. // value: 1*digit
  103. extern const std::string PREF_MAX_DOWNLOADS;
  104. // value: string that your file system recognizes as a file name.
  105. extern const std::string PREF_INPUT_FILE;
  106. // value: 1*digit
  107. extern const std::string PREF_MAX_CONCURRENT_DOWNLOADS;
  108. // value: 1*digit
  109. extern const std::string PREF_DIRECT_DOWNLOAD_TIMEOUT;
  110. // value: true | false
  111. extern const std::string PREF_FORCE_SEQUENTIAL;
  112. // value: true | false
  113. extern const std::string PREF_AUTO_FILE_RENAMING;
  114. // value: true | false
  115. extern const std::string PREF_PARAMETERIZED_URI;
  116. // value: true | false
  117. extern const std::string PREF_ENABLE_DIRECT_IO;
  118. // value: true | false
  119. extern const std::string PREF_ALLOW_PIECE_LENGTH_CHANGE;
  120. // value: true | false
  121. extern const std::string PREF_NO_CONF;
  122. // value: string
  123. extern const std::string PREF_CONF_PATH;
  124. // value: 1*digit
  125. extern const std::string PREF_STOP;
  126. // value: true | false
  127. extern const std::string PREF_QUIET;
  128. // value: true | false
  129. extern const std::string PREF_ASYNC_DNS;
  130. // value: 1*digit
  131. extern const std::string PREF_SUMMARY_INTERVAL;
  132. // value: debug, info, notice, warn, error
  133. extern const std::string PREF_LOG_LEVEL;
  134. extern const std::string V_DEBUG;
  135. extern const std::string V_INFO;
  136. extern const std::string V_NOTICE;
  137. extern const std::string V_WARN;
  138. extern const std::string V_ERROR;
  139. /**
  140. * FTP related preferences
  141. */
  142. extern const std::string PREF_FTP_USER;
  143. extern const std::string PREF_FTP_PASSWD;
  144. // values: binary | ascii
  145. extern const std::string PREF_FTP_TYPE;
  146. extern const std::string V_BINARY;
  147. extern const std::string V_ASCII;
  148. // values: get | tunnel
  149. extern const std::string PREF_FTP_VIA_HTTP_PROXY;
  150. extern const std::string V_GET;
  151. extern const std::string V_TUNNEL;
  152. // values: true | false
  153. extern const std::string PREF_FTP_PASV;
  154. // values: true | false
  155. extern const std::string PREF_FTP_REUSE_CONNECTION;
  156. /**
  157. * HTTP related preferences
  158. */
  159. extern const std::string PREF_HTTP_USER;
  160. extern const std::string PREF_HTTP_PASSWD;
  161. // values: basic
  162. extern const std::string PREF_HTTP_AUTH_SCHEME;
  163. extern const std::string V_BASIC;
  164. // values: true | false
  165. extern const std::string PREF_HTTP_AUTH_ENABLED;
  166. // values: string
  167. extern const std::string PREF_USER_AGENT;
  168. // value: string that your file system recognizes as a file name.
  169. extern const std::string PREF_LOAD_COOKIES;
  170. // values: true | false
  171. extern const std::string PREF_ENABLE_HTTP_KEEP_ALIVE;
  172. // values: true | false
  173. extern const std::string PREF_ENABLE_HTTP_PIPELINING;
  174. // value: 1*digit
  175. extern const std::string PREF_MAX_HTTP_PIPELINING;
  176. // value: string
  177. extern const std::string PREF_HEADER;
  178. /**;
  179. * HTTP proxy related preferences
  180. */
  181. extern const std::string PREF_HTTP_PROXY;
  182. extern const std::string PREF_HTTP_PROXY_USER;
  183. extern const std::string PREF_HTTP_PROXY_PASSWD;
  184. extern const std::string PREF_HTTP_PROXY_HOST;
  185. extern const std::string PREF_HTTP_PROXY_PORT;
  186. // values: get | tunnel
  187. extern const std::string PREF_HTTP_PROXY_METHOD;
  188. // values: true | false
  189. extern const std::string PREF_HTTP_PROXY_ENABLED;
  190. // values: true | false
  191. extern const std::string PREF_HTTP_PROXY_AUTH_ENABLED;
  192. /**
  193. * BitTorrent related preferences
  194. */
  195. // values: 1*digit
  196. extern const std::string PREF_PEER_CONNECTION_TIMEOUT;
  197. // values: 1*digit
  198. extern const std::string PREF_BT_TIMEOUT;
  199. // values: 1*digit
  200. extern const std::string PREF_BT_REQUEST_TIMEOUT;
  201. // values: true | false
  202. extern const std::string PREF_SHOW_FILES;
  203. // values: true | false
  204. extern const std::string PREF_NO_PREALLOCATION;
  205. // values: true | false
  206. extern const std::string PREF_DIRECT_FILE_MAPPING;
  207. // values: 1*digit
  208. extern const std::string PREF_MAX_UPLOAD_LIMIT;
  209. // values: a string that your file system recognizes as a file name.
  210. extern const std::string PREF_TORRENT_FILE;
  211. // values: 1*digit
  212. extern const std::string PREF_LISTEN_PORT;
  213. // values: true | false | mem
  214. extern const std::string PREF_FOLLOW_TORRENT;
  215. // values: 1*digit *( (,|-) 1*digit)
  216. extern const std::string PREF_SELECT_FILE;
  217. // values: 1*digit
  218. extern const std::string PREF_SEED_TIME;
  219. // values: 1*digit ['.' [ 1*digit ] ]
  220. extern const std::string PREF_SEED_RATIO;
  221. // values: 1*digit
  222. extern const std::string PREF_TRACKER_MAX_TRIES;
  223. // values: 1*digit
  224. extern const std::string PREF_BT_KEEP_ALIVE_INTERVAL;
  225. // values: a string, less than or equals to 20 bytes length
  226. extern const std::string PREF_PEER_ID_PREFIX;
  227. // values: true | false
  228. extern const std::string PREF_ENABLE_PEER_EXCHANGE;
  229. // values: true | false
  230. extern const std::string PREF_ENABLE_DHT;
  231. // values: 1*digit
  232. extern const std::string PREF_DHT_LISTEN_PORT;
  233. // values: a string
  234. extern const std::string PREF_DHT_ENTRY_POINT_HOST;
  235. // values: 1*digit
  236. extern const std::string PREF_DHT_ENTRY_POINT_PORT;
  237. // values: a string (hostname:port)
  238. extern const std::string PREF_DHT_ENTRY_POINT;
  239. // values: a string
  240. extern const std::string PREF_DHT_FILE_PATH;
  241. // values: plain | arc4
  242. extern const std::string PREF_BT_MIN_CRYPTO_LEVEL;
  243. extern const std::string V_PLAIN;
  244. extern const std::string V_ARC4;
  245. // values:: true | false
  246. extern const std::string PREF_BT_REQUIRE_CRYPTO;
  247. // values: 1*digit
  248. extern const std::string PREF_BT_REQUEST_PEER_SPEED_LIMIT;
  249. // values: 1*digit
  250. extern const std::string PREF_BT_MAX_OPEN_FILES;
  251. // values: true | false
  252. extern const std::string PREF_BT_SEED_UNVERIFIED;
  253. /**
  254. * Metalink related preferences
  255. */
  256. // values: a string that your file system recognizes as a file name.
  257. extern const std::string PREF_METALINK_FILE;
  258. // values: a string
  259. extern const std::string PREF_METALINK_VERSION;
  260. // values: a string
  261. extern const std::string PREF_METALINK_LANGUAGE;
  262. // values: a string
  263. extern const std::string PREF_METALINK_OS;
  264. // values: a string
  265. extern const std::string PREF_METALINK_LOCATION;
  266. // values: 1*digit
  267. extern const std::string PREF_METALINK_SERVERS;
  268. // values: true | false | mem
  269. extern const std::string PREF_FOLLOW_METALINK;
  270. // values: http | https | ftp | none
  271. extern const std::string PREF_METALINK_PREFERRED_PROTOCOL;
  272. extern const std::string V_HTTP;
  273. extern const std::string V_HTTPS;
  274. extern const std::string V_FTP;
  275. // values: true | false
  276. extern const std::string PREF_METALINK_ENABLE_UNIQUE_PROTOCOL;
  277. } // namespace aria2
  278. #endif // _D_PREFS_H_