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.
19 type any_type = TInt32 | TInt64 | Type of string
20 (** Any API parameter or return type. *)
22 type parameter = string * any_type
23 (** API parameter (argument name and type). *)
25 type return_type = RErr | Return of any_type
26 (** API return type. A superset of {!any_type} because we allow the
27 special value [RErr] for dealing with errno. *)
33 (*ep_loc : Camlp4.PreCast.Loc.t;*)
35 ep_params : parameter list;
36 ep_return : return_type;
37 ep_code : c_code option;
39 (** An API entry point. *)
41 val string_of_any_type : any_type -> string
42 val string_of_return_type : return_type -> string
43 val string_of_parameter : parameter -> string
44 val string_of_parameters : parameter list -> string
45 val string_of_c_code : c_code -> string
46 val string_of_entry_point : entry_point -> string
47 (** Convert structures to strings for printing, debugging etc. *)