Version 0.1.2.
[guestfs-browser.git] / slave.mli
index 0df8466..406e9db 100644 (file)
--- a/slave.mli
+++ b/slave.mli
@@ -105,6 +105,11 @@ and inspection_os = {
   insp_product_name : string;
   insp_type : string;
   insp_windows_systemroot : string option;
+  insp_winreg_DEFAULT : string option;   (* registry files *)
+  insp_winreg_SAM : string option;
+  insp_winreg_SECURITY : string option;
+  insp_winreg_SOFTWARE : string option;
+  insp_winreg_SYSTEM : string option;
 }
 
 val open_domain : ?fail:exn callback -> string -> inspection_data callback -> unit
@@ -122,9 +127,10 @@ val open_domain : ?fail:exn callback -> string -> inspection_data callback -> un
       If [fail] is passed, then failures cause this callback to
       be called.  If not, the global failure hook is called. *)
 
-val open_images : ?fail:exn callback -> string list -> inspection_data callback -> unit
-  (** [open_images images cb] is like {!open_domain} except
-      that it opens local disk image(s) directly.
+val open_images : ?fail:exn callback -> (string * string option) list -> inspection_data callback -> unit
+  (** [open_images images cb] is like {!open_domain} except that it
+      opens local disk image(s) directly.  [images] is a list of
+      [(filename, format)] pairs.
 
       If [fail] is passed, then failures cause this callback to
       be called.  If not, the global failure hook is called. *)
@@ -153,6 +159,31 @@ val read_directory : ?fail:exn callback -> source -> string -> direntry list cal
       If [fail] is passed, then failures cause this callback to
       be called.  If not, the global failure hook is called. *)
 
+val download_file : ?fail:exn callback -> source -> string -> string -> unit callback -> unit
+  (** [download_file src pathname localfile cb] downloads [pathname]
+      to the named local file, and then calls the callback function. *)
+
+type download_dir_tarball_format = Tar | TGZ | TXZ
+
+val download_dir_tarball : ?fail:exn callback -> source -> string -> download_dir_tarball_format -> string -> unit callback -> unit
+  (** [download_dir_tarball_format src pathname format localfile cb]
+      downloads directory [pathname] to the named local file (a
+      tarball), and then calls the callback function.
+
+      [format] controls the download format, which is one of
+      uncompressed tar, gzip-compressed tar, or xz-compressed tar. *)
+
+val download_dir_find0 : ?fail:exn callback -> source -> string -> string -> unit callback -> unit
+  (** [download_dir_find0 src pathname localfile cb] downloads the
+      list of filenames of directory [pathname] to the named local
+      file (a ASCII NUL-separated text file), and then calls the
+      callback function. *)
+
+val disk_usage : ?fail:exn callback -> source -> string -> int64 callback -> unit
+  (** [disk_usage src pathname cb] calculates the disk usage of
+      directory [pathname] and calls the callback with the answer
+      (size of {b kilobytes}). *)
+
 val discard_command_queue : unit -> unit
   (** [discard_command_queue ()] discards any commands on the command
       queue.
@@ -179,7 +210,9 @@ val exit_thread : unit -> unit
     and display those in the main thread.
 
     {!set_busy_hook} and {!set_idle_hook} are used to implement a
-    "throbber". *)
+    "throbber".
+
+    {!set_progress_hook} is used to implement a progress bar. *)
 
 val set_failure_hook : exn callback -> unit
   (** Set the function in the main thread which is called if there is
@@ -194,3 +227,14 @@ val set_idle_hook : unit callback -> unit
   (** Set the function in the main thread which is called whenever
       the slave thread stops working on a command {i and} has no
       more commands left in the queue to work on. *)
+
+val set_status_hook : string callback -> unit
+  (** Set the function in the main thread which is called to
+      update the status bar.  The slave thread updates the
+      status bar when an operation starts or stops, keeping the
+      user informed of what is happening. *)
+
+val set_progress_hook : (int64 * int64) callback -> unit
+  (** Set the function in the main thread which is called whenever
+      the slave thread receives a progress notification message
+      from libguestfs. *)