drop md4 i?86 specific asm implementations
[mldonkey.git] / src / networks / direct_connect / dcOptions.ml
blobc7fc642f0c4216059616af8ff9420a212e376bf5
1 (* Copyright 2001, 2002 b8_bavard, b8_fee_carabine, INRIA *)
2 (*
3 This file is part of mldonkey.
5 mldonkey is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 mldonkey is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with mldonkey; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 open Options
21 open CommonOptions
24 let directconnect_ini = create_options_file "directconnect.ini"
25 let directconnect_section = file_section directconnect_ini ["DirectConnect"] "DirectConnect options"
27 let dc_port = define_option directconnect_section ["client_port"]
28 "The port to bind the client to"
29 port_option 4444
31 let dc_open_slots = define_option directconnect_section ["dc_open_slots"]
32 "How many slots are open to other clients"
33 int_option 2
35 let login = define_option directconnect_section ["login"]
36 "Your login on DC (no spaces !!!)" string_option ""
38 let hubs_passwords = define_option directconnect_section ["hubs_passwords"]
39 "Define here a list of address/passwords/nick triples for hubs in form:
40 [ (\"hubserver.ip.com\", \"nick1\", \"pass1\");
41 (\"somehub.somewhere.org\", \"nick2\", \"pass2\");
42 (\"11.22.333.444\", \"nick3\", \"pass3\");
44 (list_option (tuple3_option (string_option, string_option, string_option)))
47 let default_encoding = define_option directconnect_section ["default_encoding"]
48 "Default encoding to use for communications with hubs (CP1251,UTF-8,ISO-8859-1,etc)"
49 string_option "CP1252"
51 let search_timeout = define_option directconnect_section
52 ["search_timeout"]
53 "The time a search is active"
54 int_option 60
56 let file_search_time = define_option directconnect_section
57 ["file_search_time"]
58 "Minimum time between automated file tth searches in minutes"
59 int_option 60
61 let client_timeout = define_option directconnect_section
62 ["client_timeout"]
63 "In initialization, the time in seconds we wait connection responses from client"
64 int_option 90
66 let client_read_timeout = define_option directconnect_section
67 ["client_read_timeout"]
68 "The maximum time in seconds we wait data from client in downloading"
69 int_option 60
71 let client_write_timeout = define_option directconnect_section
72 ["client_write_timeout"]
73 "The maximum time in seconds we wait to continue pushing data to client in uploading"
74 int_option 60
76 let wait_for_next_upload = define_option directconnect_section
77 ["wait_for_next_upload"]
78 "How many seconds we wait a client to continue slot before closing and freeing the slot"
79 int_option 30
81 let firewalled = define_option directconnect_section ["firewalled"]
82 "Is this client firewalled (use passive searches)"
83 bool_option false
85 let autosearch_by_tth = define_option directconnect_section ["autosearch_by_tth"]
86 "Automatically find alternative sources, if file is unavailable. Also add sources
87 from searches automatically"
88 bool_option true
90 let max_sources_file = define_option directconnect_section ["max_sources_file"]
91 "Maximal number of sources to single file"
92 int_option 5
94 let client_speed = define_option directconnect_section
95 ["client_speed"]
96 "The line speed sent in the MyINFO message
97 eg. Modem, Cable, DSL, Satellite, LAN(T1), LAN(T3)"
98 string_option "DSL"
100 let options_version = define_option directconnect_section ["options_version"]
101 ~internal: true
102 "(internal option)"
103 int_option 0
105 let shortname o =
106 Printf.sprintf "DC-%s" (shortname o)
108 let gui_dc_options_panel =
110 define_option directconnect_section ["gui_dc_options_panel"]
111 "Which options are configurable in the GUI option panel, and in the
112 dc section. Last entry indicates the kind of widget used (B=Boolean,T=Text)"
113 (list_option (tuple3_option (string_option, string_option, string_option)))
116 "Login (nothing for global one)", shortname login, "T";
117 "Port", shortname dc_port, "T";
118 "Search Timeout", shortname search_timeout, "T";
119 "Firewalled", shortname firewalled, "B";
120 "Connection Type", shortname client_speed, "T";