27 |
let ni n m = |
let ni n m = |
28 |
let s = Printf.sprintf "Network.%s not implemented by %s" |
let s = Printf.sprintf "Network.%s not implemented by %s" |
29 |
m n in |
m n in |
30 |
lprintf "%s\n" s; |
lprintf_nl "%s" s; |
31 |
s |
s |
32 |
|
|
33 |
let fni n m = failwith (ni n m) |
let fni n m = failwith (ni n m) |
46 |
let networks_ops = ref [] |
let networks_ops = ref [] |
47 |
|
|
48 |
let check_network_implementations () = |
let check_network_implementations () = |
49 |
lprintf "\n---- Methods not implemented for CommonNetwork ----\n\n"; |
lprintf_nl "\n---- Methods not implemented for CommonNetwork ----\n"; |
50 |
List.iter (fun (c, cc) -> |
List.iter (fun (c, cc) -> |
51 |
let n = c.network_name in |
let n = c.network_name in |
52 |
lprintf "\n Network %s\n\n" n; |
lprintf_nl "\n Network %s\n" n; |
53 |
if c.network_config_file == cc.network_config_file then |
if c.network_config_file == cc.network_config_file then |
54 |
lprintf "network_config_file\n"; |
lprintf_nl "network_config_file"; |
55 |
if c.op_network_connected_servers == cc.op_network_connected_servers then |
if c.op_network_connected_servers == cc.op_network_connected_servers then |
56 |
lprintf "op_network_connected_servers\n"; |
lprintf_nl "op_network_connected_servers"; |
57 |
if c.op_network_is_enabled == cc.op_network_is_enabled then |
if c.op_network_is_enabled == cc.op_network_is_enabled then |
58 |
lprintf "op_network_is_enabled\n"; |
lprintf_nl "op_network_is_enabled"; |
59 |
if c.op_network_save_complex_options == cc.op_network_save_complex_options |
if c.op_network_save_complex_options == cc.op_network_save_complex_options |
60 |
then |
then |
61 |
lprintf "op_network_save_complex_options\n"; |
lprintf_nl "op_network_save_complex_options"; |
62 |
if c.op_network_load_complex_options == cc.op_network_load_complex_options |
if c.op_network_load_complex_options == cc.op_network_load_complex_options |
63 |
then |
then |
64 |
lprintf "op_network_load_complex_options\n"; |
lprintf_nl "op_network_load_complex_options"; |
65 |
if c.op_network_enable == cc.op_network_enable then |
if c.op_network_enable == cc.op_network_enable then |
66 |
lprintf "op_network_enable\n"; |
lprintf_nl "op_network_enable"; |
67 |
if c.op_network_add_server == cc.op_network_add_server then |
if c.op_network_add_server == cc.op_network_add_server then |
68 |
lprintf "op_network_add_server\n"; |
lprintf_nl "op_network_add_server"; |
69 |
if c.op_network_server_of_option == cc.op_network_server_of_option then |
if c.op_network_server_of_option == cc.op_network_server_of_option then |
70 |
lprintf "op_network_server_of_option"; |
lprintf_nl "op_network_server_of_option"; |
71 |
if c.op_network_file_of_option == cc.op_network_file_of_option then |
if c.op_network_file_of_option == cc.op_network_file_of_option then |
72 |
lprintf "op_network_file_of_option"; |
lprintf_nl "op_network_file_of_option"; |
73 |
if c.op_network_client_of_option == cc.op_network_client_of_option then |
if c.op_network_client_of_option == cc.op_network_client_of_option then |
74 |
lprintf "op_network_client_of_option"; |
lprintf_nl "op_network_client_of_option"; |
75 |
if c.op_network_recover_temp == cc.op_network_recover_temp then |
if c.op_network_recover_temp == cc.op_network_recover_temp then |
76 |
lprintf "op_network_recover_temp\n"; |
lprintf_nl "op_network_recover_temp"; |
77 |
if c.op_network_search == cc.op_network_search then |
if c.op_network_search == cc.op_network_search then |
78 |
lprintf "op_network_search\n"; |
lprintf_nl "op_network_search"; |
79 |
if c.op_network_share == cc.op_network_share then |
if c.op_network_share == cc.op_network_share then |
80 |
lprintf "op_network_share\n"; |
lprintf_nl "op_network_share"; |
81 |
if c.op_network_private_message == cc.op_network_private_message then |
if c.op_network_private_message == cc.op_network_private_message then |
82 |
lprintf "op_network_private_message\n"; |
lprintf_nl "op_network_private_message"; |
83 |
if c.op_network_parse_url == cc.op_network_parse_url then |
if c.op_network_parse_url == cc.op_network_parse_url then |
84 |
lprintf "op_network_parse_url\n"; |
lprintf_nl "op_network_parse_url"; |
85 |
if c.op_network_connect_servers == cc.op_network_connect_servers then |
if c.op_network_connect_servers == cc.op_network_connect_servers then |
86 |
lprintf "op_network_connect_servers\n"; |
lprintf_nl "op_network_connect_servers"; |
87 |
if c.op_network_forget_search == cc.op_network_forget_search then |
if c.op_network_forget_search == cc.op_network_forget_search then |
88 |
lprintf "op_network_forget_search\n"; |
lprintf_nl "op_network_forget_search"; |
89 |
if c.op_network_close_search == cc.op_network_close_search then |
if c.op_network_close_search == cc.op_network_close_search then |
90 |
lprintf "op_network_close_search\n"; |
lprintf_nl "op_network_close_search"; |
91 |
if c.op_network_extend_search == cc.op_network_extend_search then |
if c.op_network_extend_search == cc.op_network_extend_search then |
92 |
lprintf "op_network_extend_search\n"; |
lprintf_nl "op_network_extend_search"; |
93 |
if c.op_network_clean_servers == cc.op_network_clean_servers then |
if c.op_network_clean_servers == cc.op_network_clean_servers then |
94 |
lprintf "op_network_clean_servers\n"; |
lprintf_nl "op_network_clean_servers"; |
95 |
if c.op_network_display_stats == cc.op_network_display_stats then |
if c.op_network_display_stats == cc.op_network_display_stats then |
96 |
lprintf "op_network_display_stats\n"; |
lprintf_nl "op_network_display_stats"; |
97 |
if c.op_network_info == cc.op_network_info then |
if c.op_network_info == cc.op_network_info then |
98 |
lprintf "op_network_info\n"; |
lprintf_nl "op_network_info"; |
99 |
) !networks_ops; |
) !networks_ops; |
100 |
lprint_newline () |
lprintf_nl "" |
101 |
|
|
102 |
let network_connected_servers n = n.op_network_connected_servers () |
let network_connected_servers n = n.op_network_connected_servers () |
103 |
let network_is_enabled n = n.op_network_is_enabled () |
let network_is_enabled n = n.op_network_is_enabled () |
120 |
with |
with |
121 |
| IgnoreNetwork -> () |
| IgnoreNetwork -> () |
122 |
| e -> |
| e -> |
123 |
lprintf "Exception %s in Network.iter for %s\n" |
lprintf_nl "Exception %s in Network.iter for %s" |
124 |
(Printexc2.to_string e) r.network_name; |
(Printexc2.to_string e) r.network_name; |
125 |
) !networks |
) !networks |
126 |
|
|
131 |
with |
with |
132 |
IgnoreNetwork -> false |
IgnoreNetwork -> false |
133 |
| e -> |
| e -> |
134 |
lprintf "Exception %s in Network.iter for %s\n" |
lprintf_nl "Exception %s in Network.iter for %s" |
135 |
(Printexc2.to_string e) r.network_name; |
(Printexc2.to_string e) r.network_name; |
136 |
false |
false |
137 |
) !networks |
) !networks |
142 |
with |
with |
143 |
| IgnoreNetwork -> () |
| IgnoreNetwork -> () |
144 |
| e -> |
| e -> |
145 |
lprintf "Exception %s in Network.iter for %s\n" |
lprintf_nl "Exception %s in Network.iter for %s" |
146 |
(Printexc2.to_string e) r.network_name; |
(Printexc2.to_string e) r.network_name; |
147 |
) !networks |
) !networks |
148 |
|
|
152 |
with |
with |
153 |
IgnoreNetwork -> false |
IgnoreNetwork -> false |
154 |
| e -> |
| e -> |
155 |
lprintf "Exception %s in Network.iter for %s\n" |
lprintf_nl "Exception %s in Network.iter for %s" |
156 |
(Printexc2.to_string e) r.network_name; |
(Printexc2.to_string e) r.network_name; |
157 |
false |
false |
158 |
) !networks |
) !networks |
252 |
networks_string := r.network_name |
networks_string := r.network_name |
253 |
else |
else |
254 |
networks_string := Printf.sprintf "%s %s" !networks_string r.network_name; |
networks_string := Printf.sprintf "%s %s" !networks_string r.network_name; |
255 |
(* lprintf "Network %s registered\n" r.network_name; *) |
(* lprintf_nl "Network %s registered" r.network_name; *) |
256 |
r |
r |
257 |
|
|