prefs.h 10 KB

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