Pretty error message in failure dialog.
[guestfs-browser.git] / slave_types.mli
1 (* Guestfs Browser.
2  * Copyright (C) 2010 Red Hat Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  *)
18
19 (** The types used by the slave thread. *)
20
21 type domain = {
22   dom_id : int;
23   dom_name : string;
24   dom_state : Libvirt.Domain.state;
25 }
26     (** List of domains as returned in the {!Slave.connect} callback. *)
27
28 type inspection_data = {
29   insp_all_filesystems : (string * string) list;
30   (** see {!Guestfs.list_filesystems} *)
31   insp_oses : inspection_os list;
32   (** one entry per root (operating system), see {!Guestfs.inspect_os} *)
33 }
34     (** The inspection data returned in the callback from
35         {!Slave.open_domain} and {!Slave.open_images}. *)
36
37 and inspection_os = {
38   insp_root : string;                 (** see {!Guestfs.inspect_os} *)
39   insp_arch : string;
40   insp_distro : string;
41   insp_filesystems : string array;
42   insp_hostname : string;
43   insp_major_version : int;
44   insp_minor_version : int;
45   insp_mountpoints : (string * string) list;
46   insp_package_format : string;
47   insp_package_management : string;
48   insp_product_name : string;
49   insp_type : string;
50   insp_windows_systemroot : string option;
51   insp_winreg_DEFAULT : string option;   (* registry files *)
52   insp_winreg_SAM : string option;
53   insp_winreg_SECURITY : string option;
54   insp_winreg_SOFTWARE : string option;
55   insp_winreg_SYSTEM : string option;
56 }
57
58 type source = OS of inspection_os | Volume of string
59   (** Source type used by {!Slave.read_directory}. *)
60
61 type direntry = {
62   dent_name : string;          (** Basename in directory. *)
63   dent_stat : Guestfs.stat;    (** stat(2) for this entry. *)
64   dent_link : string;          (** (for symlinks only) readlink(2). *)
65 }
66     (** Directory entry returned by {!Slave.read_directory}. *)
67
68 type download_dir_tarball_format = Tar | TGZ | TXZ
69     (** Download format, parameter of {!Slave.download_dir_tarball}. *)