Link Here
|
1 |
--- src/command_download.cc 2013-12-07 17:54:06.182256000 +0100 |
|
|
2 |
+++ src/command_download.cc 2013-12-07 18:32:56.086096805 +0100 |
3 |
@@ -813,8 +813,8 @@ initialize_command_download() { |
4 |
CMD2_DL_V ("d.disconnect.seeders", tr1::bind(&torrent::ConnectionList::erase_seeders, CMD2_BIND_CL)); |
5 |
|
6 |
CMD2_DL ("d.accepting_seeders", CMD2_ON_INFO(is_accepting_seeders)); |
7 |
- CMD2_DL_V ("d.accepting_seeders.enable", tr1::bind(&torrent::DownloadInfo::public_set_flags, CMD2_BIND_INFO, torrent::DownloadInfo::flag_accepting_seeders)); |
8 |
- CMD2_DL_V ("d.accepting_seeders.disable", tr1::bind(&torrent::DownloadInfo::public_unset_flags, CMD2_BIND_INFO, torrent::DownloadInfo::flag_accepting_seeders)); |
9 |
+ CMD2_DL_V ("d.accepting_seeders.enable", tr1::bind(&torrent::DownloadInfo::public_set_flags, CMD2_BIND_INFO, (1<<4))); |
10 |
+ CMD2_DL_V ("d.accepting_seeders.disable", tr1::bind(&torrent::DownloadInfo::public_unset_flags, CMD2_BIND_INFO, (1<<4))); |
11 |
|
12 |
CMD2_DL ("d.throttle_name", tr1::bind(&download_get_variable, tr1::placeholders::_1, "rtorrent", "throttle_name")); |
13 |
CMD2_DL_STRING_V("d.throttle_name.set", tr1::bind(&core::Download::set_throttle_name, tr1::placeholders::_1, std::placeholders::_2)); |
14 |
--- src/command_dynamic.cc 2013-12-07 17:54:06.293257000 +0100 |
15 |
+++ src/command_dynamic.cc 2013-12-07 18:00:29.238231276 +0100 |
16 |
@@ -127,18 +127,18 @@ system_method_insert_object(const torren |
17 |
|
18 |
torrent::Object value; |
19 |
|
20 |
- switch (flags & rpc::object_storage::mask_type) { |
21 |
- case rpc::object_storage::flag_bool_type: |
22 |
- case rpc::object_storage::flag_value_type: |
23 |
+ switch (flags & rpc::mask_type) { |
24 |
+ case rpc::flag_bool_type: |
25 |
+ case rpc::flag_value_type: |
26 |
value = itrArgs != args.end() ? rpc::convert_to_value(*itrArgs) : int64_t(); |
27 |
break; |
28 |
- case rpc::object_storage::flag_string_type: |
29 |
+ case rpc::flag_string_type: |
30 |
value = itrArgs != args.end() ? rpc::convert_to_string(*itrArgs) : ""; |
31 |
break; |
32 |
- case rpc::object_storage::flag_function_type: |
33 |
+ case rpc::flag_function_type: |
34 |
system_method_generate_command2(&value, itrArgs, args.end()); |
35 |
break; |
36 |
- case rpc::object_storage::flag_multi_type: |
37 |
+ case rpc::flag_multi_type: |
38 |
break; |
39 |
default: |
40 |
throw torrent::input_error("Invalid type."); |
41 |
@@ -146,15 +146,15 @@ system_method_insert_object(const torren |
42 |
|
43 |
int cmd_flags = 0; |
44 |
|
45 |
- if (!(flags & rpc::object_storage::flag_static)) |
46 |
+ if (!(flags & rpc::flag_static)) |
47 |
cmd_flags |= rpc::CommandMap::flag_modifiable; |
48 |
- if (!(flags & rpc::object_storage::flag_private)) |
49 |
+ if (!(flags & rpc::flag_private)) |
50 |
cmd_flags |= rpc::CommandMap::flag_public_xmlrpc; |
51 |
|
52 |
control->object_storage()->insert_str(rawKey, value, flags); |
53 |
|
54 |
- if ((flags & rpc::object_storage::mask_type) == rpc::object_storage::flag_function_type || |
55 |
- (flags & rpc::object_storage::mask_type) == rpc::object_storage::flag_multi_type) { |
56 |
+ if ((flags & rpc::mask_type) == rpc::flag_function_type || |
57 |
+ (flags & rpc::mask_type) == rpc::flag_multi_type) { |
58 |
|
59 |
rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call<rpc::target_type> >::type> |
60 |
(create_new_key(rawKey), |
61 |
@@ -172,7 +172,7 @@ system_method_insert_object(const torren |
62 |
} |
63 |
|
64 |
// Not the right argument. |
65 |
- // if (flags & rpc::object_storage::flag_rlookup) { |
66 |
+ // if (flags & rpc::flag_rlookup) { |
67 |
// rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_string<rpc::target_type> >::type> |
68 |
// (create_new_key<9>(rawKey, ".rlookup"), |
69 |
// tr1::bind(&rpc::object_storage::rlookup_obj_list, control->object_storage(), rawKey), |
70 |
@@ -184,31 +184,31 @@ system_method_insert_object(const torren |
71 |
|
72 |
// // Ehm... no proper handling if these throw. |
73 |
|
74 |
- if (!(flags & rpc::object_storage::flag_constant)) { |
75 |
- switch (flags & rpc::object_storage::mask_type) { |
76 |
- case rpc::object_storage::flag_bool_type: |
77 |
+ if (!(flags & rpc::flag_constant)) { |
78 |
+ switch (flags & rpc::mask_type) { |
79 |
+ case rpc::flag_bool_type: |
80 |
rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_value<rpc::target_type> >::type> |
81 |
(create_new_key<5>(rawKey, ".set"), |
82 |
tr1::bind(&rpc::object_storage::set_str_bool, control->object_storage(), rawKey, tr1::placeholders::_2), |
83 |
&rpc::command_base_call_value<rpc::target_type>, |
84 |
cmd_flags, NULL, NULL); |
85 |
break; |
86 |
- case rpc::object_storage::flag_value_type: |
87 |
+ case rpc::flag_value_type: |
88 |
rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_value<rpc::target_type> >::type> |
89 |
(create_new_key<5>(rawKey, ".set"), |
90 |
tr1::bind(&rpc::object_storage::set_str_value, control->object_storage(), rawKey, tr1::placeholders::_2), |
91 |
&rpc::command_base_call_value<rpc::target_type>, |
92 |
cmd_flags, NULL, NULL); |
93 |
break; |
94 |
- case rpc::object_storage::flag_string_type: |
95 |
+ case rpc::flag_string_type: |
96 |
rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_string<rpc::target_type> >::type> |
97 |
(create_new_key<5>(rawKey, ".set"), |
98 |
tr1::bind(&rpc::object_storage::set_str_string, control->object_storage(), rawKey, tr1::placeholders::_2), |
99 |
&rpc::command_base_call_string<rpc::target_type>, |
100 |
cmd_flags, NULL, NULL); |
101 |
break; |
102 |
- case rpc::object_storage::flag_function_type: |
103 |
- case rpc::object_storage::flag_multi_type: |
104 |
+ case rpc::flag_function_type: |
105 |
+ case rpc::flag_multi_type: |
106 |
default: break; |
107 |
} |
108 |
} |
109 |
@@ -256,16 +256,16 @@ system_method_insert(const torrent::Obje |
110 |
new_args.push_back(rawKey); |
111 |
new_args.push_back(system_method_generate_command(++itrArgs, args.end())); |
112 |
|
113 |
- int new_flags = rpc::object_storage::flag_multi_type; |
114 |
+ int new_flags = rpc::flag_multi_type; |
115 |
|
116 |
if (options.find("static") != std::string::npos) |
117 |
- new_flags |= rpc::object_storage::flag_static; |
118 |
+ new_flags |= rpc::flag_static; |
119 |
if (options.find("private") != std::string::npos) |
120 |
- new_flags |= rpc::object_storage::flag_private; |
121 |
+ new_flags |= rpc::flag_private; |
122 |
if (options.find("const") != std::string::npos) |
123 |
- new_flags |= rpc::object_storage::flag_constant; |
124 |
+ new_flags |= rpc::flag_constant; |
125 |
if (options.find("rlookup") != std::string::npos) |
126 |
- new_flags |= rpc::object_storage::flag_rlookup; |
127 |
+ new_flags |= rpc::flag_rlookup; |
128 |
|
129 |
return system_method_insert_object(new_args, new_flags); |
130 |
|
131 |
@@ -274,14 +274,14 @@ system_method_insert(const torrent::Obje |
132 |
new_args.push_back(rawKey); |
133 |
new_args.push_back(system_method_generate_command(++itrArgs, args.end())); |
134 |
|
135 |
- int new_flags = rpc::object_storage::flag_function_type; |
136 |
+ int new_flags = rpc::flag_function_type; |
137 |
|
138 |
if (options.find("static") != std::string::npos) |
139 |
- new_flags |= rpc::object_storage::flag_static; |
140 |
+ new_flags |= rpc::flag_static; |
141 |
if (options.find("private") != std::string::npos) |
142 |
- new_flags |= rpc::object_storage::flag_private; |
143 |
+ new_flags |= rpc::flag_private; |
144 |
if (options.find("const") != std::string::npos) |
145 |
- new_flags |= rpc::object_storage::flag_constant; |
146 |
+ new_flags |= rpc::flag_constant; |
147 |
|
148 |
return system_method_insert_object(new_args, new_flags); |
149 |
|
150 |
@@ -299,24 +299,24 @@ system_method_insert(const torrent::Obje |
151 |
int new_flags; |
152 |
|
153 |
if (options.find("value") != std::string::npos) |
154 |
- new_flags = rpc::object_storage::flag_value_type; |
155 |
+ new_flags = rpc::flag_value_type; |
156 |
else if (options.find("bool") != std::string::npos) |
157 |
- new_flags = rpc::object_storage::flag_bool_type; |
158 |
+ new_flags = rpc::flag_bool_type; |
159 |
else if (options.find("string") != std::string::npos) |
160 |
- new_flags = rpc::object_storage::flag_string_type; |
161 |
+ new_flags = rpc::flag_string_type; |
162 |
else if (options.find("list") != std::string::npos) |
163 |
- new_flags = rpc::object_storage::flag_list_type; |
164 |
+ new_flags = rpc::flag_list_type; |
165 |
else if (options.find("simple") != std::string::npos) |
166 |
- new_flags = rpc::object_storage::flag_function_type; |
167 |
+ new_flags = rpc::flag_function_type; |
168 |
else |
169 |
throw torrent::input_error("No support for 'list' variable type."); |
170 |
|
171 |
if (options.find("static") != std::string::npos) |
172 |
- new_flags |= rpc::object_storage::flag_static; |
173 |
+ new_flags |= rpc::flag_static; |
174 |
if (options.find("private") != std::string::npos) |
175 |
- new_flags |= rpc::object_storage::flag_private; |
176 |
+ new_flags |= rpc::flag_private; |
177 |
if (options.find("const") != std::string::npos) |
178 |
- new_flags |= rpc::object_storage::flag_constant; |
179 |
+ new_flags |= rpc::flag_constant; |
180 |
|
181 |
return system_method_insert_object(new_args, new_flags); |
182 |
|
183 |
@@ -369,7 +369,7 @@ system_method_set_function(const torrent |
184 |
rpc::object_storage::local_iterator itr = |
185 |
control->object_storage()->find_local(torrent::raw_string::from_string(args.front().as_string())); |
186 |
|
187 |
- if (itr == control->object_storage()->end(0) || itr->second.flags & rpc::object_storage::flag_constant) |
188 |
+ if (itr == control->object_storage()->end(0) || itr->second.flags & rpc::flag_constant) |
189 |
throw torrent::input_error("Command is not modifiable."); |
190 |
|
191 |
return control->object_storage()->set_str_function(args.front().as_string(), |
192 |
@@ -442,12 +442,12 @@ initialize_command_dynamic() { |
193 |
CMD2_VAR_VALUE ("method.use_intermediate", 1); |
194 |
|
195 |
CMD2_ANY_LIST ("method.insert", tr1::bind(&system_method_insert, tr1::placeholders::_2)); |
196 |
- CMD2_ANY_LIST ("method.insert.value", tr1::bind(&system_method_insert_object, tr1::placeholders::_2, rpc::object_storage::flag_value_type)); |
197 |
+ CMD2_ANY_LIST ("method.insert.value", tr1::bind(&system_method_insert_object, tr1::placeholders::_2, rpc::flag_value_type)); |
198 |
|
199 |
- CMD2_METHOD_INSERT("method.insert.simple", rpc::object_storage::flag_function_type); |
200 |
- CMD2_METHOD_INSERT("method.insert.c_simple", rpc::object_storage::flag_constant | rpc::object_storage::flag_function_type); |
201 |
- CMD2_METHOD_INSERT("method.insert.s_c_simple", rpc::object_storage::flag_static | |
202 |
- rpc::object_storage::flag_constant |rpc::object_storage::flag_function_type); |
203 |
+ CMD2_METHOD_INSERT("method.insert.simple", rpc::flag_function_type); |
204 |
+ CMD2_METHOD_INSERT("method.insert.c_simple", rpc::flag_constant | rpc::flag_function_type); |
205 |
+ CMD2_METHOD_INSERT("method.insert.s_c_simple", rpc::flag_static | |
206 |
+ rpc::flag_constant |rpc::flag_function_type); |
207 |
|
208 |
CMD2_ANY_STRING ("method.erase", tr1::bind(&system_method_erase, tr1::placeholders::_2)); |
209 |
CMD2_ANY_LIST ("method.redirect", tr1::bind(&system_method_redirect, tr1::placeholders::_2)); |
210 |
@@ -456,9 +456,9 @@ initialize_command_dynamic() { |
211 |
CMD2_ANY_LIST ("method.set", tr1::bind(&system_method_set_function, tr1::placeholders::_2)); |
212 |
|
213 |
CMD2_ANY_STRING ("method.const", tr1::bind(&rpc::object_storage::has_flag_str, control->object_storage(), |
214 |
- tr1::placeholders::_2, rpc::object_storage::flag_constant)); |
215 |
+ tr1::placeholders::_2, rpc::flag_constant)); |
216 |
CMD2_ANY_STRING_V("method.const.enable", tr1::bind(&rpc::object_storage::enable_flag_str, control->object_storage(), |
217 |
- tr1::placeholders::_2, rpc::object_storage::flag_constant)); |
218 |
+ tr1::placeholders::_2, rpc::flag_constant)); |
219 |
|
220 |
CMD2_ANY_LIST ("method.has_key", tr1::bind(&system_method_has_key, tr1::placeholders::_2)); |
221 |
CMD2_ANY_LIST ("method.set_key", tr1::bind(&system_method_set_key, tr1::placeholders::_2)); |
222 |
--- src/command_events.cc 2013-12-07 17:54:06.298257000 +0100 |
223 |
+++ src/command_events.cc 2013-12-07 18:08:23.828198403 +0100 |
224 |
@@ -321,15 +321,15 @@ initialize_command_events() { |
225 |
CMD2_ANY_STRING_V("import", tr1::bind(&apply_import, tr1::placeholders::_2)); |
226 |
CMD2_ANY_STRING_V("try_import", tr1::bind(&apply_try_import, tr1::placeholders::_2)); |
227 |
|
228 |
- CMD2_ANY_LIST ("load.normal", tr1::bind(&apply_load, tr1::placeholders::_2, core::Manager::create_quiet | core::Manager::create_tied)); |
229 |
- CMD2_ANY_LIST ("load.verbose", tr1::bind(&apply_load, tr1::placeholders::_2, core::Manager::create_tied)); |
230 |
+ CMD2_ANY_LIST ("load.normal", tr1::bind(&apply_load, tr1::placeholders::_2, core::create_quiet | core::create_tied)); |
231 |
+ CMD2_ANY_LIST ("load.verbose", tr1::bind(&apply_load, tr1::placeholders::_2, core::create_tied)); |
232 |
CMD2_ANY_LIST ("load.start", tr1::bind(&apply_load, tr1::placeholders::_2, |
233 |
- core::Manager::create_quiet | core::Manager::create_tied | core::Manager::create_start)); |
234 |
- CMD2_ANY_LIST ("load.start_verbose", tr1::bind(&apply_load, tr1::placeholders::_2, core::Manager::create_tied | core::Manager::create_start)); |
235 |
- CMD2_ANY_LIST ("load.raw", tr1::bind(&apply_load, tr1::placeholders::_2, core::Manager::create_quiet | core::Manager::create_raw_data)); |
236 |
- CMD2_ANY_LIST ("load.raw_verbose", tr1::bind(&apply_load, tr1::placeholders::_2, core::Manager::create_raw_data)); |
237 |
+ core::create_quiet | core::create_tied | core::create_start)); |
238 |
+ CMD2_ANY_LIST ("load.start_verbose", tr1::bind(&apply_load, tr1::placeholders::_2, core::create_tied | core::create_start)); |
239 |
+ CMD2_ANY_LIST ("load.raw", tr1::bind(&apply_load, tr1::placeholders::_2, core::create_quiet | core::create_raw_data)); |
240 |
+ CMD2_ANY_LIST ("load.raw_verbose", tr1::bind(&apply_load, tr1::placeholders::_2, core::create_raw_data)); |
241 |
CMD2_ANY_LIST ("load.raw_start", tr1::bind(&apply_load, tr1::placeholders::_2, |
242 |
- core::Manager::create_quiet | core::Manager::create_start | core::Manager::create_raw_data)); |
243 |
+ core::create_quiet | core::create_start | core::create_raw_data)); |
244 |
|
245 |
CMD2_ANY_VALUE ("close_low_diskspace", tr1::bind(&apply_close_low_diskspace, tr1::placeholders::_2)); |
246 |
|
247 |
--- src/command_helpers.h 2013-12-07 17:54:06.288256000 +0100 |
248 |
+++ src/command_helpers.h 2013-12-07 18:01:51.700225354 +0100 |
249 |
@@ -98,21 +98,21 @@ void initialize_commands(); |
250 |
#define CMD2_TRACKER_VALUE_V(key, slot) CMD2_A_FUNCTION(key, command_base_call_value<torrent::Tracker*>, object_convert_void(slot), "i:i", "") |
251 |
|
252 |
#define CMD2_VAR_BOOL(key, value) \ |
253 |
- control->object_storage()->insert_c_str(key, int64_t(value), rpc::object_storage::flag_bool_type); \ |
254 |
+ control->object_storage()->insert_c_str(key, int64_t(value), rpc::flag_bool_type); \ |
255 |
CMD2_ANY(key, tr1::bind(&rpc::object_storage::get, control->object_storage(), \ |
256 |
torrent::raw_string::from_c_str(key))); \ |
257 |
CMD2_ANY_VALUE(key ".set", tr1::bind(&rpc::object_storage::set_bool, control->object_storage(), \ |
258 |
torrent::raw_string::from_c_str(key), tr1::placeholders::_2)); |
259 |
|
260 |
#define CMD2_VAR_VALUE(key, value) \ |
261 |
- control->object_storage()->insert_c_str(key, int64_t(value), rpc::object_storage::flag_value_type); \ |
262 |
+ control->object_storage()->insert_c_str(key, int64_t(value), rpc::flag_value_type); \ |
263 |
CMD2_ANY(key, tr1::bind(&rpc::object_storage::get, control->object_storage(), \ |
264 |
torrent::raw_string::from_c_str(key))); \ |
265 |
CMD2_ANY_VALUE(key ".set", tr1::bind(&rpc::object_storage::set_value, control->object_storage(), \ |
266 |
torrent::raw_string::from_c_str(key), tr1::placeholders::_2)); |
267 |
|
268 |
#define CMD2_VAR_STRING(key, value) \ |
269 |
- control->object_storage()->insert_c_str(key, value, rpc::object_storage::flag_string_type); \ |
270 |
+ control->object_storage()->insert_c_str(key, value, rpc::flag_string_type); \ |
271 |
CMD2_ANY(key, tr1::bind(&rpc::object_storage::get, control->object_storage(), \ |
272 |
torrent::raw_string::from_c_str(key))); \ |
273 |
CMD2_ANY_STRING(key ".set", tr1::bind(&rpc::object_storage::set_string, control->object_storage(), \ |
274 |
@@ -120,12 +120,12 @@ void initialize_commands(); |
275 |
|
276 |
|
277 |
#define CMD2_VAR_C_STRING(key, value) \ |
278 |
- control->object_storage()->insert_c_str(key, value, rpc::object_storage::flag_string_type); \ |
279 |
+ control->object_storage()->insert_c_str(key, value, rpc::flag_string_type); \ |
280 |
CMD2_ANY(key, tr1::bind(&rpc::object_storage::get, control->object_storage(), \ |
281 |
torrent::raw_string::from_c_str(key))); |
282 |
|
283 |
#define CMD2_VAR_LIST(key) \ |
284 |
- control->object_storage()->insert_c_str(key, torrent::Object::create_list(), rpc::object_storage::flag_list_type); \ |
285 |
+ control->object_storage()->insert_c_str(key, torrent::Object::create_list(), rpc::flag_list_type); \ |
286 |
CMD2_ANY(key, tr1::bind(&rpc::object_storage::get, control->object_storage(), \ |
287 |
torrent::raw_string::from_c_str(key))); \ |
288 |
CMD2_ANY_LIST(key ".set", tr1::bind(&rpc::object_storage::set_list, control->object_storage(), \ |
289 |
--- src/command_local.cc 2013-12-07 17:54:06.105258000 +0100 |
290 |
+++ src/command_local.cc 2013-12-07 17:57:18.242251030 +0100 |
291 |
@@ -401,17 +401,17 @@ initialize_command_local() { |
292 |
#define CMD2_EXECUTE(key, flags) \ |
293 |
CMD2_ANY(key, tr1::bind(&rpc::ExecFile::execute_object, &rpc::execFile, tr1::placeholders::_2, flags)); |
294 |
|
295 |
- CMD2_EXECUTE ("execute2", rpc::ExecFile::flag_expand_tilde | rpc::ExecFile::flag_throw); |
296 |
- CMD2_EXECUTE ("execute.throw", rpc::ExecFile::flag_expand_tilde | rpc::ExecFile::flag_throw); |
297 |
- CMD2_EXECUTE ("execute.throw.bg", rpc::ExecFile::flag_expand_tilde | rpc::ExecFile::flag_throw | rpc::ExecFile::flag_background); |
298 |
- CMD2_EXECUTE ("execute.nothrow", rpc::ExecFile::flag_expand_tilde); |
299 |
- CMD2_EXECUTE ("execute.nothrow.bg", rpc::ExecFile::flag_expand_tilde | rpc::ExecFile::flag_background); |
300 |
- CMD2_EXECUTE ("execute.raw", rpc::ExecFile::flag_throw); |
301 |
- CMD2_EXECUTE ("execute.raw.bg", rpc::ExecFile::flag_throw | rpc::ExecFile::flag_background); |
302 |
+ CMD2_EXECUTE ("execute2", rpc::flag_expand_tilde | rpc::flag_throw); |
303 |
+ CMD2_EXECUTE ("execute.throw", rpc::flag_expand_tilde | rpc::flag_throw); |
304 |
+ CMD2_EXECUTE ("execute.throw.bg", rpc::flag_expand_tilde | rpc::flag_throw | rpc::flag_background); |
305 |
+ CMD2_EXECUTE ("execute.nothrow", rpc::flag_expand_tilde); |
306 |
+ CMD2_EXECUTE ("execute.nothrow.bg", rpc::flag_expand_tilde | rpc::flag_background); |
307 |
+ CMD2_EXECUTE ("execute.raw", rpc::flag_throw); |
308 |
+ CMD2_EXECUTE ("execute.raw.bg", rpc::flag_throw | rpc::flag_background); |
309 |
CMD2_EXECUTE ("execute.raw_nothrow", 0); |
310 |
- CMD2_EXECUTE ("execute.raw_nothrow.bg", rpc::ExecFile::flag_background); |
311 |
- CMD2_EXECUTE ("execute.capture", rpc::ExecFile::flag_throw | rpc::ExecFile::flag_expand_tilde | rpc::ExecFile::flag_capture); |
312 |
- CMD2_EXECUTE ("execute.capture_nothrow", rpc::ExecFile::flag_expand_tilde | rpc::ExecFile::flag_capture); |
313 |
+ CMD2_EXECUTE ("execute.raw_nothrow.bg", rpc::flag_background); |
314 |
+ CMD2_EXECUTE ("execute.capture", rpc::flag_throw | rpc::flag_expand_tilde | rpc::flag_capture); |
315 |
+ CMD2_EXECUTE ("execute.capture_nothrow", rpc::flag_expand_tilde | rpc::flag_capture); |
316 |
|
317 |
CMD2_ANY_LIST ("log.open_file", tr1::bind(&apply_log_open_file, tr1::placeholders::_2)); |
318 |
CMD2_ANY_LIST ("log.add_output", tr1::bind(&apply_log_add_output, tr1::placeholders::_2)); |
319 |
--- src/core/manager.h 2013-12-07 17:54:06.361257000 +0100 |
320 |
+++ src/core/manager.h 2013-12-07 18:07:30.429202321 +0100 |
321 |
@@ -64,6 +64,11 @@ typedef std::map<std::string, torrent::T |
322 |
|
323 |
class View; |
324 |
|
325 |
+static const int create_start = 0x1; |
326 |
+static const int create_tied = 0x2; |
327 |
+static const int create_quiet = 0x4; |
328 |
+static const int create_raw_data = 0x8; |
329 |
+ |
330 |
class Manager { |
331 |
public: |
332 |
typedef DownloadList::iterator DListItr; |
333 |
@@ -118,11 +123,6 @@ public: |
334 |
|
335 |
void handshake_log(const sockaddr* sa, int msg, int err, const torrent::HashString* hash); |
336 |
|
337 |
- static const int create_start = 0x1; |
338 |
- static const int create_tied = 0x2; |
339 |
- static const int create_quiet = 0x4; |
340 |
- static const int create_raw_data = 0x8; |
341 |
- |
342 |
typedef std::vector<std::string> command_list_type; |
343 |
|
344 |
// Temporary, find a better place for this. |
345 |
--- src/rpc/exec_file.h 2013-12-07 17:54:06.332256000 +0100 |
346 |
+++ src/rpc/exec_file.h 2013-12-07 17:57:52.777241888 +0100 |
347 |
@@ -41,15 +41,16 @@ |
348 |
|
349 |
namespace rpc { |
350 |
|
351 |
+const unsigned int max_args = 128; |
352 |
+const unsigned int buffer_size = 4096; |
353 |
+ |
354 |
+const int flag_expand_tilde = 0x1; |
355 |
+const int flag_throw = 0x2; |
356 |
+const int flag_capture = 0x4; |
357 |
+const int flag_background = 0x8; |
358 |
+ |
359 |
class ExecFile { |
360 |
public: |
361 |
- static const unsigned int max_args = 128; |
362 |
- static const unsigned int buffer_size = 4096; |
363 |
- |
364 |
- static const int flag_expand_tilde = 0x1; |
365 |
- static const int flag_throw = 0x2; |
366 |
- static const int flag_capture = 0x4; |
367 |
- static const int flag_background = 0x8; |
368 |
|
369 |
ExecFile() : m_logFd(-1) {} |
370 |
|
371 |
--- src/rpc/object_storage.h 2013-12-07 17:54:06.347257000 +0100 |
372 |
+++ src/rpc/object_storage.h 2013-12-07 17:59:00.255372089 +0100 |
373 |
@@ -58,6 +58,21 @@ struct object_storage_node { |
374 |
|
375 |
typedef std::unordered_map<fixed_key_type<64>, object_storage_node, hash_fixed_key_type> object_storage_base_type; |
376 |
|
377 |
+static const unsigned int flag_generic_type = 0x1; |
378 |
+static const unsigned int flag_bool_type = 0x2; |
379 |
+static const unsigned int flag_value_type = 0x3; |
380 |
+static const unsigned int flag_string_type = 0x4; |
381 |
+static const unsigned int flag_list_type = 0x5; |
382 |
+static const unsigned int flag_function_type = 0x6; |
383 |
+static const unsigned int flag_multi_type = 0x7; |
384 |
+ |
385 |
+static const unsigned int mask_type = 0xf; |
386 |
+ |
387 |
+static const unsigned int flag_constant = 0x10; |
388 |
+static const unsigned int flag_static = 0x20; |
389 |
+static const unsigned int flag_private = 0x40; |
390 |
+static const unsigned int flag_rlookup = 0x80; |
391 |
+ |
392 |
class object_storage : private object_storage_base_type { |
393 |
public: |
394 |
// Should really change rlookup_type into a set with pair values. |
395 |
@@ -90,21 +105,6 @@ public: |
396 |
using base_type::find; |
397 |
using base_type::erase; |
398 |
|
399 |
- static const unsigned int flag_generic_type = 0x1; |
400 |
- static const unsigned int flag_bool_type = 0x2; |
401 |
- static const unsigned int flag_value_type = 0x3; |
402 |
- static const unsigned int flag_string_type = 0x4; |
403 |
- static const unsigned int flag_list_type = 0x5; |
404 |
- static const unsigned int flag_function_type = 0x6; |
405 |
- static const unsigned int flag_multi_type = 0x7; |
406 |
- |
407 |
- static const unsigned int mask_type = 0xf; |
408 |
- |
409 |
- static const unsigned int flag_constant = 0x10; |
410 |
- static const unsigned int flag_static = 0x20; |
411 |
- static const unsigned int flag_private = 0x40; |
412 |
- static const unsigned int flag_rlookup = 0x80; |
413 |
- |
414 |
static const size_t key_size = key_type::max_size; |
415 |
|
416 |
local_iterator find_local(const torrent::raw_string& key); |
417 |
--- src/ui/download_list.cc 2013-12-07 17:54:06.155258000 +0100 |
418 |
+++ src/ui/download_list.cc 2013-12-07 18:09:06.091195600 +0100 |
419 |
@@ -304,7 +304,7 @@ DownloadList::receive_exit_input(Input t |
420 |
if (input->str().empty()) |
421 |
break; |
422 |
|
423 |
- control->core()->try_create_download_expand(input->str(), type == INPUT_LOAD_DEFAULT ? core::Manager::create_start : 0); |
424 |
+ control->core()->try_create_download_expand(input->str(), type == INPUT_LOAD_DEFAULT ? core::create_start : 0); |
425 |
break; |
426 |
|
427 |
case INPUT_CHANGE_DIRECTORY: |