2 * Copyright (C) 2011 Red Hat Inc.
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.
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.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 (** Any API parameter or return type. *)
28 type parameter = string * any_type
29 (** API parameter (argument name and type). *)
31 type return_type = RErr | Return of any_type
32 (** API return type. A superset of {!any_type} because we allow the
33 special value [RErr] for dealing with errno. *)
39 ep_loc : Camlp4.PreCast.Loc.t;
41 ep_params : parameter list;
42 ep_return : return_type;
43 ep_code : c_code option;
45 (** An API entry point. *)
48 api_entry_points : entry_point list;
50 (** This single structure describes the whole API. *)
52 val string_of_any_type : any_type -> string
53 val string_of_return_type : return_type -> string
54 val string_of_parameter : parameter -> string
55 val string_of_parameters : parameter list -> string
56 val string_of_c_code : c_code -> string
57 val string_of_entry_point : entry_point -> string
58 (** Convert structures to strings for printing, debugging etc. *)