Outline OCaml bindings.
[libguestfs.git] / ocaml / guestfs.ml
1 (* libguestfs generated file
2  * WARNING: THIS FILE IS GENERATED BY 'src/generator.ml'.
3  * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
4  *
5  * Copyright (C) 2009 Red Hat Inc.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  *)
21
22 type t
23 exception Error of string
24 external create : unit -> t = "ocaml_guestfs_create"
25 external close : t -> unit = "ocaml_guestfs_create"
26 external launch : t -> unit = "ocaml_guestfs_launch"
27 external wait_ready : t -> unit = "ocaml_guestfs_wait_ready"
28 external kill_subprocess : t -> unit = "ocaml_guestfs_kill_subprocess"
29 external add_drive : t -> string -> unit = "ocaml_guestfs_add_drive"
30 external add_cdrom : t -> string -> unit = "ocaml_guestfs_add_cdrom"
31 external config : t -> string -> string option -> unit = "ocaml_guestfs_config"
32 external set_path : t -> string option -> unit = "ocaml_guestfs_set_path"
33 external get_path : t -> string = "ocaml_guestfs_get_path"
34 external set_autosync : t -> bool -> unit = "ocaml_guestfs_set_autosync"
35 external get_autosync : t -> bool = "ocaml_guestfs_get_autosync"
36 external set_verbose : t -> bool -> unit = "ocaml_guestfs_set_verbose"
37 external get_verbose : t -> bool = "ocaml_guestfs_get_verbose"
38
39 type lvm_pv = {
40   pv_name : string;
41   pv_uuid : string;
42   pv_fmt : string;
43   pv_size : int64;
44   dev_size : int64;
45   pv_free : int64;
46   pv_used : int64;
47   pv_attr : string;
48   pv_pe_count : int64;
49   pv_pe_alloc_count : int64;
50   pv_tags : string;
51   pe_start : int64;
52   pv_mda_count : int64;
53   pv_mda_free : int64;
54 }
55
56 type lvm_vg = {
57   vg_name : string;
58   vg_uuid : string;
59   vg_fmt : string;
60   vg_attr : string;
61   vg_size : int64;
62   vg_free : int64;
63   vg_sysid : string;
64   vg_extent_size : int64;
65   vg_extent_count : int64;
66   vg_free_count : int64;
67   max_lv : int64;
68   max_pv : int64;
69   pv_count : int64;
70   lv_count : int64;
71   snap_count : int64;
72   vg_seqno : int64;
73   vg_tags : string;
74   vg_mda_count : int64;
75   vg_mda_free : int64;
76 }
77
78 type lvm_lv = {
79   lv_name : string;
80   lv_uuid : string;
81   lv_attr : string;
82   lv_major : int64;
83   lv_minor : int64;
84   lv_kernel_major : int64;
85   lv_kernel_minor : int64;
86   lv_size : int64;
87   seg_count : int64;
88   origin : string;
89   snap_percent : float option;
90   copy_percent : float option;
91   move_pv : string;
92   lv_tags : string;
93   mirror_log : string;
94   modules : string;
95 }
96
97 external cat : t -> string -> string = "ocaml_guestfs_cat"
98 external list_devices : t -> string list = "ocaml_guestfs_list_devices"
99 external list_partitions : t -> string list = "ocaml_guestfs_list_partitions"
100 external ll : t -> string -> string = "ocaml_guestfs_ll"
101 external ls : t -> string -> string list = "ocaml_guestfs_ls"
102 external lvs : t -> string list = "ocaml_guestfs_lvs"
103 external lvs_full : t -> lvm_lv list = "ocaml_guestfs_lvs_full"
104 external mount : t -> string -> string -> unit = "ocaml_guestfs_mount"
105 external pvs : t -> string list = "ocaml_guestfs_pvs"
106 external pvs_full : t -> lvm_pv list = "ocaml_guestfs_pvs_full"
107 external sync : t -> unit = "ocaml_guestfs_sync"
108 external touch : t -> string -> unit = "ocaml_guestfs_touch"
109 external vgs : t -> string list = "ocaml_guestfs_vgs"
110 external vgs_full : t -> lvm_vg list = "ocaml_guestfs_vgs_full"