eae488e4ebe350afbf91b38f7e6a9cbe6749625e
[virt-mem.git] / lib / virt_mem.mli
1 (** Memory info for virtual domains. *)
2 (* Memory info for virtual domains.
3    (C) Copyright 2008 Richard W.M. Jones, Red Hat Inc.
4    http://libvirt.org/
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *)
20
21 val register :
22   ?external_cmd:bool ->
23   ?extra_args:(Arg.key * Arg.spec * Arg.doc) list ->
24   ?argcheck:(bool -> unit) ->
25   ?beforeksyms:(bool -> Virt_mem_types.image0 list -> unit) ->
26   ?run:(bool -> Virt_mem_types.image1 list -> unit) ->
27   string -> string -> Arg.usage_msg ->
28   unit
29   (** Tools register themselves with this call.
30
31       The anonymous parameters are:
32       - tool name (eg. "uname")
33       - short summary
34       - full usage message
35
36       The optional callback functions are:
37       - [?argcheck] called after arguments have been fully parsed
38       so that the program can do any additional checks needed (eg.
39       on [extra_args]),
40       - [?beforeksyms] called after images are loaded and before
41       kernel symbols are analyzed,
42       - [?run] called after kernel symbols have been analyzed
43       (almost all tools supply this callback function).
44
45       Pass [~external_cmd:false] if this tool doesn't have an
46       external 'virt-tool' link.
47
48       Pass [~extra_args:...] if this tool needs extra command
49       line options.
50   *)
51
52 val main : unit -> unit
53   (** Entry point for the combined virt-mem executable. *)