prefs.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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. /**
  39. * Constants
  40. */
  41. #undef V_TRUE
  42. #define V_TRUE "true"
  43. #undef V_FALSE
  44. #define V_FALSE "false"
  45. #undef V_NONE
  46. #define V_NONE "none"
  47. #define V_MEM "mem"
  48. #define V_ALL "all"
  49. /**
  50. * General preferences
  51. */
  52. // values: 1*digit
  53. #define PREF_RETRY_WAIT "retry-wait"
  54. // values: 1*digit
  55. #define PREF_TIMEOUT "timeout"
  56. // values: 1*digit
  57. #define PREF_DNS_TIMEOUT "dns-timeout"
  58. // values: 1*digit
  59. #define PREF_MAX_TRIES "max-tries"
  60. // values: 1*digit
  61. #define PREF_MIN_SEGMENT_SIZE "min-segment-size"
  62. // values: 1*digit
  63. #define PREF_AUTO_SAVE_INTERVAL "auto-save-interval"
  64. // values: true | false
  65. #define PREF_STDOUT_LOG "stdout-log"
  66. // values: a string that your file system recognizes as a file name.
  67. #define PREF_LOG "log"
  68. // values: a string that your file system recognizes as a directory.
  69. #define PREF_DIR "dir"
  70. // values: a string that your file system recognizes as a file name.
  71. #define PREF_OUT "out"
  72. // values: 1*digit
  73. #define PREF_SPLIT "split"
  74. // value: true | false
  75. #define PREF_DAEMON "daemon"
  76. // value: a string
  77. #define PREF_REFERER "referer"
  78. // value: 1*digit
  79. #define PREF_LOWEST_SPEED_LIMIT "lowest-speed-limit"
  80. // value: 1*digit
  81. #define PREF_SEGMENT_SIZE "segment-size"
  82. // value: 1*digit
  83. #define PREF_MAX_DOWNLOAD_LIMIT "max-download-limit"
  84. // value: 1*digit
  85. #define PREF_STARTUP_IDLE_TIME "startup-idle-time"
  86. // value: prealloc | none
  87. #define PREF_FILE_ALLOCATION "file-allocation"
  88. # define V_PREALLOC "prealloc"
  89. #// value: 1*digit
  90. #define PREF_NO_FILE_ALLOCATION_LIMIT "no-file-allocation-limit"
  91. // value: true | false
  92. #define PREF_ALLOW_OVERWRITE "allow-overwrite"
  93. // value: true | false
  94. #define PREF_REALTIME_CHUNK_CHECKSUM "realtime-chunk-checksum"
  95. // value: true | false
  96. #define PREF_CHECK_INTEGRITY "check-integrity"
  97. // value: string that your file system recognizes as a file name.
  98. #define PREF_NETRC_PATH "netrc-path"
  99. // value:
  100. #define PREF_CONTINUE "continue"
  101. // value:
  102. #define PREF_NO_NETRC "no-netrc"
  103. // value: 1*digit
  104. #define PREF_MAX_DOWNLOADS "max-downloads"
  105. // value: string that your file system recognizes as a file name.
  106. #define PREF_INPUT_FILE "input-file"
  107. // value: 1*digit
  108. #define PREF_MAX_CONCURRENT_DOWNLOADS "max-concurrent-downloads"
  109. // value: 1*digit
  110. #define PREF_DIRECT_DOWNLOAD_TIMEOUT "direct-download-timeout"
  111. // value: true | false
  112. #define PREF_FORCE_SEQUENTIAL "force-sequential"
  113. // value: true | false
  114. #define PREF_AUTO_FILE_RENAMING "auto-file-renaming"
  115. // value: true | false
  116. #define PREF_PARAMETERIZED_URI "parameterized-uri"
  117. // value: true | false
  118. #define PREF_ENABLE_DIRECT_IO "enable-direct-io"
  119. // value: true | false
  120. #define PREF_ALLOW_PIECE_LENGTH_CHANGE "allow-piece-length-change"
  121. // value: true | false
  122. #define PREF_NO_CONF "no-conf"
  123. // value: string
  124. #define PREF_CONF_PATH "conf-path"
  125. // value: 1*digit
  126. #define PREF_STOP "stop"
  127. // value: true | false
  128. #define PREF_QUIET "quiet"
  129. // value: true | false
  130. #define PREF_ASYNC_DNS "async-dns"
  131. // value: 1*digit
  132. #define PREF_SUMMARY_INTERVAL "summary-interval"
  133. // value: debug, info, notice, warn, error
  134. #define PREF_LOG_LEVEL "log-level"
  135. # define V_DEBUG "debug"
  136. # define V_INFO "info"
  137. # define V_NOTICE "notice"
  138. # define V_WARN "warn"
  139. # define V_ERROR "error"
  140. /**
  141. * FTP related preferences
  142. */
  143. #define PREF_FTP_USER "ftp-user"
  144. #define PREF_FTP_PASSWD "ftp-passwd"
  145. // values: binary | ascii
  146. #define PREF_FTP_TYPE "ftp-type"
  147. # define V_BINARY "binary"
  148. # define V_ASCII "ascii"
  149. // values: get | tunnel
  150. #define PREF_FTP_VIA_HTTP_PROXY "ftp-via-http-proxy"
  151. # define V_GET "get"
  152. # define V_TUNNEL "tunnel"
  153. // values: true | false
  154. #define PREF_FTP_PASV "ftp-pasv"
  155. // values: true | false
  156. #define PREF_FTP_REUSE_CONNECTION "ftp-reuse-connection"
  157. /**
  158. * HTTP related preferences
  159. */
  160. #define PREF_HTTP_USER "http-user"
  161. #define PREF_HTTP_PASSWD "http-passwd"
  162. // values: basic
  163. #define PREF_HTTP_AUTH_SCHEME "http-auth-scheme"
  164. # define V_BASIC "basic"
  165. // values: true | false
  166. #define PREF_HTTP_AUTH_ENABLED "http-auth-enabled"
  167. // values: string
  168. #define PREF_USER_AGENT "user-agent"
  169. // value: string that your file system recognizes as a file name.
  170. #define PREF_LOAD_COOKIES "load-cookies"
  171. // values: true | false
  172. #define PREF_ENABLE_HTTP_KEEP_ALIVE "enable-http-keep-alive"
  173. // values: true | false
  174. #define PREF_ENABLE_HTTP_PIPELINING "enable-http-pipelining"
  175. // value: 1*digit
  176. #define PREF_MAX_HTTP_PIPELINING "max-http-pipelining"
  177. // value: string
  178. #define PREF_HEADER "header"
  179. /**
  180. * HTTP proxy related preferences
  181. */
  182. #define PREF_HTTP_PROXY "http-proxy"
  183. #define PREF_HTTP_PROXY_USER "http-proxy-user"
  184. #define PREF_HTTP_PROXY_PASSWD "http-proxy-passwd"
  185. #define PREF_HTTP_PROXY_HOST "http-proxy-host"
  186. #define PREF_HTTP_PROXY_PORT "http-proxy-port"
  187. // values: get | tunnel
  188. #define PREF_HTTP_PROXY_METHOD "http-proxy-method"
  189. // values: true | false
  190. #define PREF_HTTP_PROXY_ENABLED "http-proxy-enabled"
  191. // values: true | false
  192. #define PREF_HTTP_PROXY_AUTH_ENABLED "http-proxy-auth-enabled"
  193. /**
  194. * BitTorrent related preferences
  195. */
  196. // values: 1*digit
  197. #define PREF_PEER_CONNECTION_TIMEOUT "peer-connection-timeout"
  198. // values: 1*digit
  199. #define PREF_BT_TIMEOUT "bt-timeout"
  200. // values: 1*digit
  201. #define PREF_BT_REQUEST_TIMEOUT "bt-request-timeout"
  202. // values: true | false
  203. #define PREF_SHOW_FILES "show-files"
  204. // values: true | false
  205. #define PREF_NO_PREALLOCATION "no-preallocation"
  206. // values: true | false
  207. #define PREF_DIRECT_FILE_MAPPING "direct-file-mapping"
  208. // values: 1*digit
  209. #define PREF_MAX_UPLOAD_LIMIT "max-upload-limit"
  210. // values: a string that your file system recognizes as a file name.
  211. #define PREF_TORRENT_FILE "torrent-file"
  212. // values: 1*digit
  213. #define PREF_LISTEN_PORT "listen-port"
  214. // values: true | false | mem
  215. #define PREF_FOLLOW_TORRENT "follow-torrent"
  216. // values: 1*digit *( (,|-) 1*digit)
  217. #define PREF_SELECT_FILE "select-file"
  218. // values: 1*digit
  219. #define PREF_SEED_TIME "seed-time"
  220. // values: 1*digit ['.' [ 1*digit ] ]
  221. #define PREF_SEED_RATIO "seed-ratio"
  222. // values: 1*digit
  223. #define PREF_TRACKER_MAX_TRIES "tracker-max-tries"
  224. // values: 1*digit
  225. #define PREF_BT_KEEP_ALIVE_INTERVAL "bt-keep-alive-interval"
  226. // values: a string, less than or equals to 20 bytes length
  227. #define PREF_PEER_ID_PREFIX "peer-id-prefix"
  228. // values: true | false
  229. #define PREF_ENABLE_PEER_EXCHANGE "enable-peer-exchange"
  230. // values: true | false
  231. #define PREF_ENABLE_DHT "enable-dht"
  232. // values: 1*digit
  233. #define PREF_DHT_LISTEN_PORT "dht-listen-port"
  234. // values: a string
  235. #define PREF_DHT_ENTRY_POINT_HOST "dht-entry-point-host"
  236. // values: 1*digit
  237. #define PREF_DHT_ENTRY_POINT_PORT "dht-entry-point-port"
  238. // values: a string (hostname:port)
  239. #define PREF_DHT_ENTRY_POINT "dht-entry-point"
  240. // values: a string
  241. #define PREF_DHT_FILE_PATH "dht-file-path"
  242. // values: plain | arc4
  243. #define PREF_BT_MIN_CRYPTO_LEVEL "bt-min-crypto-level"
  244. # define V_PLAIN "plain"
  245. # define V_ARC4 "arc4"
  246. // values:: true | false
  247. #define PREF_BT_REQUIRE_CRYPTO "bt-require-crypto"
  248. /**
  249. * Metalink related preferences
  250. */
  251. // values: a string that your file system recognizes as a file name.
  252. #define PREF_METALINK_FILE "metalink-file"
  253. // values: a string
  254. #define PREF_METALINK_VERSION "metalink-version"
  255. // values: a string
  256. #define PREF_METALINK_LANGUAGE "metalink-language"
  257. // values: a string
  258. #define PREF_METALINK_OS "metalink-os"
  259. // values: a string
  260. #define PREF_METALINK_LOCATION "metalink-location"
  261. // values: 1*digit
  262. #define PREF_METALINK_SERVERS "metalink-servers"
  263. // values: true | false | mem
  264. #define PREF_FOLLOW_METALINK "follow-metalink"
  265. // values: http | https | ftp | none
  266. #define PREF_METALINK_PREFERRED_PROTOCOL "metalink-preferred-protocol"
  267. # define V_HTTP "http"
  268. # define V_HTTPS "https"
  269. # define V_FTP "ftp"
  270. // values: true | false
  271. #define PREF_METALINK_ENABLE_UNIQUE_PROTOCOL "metalink-enable-unique-protocol"
  272. #endif // _D_PREFS_H_