Version 0.1.4.
[guestfs-browser.git] / slave_types.mli
diff --git a/slave_types.mli b/slave_types.mli
new file mode 100644 (file)
index 0000000..e039bb6
--- /dev/null
@@ -0,0 +1,69 @@
+(* Guestfs Browser.
+ * Copyright (C) 2010 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+(** The types used by the slave thread. *)
+
+type domain = {
+  dom_id : int;
+  dom_name : string;
+  dom_state : Libvirt.Domain.state;
+}
+    (** List of domains as returned in the {!Slave.connect} callback. *)
+
+type inspection_data = {
+  insp_all_filesystems : (string * string) list;
+  (** see {!Guestfs.list_filesystems} *)
+  insp_oses : inspection_os list;
+  (** one entry per root (operating system), see {!Guestfs.inspect_os} *)
+}
+    (** The inspection data returned in the callback from
+        {!Slave.open_domain} and {!Slave.open_images}. *)
+
+and inspection_os = {
+  insp_root : string;                 (** see {!Guestfs.inspect_os} *)
+  insp_arch : string;
+  insp_distro : string;
+  insp_filesystems : string array;
+  insp_hostname : string;
+  insp_major_version : int;
+  insp_minor_version : int;
+  insp_mountpoints : (string * string) list;
+  insp_package_format : string;
+  insp_package_management : string;
+  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;
+}
+
+type source = OS of inspection_os | Volume of string
+  (** Source type used by {!Slave.read_directory}. *)
+
+type direntry = {
+  dent_name : string;          (** Basename in directory. *)
+  dent_stat : Guestfs.stat;    (** stat(2) for this entry. *)
+  dent_link : string;          (** (for symlinks only) readlink(2). *)
+}
+    (** Directory entry returned by {!Slave.read_directory}. *)
+
+type download_dir_tarball_format = Tar | TGZ | TXZ
+    (** Download format, parameter of {!Slave.download_dir_tarball}. *)