signature DOMAIN = sig
+ val declareClient : unit -> unit
+ val fakePrivileges : unit -> unit
+
val yourPath : string -> bool
val isIdent : char -> bool
val validHost : string -> bool
(* Open one of the current domain's configuration files for a particular
* node. *)
+ val currentAliasDomains : unit -> string list
+ val currentDomains : unit -> string list
+ (* Return the auxiliary domains being configured (not including
+ * currentDomain) or the list of all domains being configured,
+ * respectively. *)
+
+ (* The type of a set of files open for different domains. *)
+ type files = {write : string -> unit, (* Write a string to each. *)
+ writeDom : unit -> unit, (* Write each's domain name to it. *)
+ close : unit -> unit} (* Close all files. *)
+
+ val domainsFile : {node : string, name : string} -> files
+ (* Open a configuration file for every domain being configured. *)
+
val dnsMaster : unit -> string option
(* Name of the node that is the DNS master for the current domain, if there
* is one *)
val your_paths : unit -> DataStructures.StringSet.set
(* UNIX users, groups, and paths the user may act with *)
+ val get_context : unit -> OpenSSL.context
val set_context : OpenSSL.context -> unit
val hasPriv : string -> bool
val rmdom : string list -> unit
+ val rmdom' : string -> string list -> unit
+
+ val homedirOf : string -> string
+ val homedir : unit -> string
+
+ type subject = {node : string, domain : string}
+
+ val registerDescriber : (subject -> string) -> unit
+ (* When a user runs [domtool-admin describe $DOM], every function passed to
+ * [registerDescriber] will be run on [$DOM]. *)
+ val describe : string -> string
+ (* Argument is domain to describe, over all nodes. *)
+
+ datatype description =
+ Filename of { filename : string, heading : string, showEmpty : bool }
+ | Extension of { extension : string, heading : string -> string }
+
+ val considerAll : description list -> subject -> string
+ (* Find files in a domain directory matching some patterns and generate
+ * headings and contents listings for them. *)
+
+ (* Callbacks to run whenever the set of Domtool users has changed *)
+ val registerOnUsersChange : (unit -> unit) -> unit
+ val onUsersChange : unit -> unit
end