slave: Use slightly modified event_callback.
[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_drive_mappings : (string * string) list;
42   insp_filesystems : string array;
43   insp_hostname : string;
44   insp_major_version : int;
45   insp_minor_version : int;
46   insp_mountpoints : (string * string) list;
47   insp_package_format : string;
48   insp_package_management : string;
49   insp_product_name : string;
50   insp_product_variant : string;
51   insp_type : string;
52   insp_windows_current_control_set : string option;
53   insp_windows_systemroot : string option;
54   insp_winreg_DEFAULT : string option;   (* registry files *)
55   insp_winreg_SAM : string option;
56   insp_winreg_SECURITY : string option;
57   insp_winreg_SOFTWARE : string option;
58   insp_winreg_SYSTEM : string option;
59 }
60
61 type source = OS of inspection_os | Volume of string
62   (** Source type used by {!Slave.read_directory}. *)
63
64 type direntry = {
65   dent_name : string;          (** Basename in directory. *)
66   dent_stat : Guestfs.stat;    (** stat(2) for this entry. *)
67   dent_link : string;          (** (for symlinks only) readlink(2). *)
68 }
69     (** Directory entry returned by {!Slave.read_directory}. *)
70
71 type download_dir_tarball_format = Tar | TGZ | TXZ
72     (** Download format, parameter of {!Slave.download_dir_tarball}. *)