prefs.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. /**
  49. * General preferences
  50. */
  51. // values: 1*digit
  52. #define PREF_RETRY_WAIT "retry-wait"
  53. // values: 1*digit
  54. #define PREF_TIMEOUT "timeout"
  55. // values: 1*digit
  56. #define PREF_DNS_TIMEOUT "dns-timeout"
  57. // values: 1*digit
  58. #define PREF_MAX_TRIES "max-tries"
  59. // values: 1*digit
  60. #define PREF_MIN_SEGMENT_SIZE "min-segment-size"
  61. // values: 1*digit
  62. #define PREF_AUTO_SAVE_INTERVAL "auto-save-interval"
  63. // values: true | false
  64. #define PREF_STDOUT_LOG "stdout-log"
  65. // values: a string that your file system recognizes as a file name.
  66. #define PREF_LOG "log"
  67. // values: a string that your file system recognizes as a directory.
  68. #define PREF_DIR "dir"
  69. // values: a string that your file system recognizes as a file name.
  70. #define PREF_OUT "out"
  71. // values: 1*digit
  72. #define PREF_SPLIT "split"
  73. // value: true | false
  74. #define PREF_DAEMON "daemon"
  75. // value: a string
  76. #define PREF_REFERER "referer"
  77. // value: 1*digit
  78. #define PREF_LOWEST_SPEED_LIMIT "lowest-speed-limit"
  79. // value: 1*digit
  80. #define PREF_SEGMENT_SIZE "segment-size"
  81. // value: 1*digit
  82. #define PREF_MAX_DOWNLOAD_LIMIT "max-download-limit"
  83. // value: 1*digit
  84. #define PREF_STARTUP_IDLE_TIME "startup-idle-time"
  85. // value: prealloc | none
  86. #define PREF_FILE_ALLOCATION "file-allocation"
  87. # define V_PREALLOC "prealloc"
  88. #// value: 1*digit
  89. #define PREF_NO_FILE_ALLOCATION_LIMIT "no-file-allocation-limit"
  90. // value: true | false
  91. #define PREF_ALLOW_OVERWRITE "allow-overwrite"
  92. // value: true | false
  93. #define PREF_REALTIME_CHUNK_CHECKSUM "realtime-chunk-checksum"
  94. // value: true | false
  95. #define PREF_CHECK_INTEGRITY "check-integrity"
  96. // value: string that your file system recognizes as a file name.
  97. #define PREF_NETRC_PATH "netrc-path"
  98. // value:
  99. #define PREF_CONTINUE "continue"
  100. // value:
  101. #define PREF_NO_NETRC "no-netrc"
  102. // value: 1*digit
  103. #define PREF_MAX_DOWNLOADS "max-downloads"
  104. // value: string that your file system recognizes as a file name.
  105. #define PREF_INPUT_FILE "input-file"
  106. // value: 1*digit
  107. #define PREF_MAX_CONCURRENT_DOWNLOADS "max-concurrent-downloads"
  108. // value: 1*digit
  109. #define PREF_DIRECT_DOWNLOAD_TIMEOUT "direct-download-timeout"
  110. // value: true | false
  111. #define PREF_FORCE_SEQUENTIAL "force-sequential"
  112. // value: true | false
  113. #define PREF_AUTO_FILE_RENAMING "auto-file-renaming"
  114. // value: true | false
  115. #define PREF_PARAMETERIZED_URI "parameterized-uri"
  116. // value: true | false
  117. #define PREF_ENABLE_DIRECT_IO "enable-direct-io"
  118. // value: true | false
  119. #define PREF_ALLOW_PIECE_LENGTH_CHANGE "allow-piece-length-change"
  120. /**
  121. * FTP related preferences
  122. */
  123. #define PREF_FTP_USER "ftp-user"
  124. #define PREF_FTP_PASSWD "ftp-passwd"
  125. // values: binary | ascii
  126. #define PREF_FTP_TYPE "ftp-type"
  127. # define V_BINARY "binary"
  128. # define V_ASCII "ascii"
  129. // values: get | tunnel
  130. #define PREF_FTP_VIA_HTTP_PROXY "ftp-via-http-proxy"
  131. # define V_GET "get"
  132. # define V_TUNNEL "tunnel"
  133. // values: true | false
  134. #define PREF_FTP_PASV "ftp-pasv"
  135. /**
  136. * HTTP related preferences
  137. */
  138. #define PREF_HTTP_USER "http-user"
  139. #define PREF_HTTP_PASSWD "http-passwd"
  140. // values: basic
  141. #define PREF_HTTP_AUTH_SCHEME "http-auth-scheme"
  142. # define V_BASIC "basic"
  143. // values: true | false
  144. #define PREF_HTTP_AUTH_ENABLED "http-auth-enabled"
  145. // values: string
  146. #define PREF_USER_AGENT "user-agent"
  147. // value: string that your file system recognizes as a file name.
  148. #define PREF_LOAD_COOKIES "load-cookies"
  149. // values: true | false
  150. #define PREF_ENABLE_HTTP_KEEP_ALIVE "enable-http-keep-alive"
  151. // values: true | false
  152. #define PREF_ENABLE_HTTP_PIPELINING "enable-http-pipelining"
  153. // value: 1*digit
  154. #define PREF_MAX_HTTP_PIPELINING "max-http-pipelining"
  155. /**
  156. * HTTP proxy related preferences
  157. */
  158. #define PREF_HTTP_PROXY "http-proxy"
  159. #define PREF_HTTP_PROXY_USER "http-proxy-user"
  160. #define PREF_HTTP_PROXY_PASSWD "http-proxy-passwd"
  161. #define PREF_HTTP_PROXY_HOST "http-proxy-host"
  162. #define PREF_HTTP_PROXY_PORT "http-proxy-port"
  163. // values: get | tunnel
  164. #define PREF_HTTP_PROXY_METHOD "http-proxy-method"
  165. // values: true | false
  166. #define PREF_HTTP_PROXY_ENABLED "http-proxy-enabled"
  167. // values: true | false
  168. #define PREF_HTTP_PROXY_AUTH_ENABLED "http-proxy-auth-enabled"
  169. /**
  170. * BitTorrent related preferences
  171. */
  172. // values: 1*digit
  173. #define PREF_PEER_CONNECTION_TIMEOUT "peer-connection-timeout"
  174. // values: 1*digit
  175. #define PREF_BT_TIMEOUT "bt-timeout"
  176. // values: 1*digit
  177. #define PREF_BT_REQUEST_TIMEOUT "bt-request-timeout"
  178. // values: true | false
  179. #define PREF_SHOW_FILES "show-files"
  180. // values: true | false
  181. #define PREF_NO_PREALLOCATION "no-preallocation"
  182. // values: true | false
  183. #define PREF_DIRECT_FILE_MAPPING "direct-file-mapping"
  184. // values: 1*digit
  185. #define PREF_MAX_UPLOAD_LIMIT "max-upload-limit"
  186. // values: a string that your file system recognizes as a file name.
  187. #define PREF_TORRENT_FILE "torrent-file"
  188. // values: 1*digit
  189. #define PREF_LISTEN_PORT "listen-port"
  190. // values: true | false | mem
  191. #define PREF_FOLLOW_TORRENT "follow-torrent"
  192. // values: 1*digit *( (,|-) 1*digit)
  193. #define PREF_SELECT_FILE "select-file"
  194. // values: 1*digit
  195. #define PREF_SEED_TIME "seed-time"
  196. // values: 1*digit ['.' [ 1*digit ] ]
  197. #define PREF_SEED_RATIO "seed-ratio"
  198. // values: 1*digit
  199. #define PREF_TRACKER_MAX_TRIES "tracker-max-tries"
  200. // values: 1*digit
  201. #define PREF_BT_KEEP_ALIVE_INTERVAL "bt-keep-alive-interval"
  202. // values: a string, less than or equals to 20 bytes length
  203. #define PREF_PEER_ID_PREFIX "peer-id-prefix"
  204. // values: true | false
  205. #define PREF_ENABLE_PEER_EXCHANGE "enable-peer-exchange"
  206. /**
  207. * Metalink related preferences
  208. */
  209. // values: a string that your file system recognizes as a file name.
  210. #define PREF_METALINK_FILE "metalink-file"
  211. // values: a string
  212. #define PREF_METALINK_VERSION "metalink-version"
  213. // values: a string
  214. #define PREF_METALINK_LANGUAGE "metalink-language"
  215. // values: a string
  216. #define PREF_METALINK_OS "metalink-os"
  217. // values: a string
  218. #define PREF_METALINK_LOCATION "metalink-location"
  219. // values: 1*digit
  220. #define PREF_METALINK_SERVERS "metalink-servers"
  221. // values: true | false | mem
  222. #define PREF_FOLLOW_METALINK "follow-metalink"
  223. // values: http | https | ftp | none
  224. #define PREF_METALINK_PREFERRED_PROTOCOL "metalink-preferred-protocol"
  225. # define V_HTTP "http"
  226. # define V_HTTPS "https"
  227. # define V_FTP "ftp"
  228. #endif // _D_PREFS_H_