(* Ethel - An OCaml Freenet Daemon *) (* by Travis Bemann and Eric Norige *) (* *) (* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public *) (* License as published by the Free Software Foundation; either *) (* version 2 of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU Lesser General Public License for more details. *) exception Config_error of string exception Cannot_open_any_config exception Cannot_open_config type config_data = Config_string of string | Config_bool of bool | Config_int of int | Config_float of float | Config_list of config_data list | Config_null val string_of_config : config_data -> string val bool_of_config : config_data -> bool val int_of_config : config_data -> int val float_of_config : config_data -> float val string_opt_of_config : config_data -> string option val int_opt_of_config : config_data -> int option val float_opt_of_config : config_data -> float option class configure : defaults:(string * config_data) list -> files:string list -> required:bool -> object ('a) val hash : (string, config_data) Hashtbl.t method field : string -> config_data method field_string : string -> string method field_bool : string -> bool method field_int : string -> int method field_float : string -> float method field_string_opt : string -> string option method field_int_opt : string -> int option method field_float_opt : string -> float option method add_fields : (string * config_data) list -> 'a method add_fields_default : (string * config_data) list -> 'a method merge : configure -> 'a method merge_default : configure -> 'a method load : string list -> 'a method load_required : string list -> 'a method load_dirty : string list -> bool -> unit (* DON'T USE!!! *) method dump : (string * config_data) list method dump_format : sort:(string -> string -> int) -> defaults:(string * config_data) list -> escape_high:bool -> string end